Raspberry Pi Zero 2 powers the Null 2 RetroPie gaming handheld

As a child, I by no means had a Sport Boy, Sport Gear, or every other handheld console. Heck, as luck would have it I've by no means owned a Nintendo Swap, both.

I've performed console and PC video games, I've solely used handhelds twice: as soon as in center college, when a pal let me borrow his Sport Gear for a day, and final yr yr when my dad introduced over his Nintendo Swap—which my youngsters shortly commandeered.

I suppose out of a way of jealousy, I made a decision the very first thing I ought to do with Raspberry Pi's newest {hardware}, the Pi Zero 2 (see my review here), is construct myself a handheld retro gaming console.

Raspberry Pi Zero 2 powers the Null 2 RetroPie gaming handheld

And what higher approach than with the Null 2 package (pictured above, from it is Tindie page), a package integrating off-the-shelf parts on a customized PCB, wrapped up properly in a customized acrylic case.

Null 2 Pi Zero 2 W completed build retropie gaming handheld console

I lastly have my very own transportable gaming handheld—and even higher, I hand-made it! I even 'hand-made' a few of the software program, too, because the official Null 2 picture—no less than on the time of this writing—does not work on the Pi Zero 2 {hardware}!


After finishing the construct, I do not know if I might advocate the Null 2 to somebody fully new to soldering. Or perhaps I might. By means of the course of placing this factor collectively, I received to follow:

  • By means of-hole soldering
  • SMD soldering
  • SMD flat/ribbon cable soldering
  • Desoldering (for a number of oopsies)

And here's a image of my workbench as I dove into the soldering:

Workbench - Null 2 soldering setup

Let's listing all of the instruments I used (Amazon affiliate hyperlinks):

I additionally ended up utilizing flux, solder, and a few Q-tips to scrub some components with alcohol as soon as I splashed flux throughout them 🙂

Probably the most nerve-wracking half was soldering the Pi Zero 2 to the Null 2. Step one is taping it to the board so it aligns with the pads on the board:

Pi Zero 2 taped to Null 2 board

It is a bizarre soldering technique. I suppose you could possibly name it "blind cup-hole soldering". You principally 'fill in' the through-hole on the Pi's GPIO pins, and hope that the solder makes a reference to the floor pad underneath the through-hole.

In a sick coincidence, each single GPIO examined out advantageous apart from the GND pin the Null 2 makes use of. So, I needed to bodge a separate GND connection to one of many different floor pins on the Zero 2.

Bodge wire on GND on Pi Zero 2 on Null 2 board

In the long run, I am not happy with it, however this was the primary time I might achieved the 'through-hole cup' technique of soldering, so 39/40 connections looks like a reasonably good common! I later switched out that pink jumper wire for a skinny little bit of enameled copper wire, so it would slot in the case higher.

After that snafu, issues went effectively, although soldering a number of of the SMD parts (just like the resistor pictured beneath) may be annoying. Fortunately there are only some surface-mount buttons, a resistor, and the display screen that need to be achieved this manner.

3R90 SMD Resistor on top of Null 2 board

The secret is to place some flux on the joint, solder it, then for those who overloaded it, seize a spool of solder wick and pull off a few of the extra solder. Rinse and repeat.

Flux on audio jack pins on Null 2 solder board

Flux is your pal.

In any case, I received the battery mounted, I charged up the battery through USB-C, after which I powered on the board... and nothing occurred!

I assumed I have to've damaged one thing, however after re-testing all of the take a look at factors, it appeared the {hardware} was wired appropriately. Finally, I discovered that the issue was the official Null 2 Pi image (no less than on the time of this writing) did not embody machine tree recordsdata (.dtb's) for the Pi Zero 2.

Switching to the official Pi OS picture received the Pi in addition, however that made a brand new drawback...

Software program

Constructing RetroPie on the Pi OS picture just isn't fairly 'easy', and takes a really very long time—hours and hours. And, as I discovered after making an attempt for a pair days, it does not at present construct on 64-bit Pi OS, and I had hassle getting it to construct on the 32-bit model on the Zero 2 as effectively...

