Emulating a Single Keystroke with a button connected to the ControlBlock
-
Hi folks,
I've been toying with the idea of rigging a button underneath the reset button in the SNES case, so that when pressed it exits the game and takes you back to the game select screen (a little pointless as you can just do Start+Select I know but I like to tinker and learn new things).
I've read some places online about hacking up an old keyboard, but I was wondering if it's possible (and some advice on how to do it) to connect something simple like this Push button to either the remaining GPIO on the RasPi (underneath the ControlBlock) OR one of the pins/places on the ControlBlock. FOllowing that, I'm also unsure on what to edit to make it work!
I figure if I do that, that could lead to a couple more buttons, maybe nicely housed in a cartridge in the case, to save and load states in the games.
Has anyone got any advice on where I'd start?
Cheers.
-
If you are interested in working on the ControlBlock sources, a place to add that functionality would be https://github.com/petrockblog/ControlBlockService2/blob/master/src/controlblock/SNESGamepad.cpp. You could take a look at https://github.com/petrockblog/ControlBlockService2/blob/master/src/controlblock/MAMEGamepad.cpp, where a simulated keyboard is already implemented.
Contributions to the project are always appreciated, so if you would like to support us with a donation you can do so here.
Hosting provided by Mythic-Beasts. See the Hosting Information page for more information.