I decided to mod my Zelda Nintendo Game & Watch. Why?
I wanted to play Pokémon games on the go while taking advantage of the GNW's massive 6-8 hours of battery life, as well as its quick resume functionality.
I already modded the GNW yesterday using AI and about 8 hours of my time. Because of some bugs, which may have been caused by mindlessly copying and pasting every command the AI printed out, I am going to redo the entire process of flashing the firmware and emulator and document everything along the way.
PLEASE do not use this repo as a guide for modding a GNW yourself. I already messed up my device on the first attempt by bricking the default firmware before I was able to back it up.
I am using a Raspberry Pi Zero W (the old version). With its single core, it's not the fastest machine for compiling C code, but given enough time, it works well enough. I set it up with the 32-bit Raspberry Pi OS Lite image and enabled SSH.
My RPI0 is no longer being used and has been replaced by my RPI4 (8 GB). The RPI0 crashed too many times during package installations and was generally not fun to work with because of its limited performance.
The RPI4 might be a bit overkill, but it should help later when building packages.
I installed Raspberry Pi OS Lite (64-bit), set up Wi-Fi, and enabled password-based SSH since this Pi will not be running any important services.
First, let's update the Pi:
sudo apt update && sudo apt upgrade -yNext, I check the installed Python version. According to the GNWManager installation guide, we need Python >= 3.9.
python --versionThis shows that version 3.13.5 is already preinstalled.
Image source: https://pypi.org/project/gnwmanager/
I own the Zelda version. As you can see, the pin layout is the same. The only difference is that the Zelda version comes with 4 MB of available storage, while the Mario version only has 1 MB.
I soldered two GPIO wires to the SWDIO and SWCLK pads without any issues. Unfortunately, I accidentally destroyed the ground pad on the debug header, so I ended up soldering the ground wire directly to the USB-C port instead.
We need GNWManager because it provides a lot of useful tools, such as flashing the GNW's memory banks and unlocking the bootloader.
SSH into the programmer.
First, install pipx:
sudo apt install pipx -y(pipx is basically pip with built-in virtual environments for Python applications. It does not replace pip.)
After that:
pipx install gnwmanagerTo add GNWManager to the system PATH:
pipx ensurepathThen log out and back in.
I think OpenOCD is mainly used to unlock the GNW's bootloader, but we need to install it because GNWManager depends on it:
gnwmanager install openocdRun:
gnwmanager infoIf the following message appears, the installation was successful.
The error is expected because the Game & Watch is not connected to the Pi yet.
Connect your GNW to the GPIO pins on your Raspberry Pi as shown in the soldering diagram.
Then either reconnect the battery or power the GNW via USB-C.
If you get weird errors during any of the next steps, check whether the screen is on. The GNW needs to be powered on for most of this process.
Make sure gpiod is installed.
When I run:
gnwmanager infoI still get the same error as before.
Running:
GNWMANAGER_VERBOSITY=debug gnwmanager infoproduces the following error:
OpenOCD couldn't find the GPIO pins using what I believe is a special sysfsgpio configuration.
Using:
ls /usr/share/openocd/scripts/interface/I can see that sysfsgpio-raspberrypi.cfg exists.
From my first attempt, I remembered that I actually needed to use raspberrypi-swd.cfg.
This suggested that I had to define the interface configuration manually:
openocd -f interface/raspberrypi-swd.cfgHowever, OpenOCD also needed a target configuration, so I tried:
openocd -f interface/raspberrypi-swd.cfg -c "transport select swd"This still wasn't enough to connect to the GNW.
Through trial and error, I discovered that I also needed:
openocd -f interface/raspberrypi-swd.cfg -c "transport select swd" -f target/stm32h7x.cfgPlease don't ask me what exactly stm32h7x.cfg is. My best guess is that it's a configuration file for the GNW's CPU.
After running this command, I was finally able to communicate directly with the GNW.
As you can see, the CPU is detected correctly:
Cortex-M7 r1p1 processor detected
and the connection is ready to use:
Examination succeeded
Now GNWManager has to be configured accordingly.
I found that pipx stored GNWManager's OpenOCD data in:
.local/share/pipx/venvs/gnwmanager/lib/python3.13/site-packages/gnwmanager/ocdbackend/
Inside:
openocd_backend.py
I found the Raspberry Pi interface settings and changed them to:
cmd = base_cmd.copy()
cmd.extend(["-c", "adapter speed 1000"])
cmd.extend(["-f", "interface/raspberrypi-swd.cfg"])
cmd.extend(["-c", "transport select swd"])
cmd.extend(["-f", "target/stm32h7x.cfg"])
yield "rpi-gpio", cmdFile: openocd_backend.py
After that:
GNWMANAGER_VERBOSITY=debug gnwmanager infofinally produced the expected output.
I already completed this step, but normally you should now run:
gnwmanager unlockand store the generated backup files in a safe place.
Now we are going to install Retro-Go as our firmware since it provides the emulators we need.
I am not promoting or encouraging game piracy. Please obtain your game backups legally.
Clone the Retro-Go repository along with its submodules:
git clone --recurse-submodules https://github.com/sylverb/game-and-watch-retro-go -b filesystem_wipThis branch prevents unused emulators from being compiled every time, which saves both storage space and build time.
I first had to install Git:
sudo apt install gitEnter the project directory:
cd game-and-watch-retro-goInstall pip:
sudo apt install python3-pip -yInstall venv:
sudo apt install python3-venv -yCreate a virtual environment:
python3 -m venv venvActivate it:
source venv/bin/activate(Use deactivate to leave it.)
Install the requirements:
python3 -m pip install -r requirements.txtInstall the ARM GCC toolchain (version 10 or newer):
sudo apt install gcc-arm-none-eabiNow add your ROMs to Retro-Go.
The Mario version has 1 MB of external storage, while the Zelda version has 4 MB. If you want to store multiple games, you'll probably need to research compression options.
Stay inside your Retro-Go virtual environment.
I had to reset my flash memory with:
gnwmanager erase allbecause I ran into storage-related issues.
Build the firmware:
make cleanmake -j4 GNW_TARGET=zeldaZelda Theme
or
make -j4 GNW_TARGET=marioMario Theme
or
make -j4 EXTFLASH_SIZE_MB=4Mario Theme on Zelda Console(Expanded storage capacity)
Leave the virtual environment:
deactivateFlash the firmware:
gnwmanager flash bank1 build/gw_retro_go_intflash.binFlash the game storage:
gnwmanager flash ext build/gw_retro_go_extflash.bin- SD card slot and support
- Larger flash chips (up to 64 MB)
- Homebrew support
- Programming the GNW via the USB-C port
- Cover art and custom UI designs




