Portable Retro Game Console

by thecrazylevitator in Circuits > Raspberry Pi

12 Views, 0 Favorites, 0 Comments

Portable Retro Game Console

Girl in Countryside Playing Retro Game.png

Have you ever dreamed of carrying your favourite retro games around in your pocket? In this project, we’ll create a DIY Portable Retro Game Console using a Raspberry Pi Zero W, a TFT screen, and a few simple electronic components. By the end, you'll have your very own handheld console, perfect for nostalgic gaming on the go. Let’s dive into the adventure of blending modern tech with classic fun!

I've compiled all the information I gathered while designing and building this DIY handheld game console, so anyone can build it. This step-by-step guide also explains the choices I made, and the options I decided not to include.

Lets get going

Downloads

Supplies

  1. Raspberry Pi 4 Model B, 4GB RAM. Consider the following:
  2. Any Raspberry Pi 1B, 2B, 3B, or 4 is suitable.
  3. For most emulation use cases, 4GB of RAM is more than enough. 8GB won't noticeably improve performance.
  4. Raspberry Pi Zero, Zero W, and Zero 2W are suitable for this project as well. Though, you'll need to tinker a bit to acommodate the components inside the case.
  5. If considering using a Raspberry Pi 5, be aware:
  6. RetroPie supports the Raspberry Pi 5, but with some caveats.
  7. The Raspberry Pi 5 has significantly higher power requirements. I'm unsure if the PiSugar can meet those needs.
  8. I haven't yet tested all components and libraries with the RPi 5.
  9. 5-inches 800x480 IPS Screen with integrated speaker. Consider the following:
  10. Any screen of any size and resolution will work.
  11. However, I can only guarantee that the display linked here will fit physically in the case I designed.
  12. This project requires you to modify the display linked here, which will definitely void its warranty, so proceed at your own risk.
  13. PiSugar 2 Pro. Consider the following:
  14. Any UPS HAT with a battery compatible with your Raspberry Pi model should work.
  15. However, I can only guarantee that the UPS and battery linked here will fit physically in the case I designed.
  16. I'm unsure if other PiSugar models, such as the 2 Plus, S Plus, or 3 Plus, have the same dimensions or not.
  17. The only thing you need for a proper fit is a battery with max dimensions of 56 x 66 x 10mm (2.2 x 2.6 x 0.4 in).
  18. I'm unsure if any PiSugar models support the significantly higher power requirements of the Raspberry Pi 5.
  19. This project requires you to modify your PiSugar, which will definitely void its warranty, so proceed at your own risk.
  20. Soft Tactile 8mm Buttons (10 units). Consider the following:
  21. Those are squishy and feel more like a gamepad, but they aren't essential.
  22. Any standard tactile button will work just fine.
  23. Another good option is these Soft Silicone 6mm Push-Buttons.
  24. 90-Degree Angled Tactile Push Buttons (4 units).
  25. SD Card. Any SD card on this compatibility list is suitable.
  26. Breadboard to prototype a gamepad with the push buttons. It will also be useful for any future electronic project you might have.
  27. Male-to-Female Jumper Wires. Sometimes you can get them bundled with the breadboard.
  28. 40-Pins (2x20) Female GPIO Header (1 unit) to convert the PiSugar into a top-mounted HAT. Look for solderless headers if you want to minimize the amount of soldering.
  29. M2.5 Screws and M2.5 Male-to-Female Standoff Spacers.
  30. They are often sold together and can be used on a variety of electronic projects.
  31. The lenghts will depend on your specific build.
  32. For the inside components, I used two 10mm spacers and four 10mm screws.
  33. For the enclosure, I used two 16mm and two 20mm screws.
  34. Metal Heatsink or any type of cooling for Raspberry Pi that can co-exist with a HAT.


Choosing the Right CPU

A single-board computer (SBC) is a complete computer built onto a single circuit board, integrating the microprocessor, memory, input/output ports, and all other necessary features for a functional system.