So to make issues simpler, I made a decision to attempt customizing the RetroPie OS picture to get RetroPie booting and all of the {hardware} (display screen, buttons, and audio) working.

The Null 2 website has a downloadable set of directions for 'making your personal' picture. Sadly, these directions appear to be a bit old-fashioned with the most recent model of Linux, so I am going to define each step intimately.

Getting RetroPie

Because the Pre-made RetroPie Raspberry Pi images have already got a Pi 3 model, and the Pi 3 shares the identical processor because the Pi Zero 2, that picture ought to work after you flash it to a microSD card...

However I found the WiFi chip within the Zero 2 is definitely barely completely different than the one within the Zero W and three B+ the present RetroPie picture (as of Nov 2021) is suitable with. Due to that, a more recent kernel is required so it can load the right brcmfmac43436 driver for the Zero 2. So till an official launch newer than 4.7.1 is out there, you need to obtain the RetroPie weekly build if you'd like working WiFi and Bluetooth.

While you flash the picture to your microSD card, it's essential set it up for headless distant entry, as a result of the Null 2 does not enable use of the USB or HDMI show ports.

Raspberry Pi Imager Advanced SSH Options

Utilizing the Raspberry Pi Imager, you possibly can edit the RetroPie OS configuration earlier than you write the picture to your card by urgent Shift-Ctrl-X. In these choices, be sure you both set an SSH password or paste in your public SSH key so you possibly can log in. You also needs to arrange WiFi credentials right here too.

I set the hostname to null2 so I may entry the Pi at null2.native on my community (and never need to attempt to determine its IP handle alone).

Save these settings, and write the RetroPie picture to your microSD card.

After that is achieved, pop the cardboard within the Pi Zero 2, and boot it up—it can probably take a pair minutes on first boot, because the Pi has to undergo increasing the filesystem, and RetroPie does issues like producing a brand new SSH host key.

After it is booted up, you need to be capable to headlessly SSH into the Pi utilizing ssh pi@null2.native (assuming that is the hostname you picked).

Notice: If you cannot get linked, it might be WiFi is not enabled appropriately on the RetroPie picture. The best answer is to seize a second Pi Zero 2 or 3 B+, pop the microSD card in it, plug that Pi right into a show, keyboard and mouse, and configure WiFi there, then stick the microSD card again within the Null's Pi.

Now it is time to begin mentioning all of the {hardware} on the Null 2. First, the show:

Getting the ILI9341 SPI show working

SPI Display working with backlight - white display only

Because the fbtft_device module is not within the Linux kernel, I needed to as a substitute use the juj/fbcp-ili9341 driver for the show. This driver permits the little 240x320 show to be pushed at 60Hz over SPI, which isn't any small feat!

However getting it compiled on the Pi was a bit of bit of labor, since I needed to translate a few of the Null's pin assignments into the compilation command. This is what I did on the Pi itself over SSH to get the display screen working initially:

cd ~
sudo apt-get set up cmake
git clone https://github.com/juj/fbcp-ili9341.git
cd fbcp-ili9341
mkdir construct
cd construct
make -j
sudo ./fbcp-ili9341

On the finish of that course of, the motive force ought to begin rendering the Pi's show to the display screen, and you need to see one thing like this:

Raspberry Pi OS on SPI display on Null 2

Press Ctrl-C to cease the show from rendering. It is a bit of blurry because the HDMI decision does not match the SPI show, so we are able to repair that by modifying the /boot/config.txt file (sudo nano /boot/config.txt) and including the next HDMI settings close to the highest:

hdmi_cvt=320 240 60 1 0 0 0

Subsequent, I wanted to make it so the display screen would activate at boot. So following the motive force's README, I edited /and so on/rc.native with sudo nano /and so on/rc.native, and added the next line earlier than the ultimate exit 0 line:

