I completed all the wiring and then moved on to configuring retrogame. As per the tutorial above, this involves editing the retrogame.c file to reflect the GPIO pins and controls you're using, then making the retrogame file. I used the default configuration that came in the retrogame.c file (i.e. Left is GPIO pin 25, Right 9, Up 10, Down 17, A 23, and B 7). The only thing I had to change in the file was to add two lines for Start (which I mapped to pin 8) and Select (which I mapped to pin 11). Here's what the final retrogame.c file looked like when I was done: http://imgur.com/Y0ZtmT3.
After I added the rows in nano, I hit Control+X to exit, then answered "Yes" to "Save modified buffer?", then pressed Enter when it asked "File Name to write: retrogame.c". Then I got back to the terminal and while the prompt said "pi@raspberrypi ~/retrogame $ " I typed in "make retrogame" and pressed Enter (all per the Adafruit tutorial). The following line then comes up: "make: "retrogame" is up to date."
All the inputs from the Game Boy worked in Retropie after this except for Start and Select. I rechecked everything else (connections to the GPIO pins, solder points on the board, etc.) and everything is correct.
Can anyone shed any light on why my Start and Select buttons wouldn't be working? Is anything I've done above incorrect, or have I omitted something? Does the line "make: 'retrogame' is up to date" reflect a successful make process? I'm a bit of a newbie when it comes to much of this, so any help would be greatly appreciated.
Your changes to retrogame weren't saved if it says retrogame is up to date. Otherwise it would list build components. Try 'sudo nano retrogame.c', make your changes again, save, then make retrogame.
Thanks a lot for your response. What you're recommending is what I did the first time with no luck. I just went in to do it again, and here are my results: http://imgur.com/a/Rlsti. I first opened up LXTerminal, put in "cd retrogame" to navigate to the retrogame folder and then typed in "sudo nano retrogame.c" It pulled up the retrogame.c file that I'd edited earlier and it was just like I saved it - it included the two lines I'd added for Start and Select. I pressed Control+X to exit (there was no prompt to save because I'd made no changes). Then I put in "make retrogame" and I got the same response "make: 'retrogame' is up to date."
One interesting thing I noticed, seen in the second picture, is that the retrogame folder now has two new files in it: "retrogame.c.save" and "retrogame.c.save.1" (there are presumably 2 because I tried editing and saving twice). I would normally think that maybe this means the core retrogame.c file didn't get edited, rather a new version was created in retrogame.c.save, but when I open "sudo nano retrogame.c" the updated file comes up.
Any thoughts on this? Am I not opening or saving this file properly?
That worked! Thanks so much, I'd never have known how to do that otherwise. I wonder why I had to do that and couldn't just write to the original file directly.
One last question I hope you can help me with, as it seems like you're pretty experienced with this. How do I map a button combination to use as ESC, for example to exit a game I'm in back to EmulationStation/Retropie? I see something in the retrogame.c file about a "Vulcan Nerve Pinch" (see below). I tried to edit the retrogame.c file to replace the default 6 and 7 values with 8 and 11 (to match the GPIO pins I have set for Start and Select) and then I ran the make command (this time getting the same successful output I saw after putting in your command above) but afterwards I couldn't get any combination of start and select to register as ESC.
Thanks again for reading all this and helping me out, I really appreciate it.
Actually I think I got that figured out. Now however in testing the controls I've realized that not all the emulators I expected are showing up as default in Retropie. It looks like for example that Game Boy and NES come up as default but Game Boy Color and Game Gear do not. I have ROMs in the correct folders for both GBC and Game Gear - how do I get Retropie/EmulationStation to load those emulators by default? I'm finding online something about editing a file called es_config but I'm not sure how...