Our website is made possible by displaying online advertisements to our visitors. Please consider supporting us by disabling your ad blocker.

Create a Retro Gaming Handheld with a Raspberry Pi Zero and the Retroflag GPi Case

TwitterFacebookRedditLinkedInHacker News

I’m a huge Raspberry Pi advocate and own more of them than any single person should own. They are cheap, moderately powerful, and are useful for quite a few circumstances.

In a previous tutorial titled, Emulate Classic Video Games On A Raspberry Pi Zero With RetroPie, I demonstrated how to repurpose an old Raspberry Pi Zero to be a gaming console about the size of an Amazon Fire Stick. For $5.00 to $10.00, these devices make retro gaming possible with little setup involved.

Recently, my buddy Mark Smith told me about the Retroflag GPi case, a case with a screen, speaker, and all the expectations of a handheld. This thing looks just like a classic Nintendo Gameboy, but has better hardware and is powered by a Raspberry Pi Zero. It is incredibly awesome.

In this tutorial, we’re going to go a step further. We’re going to take a Raspberry Pi Zero and combine it with a Retroflag GPi case to make a portable retro gaming powerhouse.

To get an idea of what we’re working with, take a look at the following images:

Retroflag GPI Case for Rasbperry Pi and RetroPie

Doesn’t that look awesome?

The Raspberry Pi Zero exists inside a removable cartridge. You can power it with standard batteries or with a power adapter. The screen is backlit and clear, and it can run whatever gaming emulators your Raspberry Pi Zero is strong enough to use. I found that Gameboy, Gameboy Color, Nintendo Entertainment System (NES), and Super Nintendo Entertainment System (SNES) perform the best.

Optimizing the RetroPie for Retroflag Hardware

We’re not going to see how to flash a micro SD card with RetroPie in this tutorial. If you need help getting RetroPie on your Raspberry Pi Zero or Raspberry Pi Zero W, check out my previous tutorial on the subject. Instead, we’re going to focus on getting the RetroPie working with the specialized hardware.

We’re going to need to do two things:

  1. Install the RetroPie patch for screen and controls compatibility.
  2. Install the safe shutdown scripts.

By default RetroPie is expecting an HDMI display and some external controller. The Retroflag case doesn’t meet these expectations, so we need to install a patch so it works correctly. In addition to the patch, we probably want to use the optional safe shutdown scripts. This prevents instant power cutoff and instead uses a safe and graceful shutdown. You don’t want to end up with data corruption or similar with a hard shutdown.

Download and Install the Patch Files for the Retroflag GPi Case

To install the patch files, you’ll need to connect the micro SD card of your RetroPie to your computer. I’ll be walking through this from the perspective of a macOS user so your actual steps might vary.

Download the patch files from the Retroflag website for the GPi case. When you extract the archive, you’ll see a readme.txt file and a patch_files directory with a few files that we’re going to use.

Copy the patch_files/config.txt file to the root of the micro SD card. Copy the patch_files/overlays/dpi24.dtbo file and the patch_files/overlays/pwm-audio-pi-zero.dtbo file to the overlays directory on the micro SD card. Overwrite the files if they already exist.

Congratulations, the next time you use the micro SD card in your Raspberry Pi Zero, it will work with your Retroflag GPi case!

Install the Safe Shutdown Scripts

For this next step, you’ll want to have connected to your Raspberry Pi Zero with SSH. If you’re using a Raspberry Pi Zero without WiFi, you’re not out of luck. Instead, check out my previous tutorial titled, Connect to a Raspberry Pi Zero with a USB Cable and SSH. There are many other ways to SSH into your Raspberry Pi Zero, but those require extra hardware.

Once connected, execute the following command:

wget -O - "https://raw.githubusercontent.com/RetroFlag/retroflag-picase/master/install_gpi.sh" | sudo bash

It may take a few minutes to complete the above scripts.

After you’ve installed the safe shutdown functionality, make sure you flip the switch within the battery compartment of the Retroflag GPi case. You’ll want safe shutdown to be enabled. On my case, the switch was disabled when I received it.

More information regarding the safe shutdown scripts can be found on GitHub.

Installing a Theme for Better Visibility on the Retroflag GPi Case

If you’ve installed the patch and the appropriate scripts, you can technically start enjoying the Raspberry Pi Zero in your Retroflag GPi case. However, you’ll probably notice that some of the default fonts are very small and difficult to read. Remember, RetroPie users are generally using a TV, not a small handheld screen.

This is an easy fix!

We’re going to want to install a new RetroPie theme, one that was specifically designed for smaller screen sizes. The recommendation online is to use the Super Retroboy theme.

At the time of writing this tutorial, this theme was not included in the EmulationStation themes manager. This means the theme needs to be installed manually. I recommend that you SSH into the RetroPie to be successful with this step.

Within your RetroPie, execute the following command to navigate to the correct directory:

cd /etc/emulationstation/themes

If your RetroPie was like mine, you’ll only have the carbon theme installed. To install our new theme, execute the following command:

git clone https://github.com/KALEL1981/es-theme-Super-Retroboy.git super-retroboy

You might need to use sudo when executing the above command.

If you reload EmulationStation on the device, you should be able to switch to the newly installed theme. Remember, EmulationStation is part of RetroPie, and you can navigate it when assembled within the Retroflag GPi case.

Conclusion

You just saw how to turn your Raspberry Pi Zero into a portable gaming device with a Retroflag GPi case and the RetroPie custom operating system.

I’m personally using a Raspberry Pi Zero W which made the SSH steps significantly easier. After installing and patching RetroPie, I was able to complete all other steps with the Retroflag GPi case assembled.

This tutorial likely won’t do the Retroflag GPi case justice. I mean this case is beautiful, sturdy, and performs exceptionally with a Raspberry Pi Zero, with or without the wireless functionality.

Many of the links in this tutorial used affiliate links. This means that if you purchase anything through those links, I’ll get a small portion of the commission. I’ve had great success with all of the products mentioned and I’m hoping you do too!

If you’re wondering where the ROMs are, well they aren’t exactly legal. Consult with the local laws in your region before downloading and installing video game ROMs to your RetroPie device.

Nic Raboy

Nic Raboy

Nic Raboy is an advocate of modern web and mobile development technologies. He has experience in Java, JavaScript, Golang and a variety of frameworks such as Angular, NativeScript, and Apache Cordova. Nic writes about his development experiences related to making web and mobile development easier to understand.

Search

Follow Us

Subscribe

Subscribe to the newsletter for monthly tips and tricks on subjects such as mobile, web, and game development.

Support This Site