There are many SBC options available in the market, but for my project, I chose the Raspberry Pi 4 Model B. At the time of building the console, the Pi 4 was the latest model available. I prefer the Raspberry Pi for several reasons: it has a huge and active community, which means that if you encounter any issues, chances are someone has already solved them. Additionally, all Raspberry Pi models share the same physical footprint, from the original 2012 release to the most recent versions, making it easier to design cases without worrying about size differences — and making the project more budget-friendly.

Another option I considered was the Orange Pi 5. However, it has a completely different size and layout and is also significantly more expensive, which made it less suitable for my needs.

Install RetroPie on a Raspberry Pi.

rasbperry-pi-imager-ui.png
rasbperry-pi-imager-model.png
rasbperry-pi-imager-os.png
rasbperry-pi-imager-retropie.png
rasbperry-pi-imager-sd.png

Identify which model of Raspberry Pi you have.

Connect a compatible SD card to your computer.

Download and install the official Raspberry Pi Imager.

On the Raspberry Pi Imager, click (Choose device) and select your Raspberry Pi model.

Click Choose OS. Select "Emulation and game OS", then "RetroPie".

Choose the version of RetroPie that corresponds to your specific board.

Click Choose storage and select your SD card on the list to install RetroPie into it.

Click Next and install RetroPie on the SD card.

Connect It to a TV/monitor and Keyboard.

power-connection.png
2025-04-28 22_44_51-Window.png

Using an HDMI cable, connect the Raspberry Pi to a TV, computer monitor, or the display specified earlier.

Next, connect a keyboard to the Pi.

After that, plug in the power supply to the Raspberry Pi and turn it on.

On the first boot into RetroPie, you’ll be prompted to configure your input settings. Use the keyboard to assign keys to different functions. Important: Make sure to write down which keys you assign to each function — you’ll need to remember them later for both gameplay and menu navigation. (For reference, I’ve included the key mapping I used.)

You'll use these assigned keys to navigate RetroPie’s interface. For example, the D-PAD keys allow you to move through the menus, while BUTTON A (or EAST) is used to confirm selections.

Add Own Custom Buttons

silicone-buttons.jpg
slicer-buttons.png
squishy-buttons.jpg

Start by placing all the tactile buttons onto the breadboard. Connect one leg of each button to the ground rail (-) of the breadboard.

Then, use jumper wires to connect the other leg (the + side) of each button to a GPIO pin on the Raspberry Pi. You can connect any button to any available GPIO pin, but it’s crucial to keep track of which button is connected to which pin for later configuration. (You can refer to the pinout I used here.)

Next, connect the Raspberry Pi to Wi-Fi by following the official RetroPie steps:

RetroPie → WIFI → Connect to WiFi network

Now, access the Raspberry Pi's command line. You can either press F4 while inside RetroPie for local access, or connect remotely by enabling SSH, assigning a static IP address, and running the following command on your computer:

ssh pi@192.168.X.X

Once you’re in the terminal, install the Adafruit-Retrogame utility, which lets you map GPIO button presses as virtual keyboard inputs. Download and run Adafruit’s installation script with:

curl https://raw.githubusercontent.com/adafruit/Raspberry-Pi-Installer-Scripts/master/retrogame.sh > retrogame.sh

sudo bash retrogame.sh

During the installation, you'll be prompted to select a configuration — choose any option and follow the instructions to reboot the system.

After rebooting, return to the command line and edit the retrogame configuration file to correctly map your GPIO pins to the keys you assigned earlier. Open the configuration file with:

sudo nano /boot/retrogame.cfg

You can check an example of my retrogame.cfg setup here. If you need help identifying key IDs, you can refer to the keyTable.h file in the Retrogame repository for a full list.

Once you’ve made your changes, save and exit Nano by pressing Ctrl + X, then confirming the save.

Finally, reboot your console again with:

