Posted on

RetroPie SDCard Image with Built-in GPIO Controller Support

Below is a modified copy of RetroPie 4.3 image for the Raspberry Pi Zero with built-in support for setting up GPIO buttons using Adafruit’s Retrogame utility program. I have tested it and have been using it for my Game Boy Zero builds.

Raspberry Pi Zero – RetroPie_4.3_GPIO_PiZero.img.7z (578Mb)

Just edit the file /boot/retrogame.cfg to match your GPIO configuration.

Or use the following GPIO soldering setup:

 UP  –  GPIO04
 DOWN  –  GPIO17
 LEFT  –  GPIO27
 RIGHT  –  GPIO22
 A  –  GPIO05
 B  –  GPIO06
 X  –  GPIO19
 Y  –  GPIO26
 SELECT  –  GPIO20
 START  –  GPIO16
 L1  –  GPIO12
 R1  –  GPIO23

PWM audio is configured to use GPIO18 and GPIO13 by default but you can edit the following lines in the /boot/config.txt to either enable 1 or 2 audio channel(enabled by default).

# 2 channel audio
dtoverlay=pwm-2chan,pin=18,func=2,pin2=13,func2=4

# 1 channel audio
dtoverlay=pwm,pin=18,func=2

Update: Image file updated to 7z format to shrink the size. Most zip programs can extract it just fine. Otherwise just download 7z.

7 thoughts on “RetroPie SDCard Image with Built-in GPIO Controller Support

  1. […] can download a copy of RetroPie 4.3 image with the GPIO program already installed and follow the gpio button […]

  2. […] Wiring the Game Boy Controller v2.0 to the Pi Zero or Pi 3’s GPIO pins is the simplest way to configure controller inputs for the Game Boy Zero/3 without any additional component. You can use the following diagram to solder the button inputs to the Pi and download a copy of RetroPie with the GPIO program already pre-installed. […]

  3. Hello, I’m having trouble with the audio I have successfully soldered it the way you posted your image for the audio but still no sound I have checked the sound o the speaker it works great. But no luck with sound

    1. No sound with from headphone jack or just from the speaker? Can you post some pictures of your build? Will help a lot in troubleshooting.

      What controller board are you using? Pi Zero or Pi 3?

  4. I’ve just completed my first gameboy zero build using a RPI zero.. I soldered all of the wires to the Pi following the wiring diagram above and also properly burned the above retropi 4.3 image with GPIO button support and when I turned it on to test it everything worked as expected except my “down” button and my “X” button. All other buttons work fine though. Any ideas on what I should try?

    1. Connect to your Pi Zero via SSH and enter the following command to test the Retrogame Utility.

      sudo /usr/local/bin/retrogame

      You should get a response on the screen when you press each button. Otherwise make sure the non-responsive is soldered properly. You can easily verify this with a digital multimeter.

      1. Thank you, I will test it out with my digital multimeter and will re-solder the 2 non-responsive buttons’ wires. Thank you for your quick response, and I wanted to say how much I appreciate the retropi 4.3 download with the GPIO button support that you made, it makes my life a whole lot easier!
        And I love that awesome screen that says “Gameboy Zero” on boot-up 👍

Leave a Reply

Your email address will not be published. Required fields are marked *