# Allow ILI9341 show driver.
sudo /house/pi/fbcp-ili9341/construct/fbcp-ili9341 &

Then I rebooted the Pi to verify the display screen would come up. And it did, yay! Besides, now I noticed it was upside-down. I edited the boot configuration with sudo nano /boot/config.txt and added the next line alongside the HDMI configuration to rotate the show:


After a reboot, the show was rendering right-side-up.

Notice: Because of the approach the SPI show connection works, you could possibly expertise 'tearing' or different artifacts relying on the Pi mannequin you are utilizing, overclock, and different settings. See the README within the show driver's repo for a lot extra element about the right way to resolve these points when you have them.

Buttons for retrogame

Null 2 right D-pad directional buttons

As steered within the Null 2 information, I used Adafruit's Retro Gaming Guide so as to add software program key management utilizing retrogame:

mkdir ~/Scripts && cd ~/Scripts
curl https://uncooked.githubusercontent.com/adafruit/Raspberry-Pi-Installer-Scripts/grasp/retrogame.sh >retrogame.sh
sudo bash retrogame.sh

When prompted, select choice 1 (we'll override it later), and press enter.

Reboot when prompted, and as soon as rebooted, edit the retrogame config file with sudo nano /boot/retrogame.cfg, and place the contents of the boot/retrogame.cfg file that comes bundled with the opposite Null 2 customized picture sources. Listed below are the related bits from that file:

LEFT      04  # Joypad left
RIGHT     17  # Joypad proper
UP        15  # Joypad up
DOWN      27  # Joypad down
LEFTCTRL  22  # 'A' button
LEFTALT   23  # 'B' button
Z         02  # 'X' button
ENTER     13  # 'Begin' button
SPACE     16  # 'Choose' button
X         03  # 'Y' button
A         06  # 'L' button
S         12  # 'R' button
Y         05  # Exit button

Reboot the Pi after saving that file, and the important thing assignments ought to now be working. The quickest approach to take a look at is to press the system button (the underside left button on the underside of the board) and see if it prints a 'Y' character within the search field. If it does, the button assignments are working—good job!

System management buttons (shutdown and quantity management)

The Null 2 customized picture information docs features a systembuttons.py script. I needed to modify it a bit of to work with Python 3, so here is the most recent model of that file:

You might want to paste the contents of that gist into /house/pi/Scripts/systembuttons.py:

mkdir ~/Scripts
nano ~/Scripts/systembuttons.py
# Paste contents into file

I additionally observed the script makes use of the keyboard Python library, which is not within the default Pi OS set up. So I added it with:

sudo apt replace
sudo apt set up -y python3-pip
sudo pip3 set up keyboard

Then I edited /and so on/rc.native with sudo nano /and so on/rc.native, and added the next line earlier than the ultimate exit 0 line:

# Allow Null 2 system management buttons.
sudo python3 /house/pi/Scripts/systembuttons.py &

To check them, I rebooted, then pressed the system button (the push button alongside the underside left rear of the board) and 'B' (the underside button on the precise directional pad). And the system shut down, yay!

Audio setup for the PCM5102a

Audio control board on Null 2

The Null 2 makes use of a reasonably frequent PCM5102a audio board, and HiFi-Berry helps it natively. All you need to do is edit the boot config file with sudo nano /boot/config.txt and make the next modifications:

# Ensure that this line is commented out (put a '#' in entrance) if it's not already.

# Add this line on the backside of the file.

Then reboot, and examine if the sound card is listed once you run the command aplay -l:

pi@null2:~ $ aplay -l
**** Checklist of PLAYBACK {Hardware} Gadgets ****
card 0: sndrpihifiberry [snd_rpi_hifiberry_dac], machine 0: HifiBerry DAC HiFi pcm5102a-hifi-0 [HifiBerry DAC HiFi pcm5102a-hifi-0]
  Subdevices: 1/1
  Subdevice #0: subdevice #0

To make this the default audio playback machine and allow quantity management, run sudo nano /and so on/asound.conf and paste within the following configuration:

pcm.!default  {
 sort plug
 slave.pcm "speakerphat"

ctl.!default {
 sort hw card 0

pcm.speakerphat {
  sort softvol
  slave.pcm "plughw:0"
  management.title "Grasp"
  management.card 0

Notice: The unique Null 2 picture working on an older model of Pi OS and ALSA was ready to make use of hardware-based quantity management with an easier configuration. However after a number of hours' analysis, I discovered that newer variations require the use of softvol as I've configured above, because the PCM5102A DAC the Null 2 consists of is an older selection that isn't supported for direct {hardware} quantity management anymore.

Reboot once more, and you may take a look at taking part in a WAV file, like so:

aplay /usr/share/sounds/alsa/Front_Center.wav

Assuming you do not have the Null 2's mute swap muted, you need to hear a voice say "Entrance... Middle". And it could be a bit of loud. Ought to've warned you!

To show down the amount, you need to be capable to press 'System' and 'left bumper' on the sting buttons on the Null 2. To show up the amount, you need to press 'System' and 'proper bumper'.

Notice: If the amount controls aren't working, it might be the command within the systembuttons.py script are usually not appropriate to your board. Run amixer and see what the title of the Easy mixer management is. If it is not Grasp, it's essential change that worth within the script to regardless of the title is in your board.

Null 2 Raspberry Pi Zero 2 headphones plugged in for audio

The headphone amp also needs to be working—to make use of it, simply plug in some headphones. The audio system do not routinely swap off although, so you need to manually mute them if you wish to have sound simply coming by the headphones.

RetroPie Settings

Earlier than getting absolutely invested in any of the previous video games I needed to play, I made a decision to spend a couple of minutes customizing the RetroPie setup to my liking.

First, I went into 'ES Themes' within the RetroPie Configuration display screen, and put in the anthonycaccese/tft theme. Then I pressed Begin, then modified to the "TFT" theme in UI Settings > Theme Set.

On my growing old eyes, this theme was much more legible than the default Carbon theme.

Second, I needed cowl artwork when searching video games, so I visited the 'Scraper' within the Foremost Menu (press Begin to entry), and selected to 'Scrape Now'. It makes searching your video games listing so much prettier:

TFT browser theme in RetroPie with scraped game images

Third and eventually, I needed to see what number of FPS I used to be getting taking part in varied video games—I do know previously the Pi Zero was lampooned as a critical retro gaming machine, as a result of it could stutter even on lowly NES titles.

FPS show is a RetroArch choice, so to allow it I went to RetroPie configuration menu, then selected 'RetroArch'. Inside RetroArch's menu, I went to Settings > On-Display screen Show > On-Display screen Notifications > Notification Visibility > Show Framerate, and selected 'ON'. To make the change persist, I went again out to Configuration File > Save Present Configuration.

FPS counter is tiny in RetroPie

Seeing 58-59 FPS in much more complicated NES and Genesis/Megadrive video games makes me fairly assured in saying the Null 2 is much more enjoyable at 60 Hz with the Pi Zero 2!

I am going to speak extra about efficiency in my evaluate on YouTube, however the Zero 2 appears to have the ability to play most NES, SNES, GBA, PS1, Genesis/Megadrive, and even a number of N64 video games with out a lot difficulty.

Making it Fancy

I made a decision to pay to have acrylic laser lower to the Null 2 specs. You'll be able to both select one of many suppliers really useful by Ampersand (I went with RazorLAB), or obtain the recordsdata and make the cuts your self (when you have entry to a laser cutter and acrylic sheet inventory).

Null 2 case acrylic parts

However there's additionally a set of STL files for a 3D printed Null 2 case, which may be had a bit of extra cheaply (although it does not find yourself wanting fairly as good).

In the event you go along with acrylic, the 2 components that might be daunting (and require additional gear) are 'welding' a number of of the components collectively completely, and sanding down the buttons so that they match appropriately.

For the welding, I purchased Weldon #4 with an Applicator Bottle, and my finest recommendation is to deal with the factor like danger-water. Be sure you're in a well-ventilated room, have one thing beneath to soak up any extra that drips out (I discovered it makes an excellent paint remover... oops!), and attempt to 'squirt in' a bit of additional underneath every half—it kinda magically spreads itself in all places, and for those who do not put sufficient underneath the half you are gluing collectively, there shall be little bubbles.

Weldon 4 Acrylic glue placing two parts together on Null 2 case

Additionally, align every thing completely since you get one shot at this course of.

The sanding was a bit of annoying, simply because there was loads of materials to take away to get the buttons to suit appropriately with the rubber pads beneath. I set down a chunk of 120 grit sandpaper and simply went at it with every of the buttons and the D-pad acrylic till they have been skinny sufficient to suit:

Sanding Null 2 acrylic button

Odds and Ends

Just a few random notes about RetroPie:

  • The FPS counter is tiny on the 320x240 show, and I have never discovered a approach to make it bigger.
  • In the event you go into the retroarch in-game menu, you possibly can take screenshots and even make recordings, however the latter can actually have an effect on in-game efficiency. In the event you do that, the recordsdata are saved in a listing underneath /house/pi/.config/retroarch.

Just a few issues I am nonetheless engaged on:

  • Vibrant components of the show flicker throughout heavy processing when the battery is lower than 50%. It will be good if there have been a approach to do away with that sparkle.
  • Overclocking works, however the case does not dump warmth that effectively, so that you begin getting throttled after a couple of minutes of gameplay. I believe it is best to stay on the 1 GHz clock on the inventory Null 2 construct. A heatsink cutout on the again could assist.
  • I attempted getting every thing engaged on 64-bit Pi OS, however bumped into two points: first, RetroPie's supply set up course of had a lot of errors I could not work out. And second, the show driver might or might not work there—yet.
  • The display_rotate=2 choice rotates HDMI and SPI show output; you possibly can really make it so solely the SPI output is rotated for those who change one of many driver choices once you compile it.

Just a few issues I did not significantly like in regards to the Null 2:

  • Sanding the buttons was a bit annoying.
  • Having an analog quantity knob for the built-in audio system can be good. The hotkey technique is a bit annoying and was exhausting to get proper in software program.
  • There is no backlight management, so it's kind of annoying making an attempt to make use of it at evening.
  • There is a obscure warning about not utilizing the machine whereas plugged in and charging, although researching the TP4056 charging board, I discovered blended outcomes as as to if it could shield towards overcurrent to the battery if plugged in and utilizing the machine after the battery was absolutely charged; so I suppose I am going to go together with that and advocate not utilizing it whereas plugged in.


You know the way they are saying it is the journey, not the vacation spot? I believe that is what I've discovered over the course of getting every thing engaged on the Null 2 with the Pi Zero 2 W.

It does not assist that I used to be making an attempt to get model new (and unreleased) {hardware} engaged on a board that was initially constructed for the older Pi Zero! And generally, looking for the precise assist or ask questions was tough too, as a result of I could not simply say "effectively, that does not work as a result of this can be a completely different board..."

However in the long run, this was a enjoyable challenge to construct, and I like how compact and slick the factor appears to be like on my desk. I've had my youngsters try it out and whereas I do not assume it'd final too lengthy of their younger arms, the truth that each single half (perhaps exterior the hard-to-desolder Pi Zero) may be changed with an affordable alternative element I may purchase nearly anyplace makes me completely happy inside.

I might advocate the Null 2 to anybody who actually desires to take possession over their 90s-era Retro gaming handheld construct. If you would like one thing principally pre-made the place you simply slap in a Pi and begin gaming, that is not the package for you!

Proper now the Null 2 is out of stock on Tindie, however supposedly Ampersand is working on another batch now. Hopefully everybody who desires one will be capable to get a package quickly!

Ensure that to subscribe to my YouTube channel so you do not miss my video on the Null 2 Pi 2 construct!

Source link

Leave a Reply

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