sudo reboot

After rebooting, you should be able to fully navigate the RetroPie interface, launch games, and play them using your custom-built gamepad!

Inverter and Battery

pi-sugar-screws.jpg

To begin, verify that the PiSugar is functioning correctly by connecting it to the Raspberry Pi according to the provided instructions. At this stage, you should have a working wireless game console.

The next steps involve converting the PiSugar from a Hardware Under Board (HUB) to a Hardware Attached on Top (HAT) configuration so that it fits inside the case. This process is recommended only if you have experience with electronics.

Warning: Modifying the PiSugar will void its warranty. I am not responsible for any damage that may occur to your components. Proceed only if you accept full responsibility for the modifications. If you're uncertain, consider researching other UPS and battery options.

To proceed:

  1. Carefully remove the pogo pins (the golden cylindrical connectors) from the PiSugar. Pull out the side that is not spring-loaded (the rigid side) straight out, and you may need to twist the pin slightly to help it come out.
  2. Solder a 2x20 female GPIO header onto the PiSugar. Make sure to solder at least the pins where the pogo pins were, as this is essential for proper functionality. Using flux can make soldering easier.
  3. Solder wires to the GPIO pins that you plan to use for the buttons (as set up in step 3).
  4. Connect the battery to the PiSugar and attach the PiSugar to the Raspberry Pi for a test run.

Note: Don't worry if the wires seem to press against the Raspberry Pi; it won't cause any damage. 5. Power on the Raspberry Pi and then disconnect it from the power to ensure it functions wirelessly.

Wiring and Assembly

thumbsticks-arduino.jpg
breadboard-connected-to-raspberry-pi.jpg
controller-pins.jpg
pi-sugar-connected-to-raspberry-pi.png
pcb-prototype-gnd-legs.png
pcb-prototype-with-buttons.png
perfboard.jpg

Print the PCB prototype and 6 battery brackets in PETG with 0.15mm layer height and 15% infill. Print the brackets on their sides and with supports. If you need to print the PCB at a 45-degree angle, as shown in the picture, ensure you set the fill angle to 0 in the slicer.

Attach the 6 battery brackets to the main piece using super glue.

Insert the push buttons into the frame: place 4 90-degree buttons on the shoulders and triggers, and 10 regular buttons on the remaining areas. The buttons should stay securely in place. If they don’t, try reprinting the piece with adjustments to the layer thickness in the slicer.

Solder one leg (-) of each button in series, connecting them all together.

Solder the opposite leg (+) of each button to a GPIO pin on the PiSugar header, ensuring you connect them to the same pins you selected in step 3.

Attach the Raspberry Pi to the PCB prototype using two screws on the pin side and two 10mm spacers on the opposite side.

Connect the PiSugar to the Raspberry Pi and secure it to the spacers with 2 screws. Make sure to connect the battery to the PiSugar first, as there will be limited space for the battery wires. Note: Don’t worry if the wires press against the Raspberry Pi; this won’t cause any damage.

Connect the Raspberry Pi to the display. The screen will need power from USB and video/audio via HDMI. I’m using PCB-based connectors that came with the display, but the second-best option is ribbon cables, which are also available as band or flat cables.

3D Printing the Frame

3d-printing.jpg
3-printed-pieces.png
assembly-back.png

Print the case front and case back in PLA. For optimal strength and speed, I found printing them at a 45-degree angle worked best, using custom support enforcers where necessary (make sure nothing is left unsupported in mid-air) and organic supports.

Print all the buttons together in PLA, ensuring the layer height is 0.10mm or less. I recommend printing the d-pad on its side with some supports for better results.

Insert the buttons into the front case.

Place the assembled components inside the case.

Attach the back case and secure everything with M2.5 screws. Ideally, use 16mm (⅝ in) screws at the top and 20mm (¾ in) screws at the bottom.

And that's it! Enjoy your custom Raspberry Pi handheld game console.