That's an old trick (though no less cool). The GBA had a GBC cpu in it for backwards compatibility, and it used a physical switch to change modes, toggled by the cartridge itself. And iirc the PS2 reused the PS1 cpu as a component on the board for I/O, so it was available for backwards compatibility as well (though with emulation help for other components).