I just recently completed my first GBZ build using the GPIO pins for the controller buttons which i think is very easy to setup than the usual Teensy.
I made a simple script to automate the task of setting up the Adafruit Retrogame utility software on a Raspberry Pi Zero assuming you've already installed RetroPie on your sdcard.
GPIO04 - 'UP' button
GPIO07 - 'DOWN' button
GPIO27 - 'LEFT' button
GPIO22 - 'RIGHT' button
GPIO05 - 'A' button
GPIO06 - 'B' button
GPIO13 - 'X' button
GPIO26 - 'Y' button
GPIO23 - 'ENTER' button
GPIO12 - 'SELECT' button
GPIO16 - 'LEFT Shoulder' button
GPIO20 - 'RIGHT Shoulder' button
GROUND - Connect to any ground pin
You can check all the corresponding GPIO pin number at https://pinout.xyz/
If you have different GPIO pin assigments then you can edit the file retrogame.cfg to suit your needs.
- Download file.
- Use 7zip or any zip program to extract the file and copy the "Adafruit-Retrogame" folder into your RetroPie sdcard on "/home/pi". Edit the file retrogame.cfg if you soldered to the GPIO pins differently.
- Edit the file "/etc/rc.local" and add the following before the line "exit 0" and save.
Code: Select all
sudo bash /home/pi/Adafruit-Retrogame/Setup-Retrogame.sh
- Now power on your Pi Zero with the RetroPie sdcard in. It should automatically reboot once and you're good to go.
Tested on RetroPie 4.1, 4.2, and 4.3.
Just download a RetroPie image with pre-installed Adafruit Retrogame utility.