Jump to content

Game and Watch mod flash with STLink and RetroGo homebrew install

The following is at your own risk. You WILL void your warranty and you risk damaging your handheld permanently.

 

Do not link to, or ask for ROMs, if you want to put ROMs on your G&W you'll need to supply your own and legally own them.

 

 

This guide is for the Game and Watch Mario version, there are small differences with the Zelda version that I will not cover here. You can do this using a Raspberry Pi, but this guide is for a STLink, you can see the Game and Watch backup github below for help with a Raspberry Pi.

 

 

Resources ;

 

Game and Watch backup

https://github.com/ghidraninja/game-and-watch-backup

Discord ; https://discord.gg/rE2nHVAKvn

 

Game and Watch RetroGo

https://github.com/kbeckmann/game-and-watch-retro-go

Discord ; https://discord.gg/vVcwrrHTNJ

 

Game and Watch mods - Reddit

https://www.reddit.com/r/GameAndWatchMods/

---------------------------------------------------------------------------------------------------------------------------

 

 

 

What you'll need ;

 

---------------------------------------------------------------------------------------------------------------------------

 

 

 

Accessing the debug pins.

Spoiler

To flash the Game and Watch, you will need to soldier wires to the Game and Watch motherboard to connect your STlink

 

The connections I did are SWCLK, SWDIO, RST and GND, here is the pinout, here's the connections on mine (sorry for the potato picture quality).

---------------------------------------------------------------------------------------------------------------------------

 

 

 

OS preparation (you can use another Linux distro, Ubuntu 20.04 is what I used so the instructions I will post are for Ubuntu)

 

Bring everything up-to-date (you can skip this if you think it's not needed).

Spoiler

Open a terminal and paste the following command and execute it (if you just installed Ubuntu, it might take a while) ;

sudo apt update && sudo apt upgrade -y

It's recommended to restart after it's done.

 

 

 

Install dependencies

Spoiler

Open a terminal window and type the following commands (everything will be done from the Download folder, you can change that if you want) ;

 

cd Downloads

 

sudo apt-get install binutils-arm-none-eabi python3 python3-pip libhidapi-hidraw0 libftdi1 libftdi1-2 libncurses-dev git

 

wget https://nightly.link/kbeckmann/ubuntu-openocd-git-builder/workflows/docker/master/openocd-git.deb.zip

unzip openocd-git.deb.zip

sudo dpkg -i openocd-git_*_amd64.deb

sudo apt-get -y -f install

 

 

 

Next, go to https://developer.arm.com/tools-and-software/open-source-software/developer-tools/gnu-toolchain/gnu-rm/downloads and download the file "gcc-arm-none-eabi-10.3-2021.10-x86_64-linux.tar.bz2" in the Download folder.

 

 

Once downloaded, in the same terminal window, type the following commands ;

 

sudo tar xjf gcc-arm-none-eabi-your-version.bz2 -C /usr/share/

 

sudo ln -s /usr/share/gcc-arm-none-eabi-your-version/bin/arm-none-eabi-gcc /usr/bin/arm-none-eabi-gcc

sudo ln -s /usr/share/gcc-arm-none-eabi-your-version/bin/arm-none-eabi-g++ /usr/bin/arm-none-eabi-g++

sudo ln -s /usr/share/gcc-arm-none-eabi-your-version/bin/arm-none-eabi-size /usr/bin/arm-none-eabi-size

 

Verify that it worked ;

arm-none-eabi-gcc --version

arm-none-eabi-g++ --version

arm-none-eabi-size --version

 

If not, you did something wrong and need to redo the gcc-arm-none-eabi install.

---------------------------------------------------------------------------------------------------------------------------

 

 

Unlocking the Game and Watch

 

Now onto the flashing, but we first need to unlock the Game and Watch, for that we'll need the Game and Watch backup I linked to in the resources.

 

The Game and Watch needs to be connected to the STLink, the battery needs to be disconnected, the USB-C charger connected, and the Game and Watch needs to be turned on.

 

 

Game and Watch backup ;

Spoiler

 

git clone --recurse-submodules https://github.com/ghidraninja/game-and-watch-backup

 

cd game-and-watch-backup

 

export OPENOCD="/opt/openocd-git/bin/openocd"

 

Now it's time to run the scripts ;

./1_sanity_check.sh stlink mario

 

If it returns "Looks good!" you can continue with the next script, if not, you'll need to figure out what is missing.

 

 

Next script ;

./2_backup_flash.sh stlink mario

You will get a message reminding you the G&W needs to be turned on, and on the time screen, once you have confirmed it's the case, press ENTER.

 

The screen will flash, it's take some time and you should get a confirmation message, if not, you'll need to make sure the connections to the G&W are ok.

 

 

Next script ;

./3_backup_internal_flash.sh stlink mario

YOU NEED TO FOLLOW THE SCRIPT INSTRUCTIONS AND PRESS THE APPROPRIATE BUTTONS WHEN PROMPTED.

 

 

Next script ;

./4_unlock_device.sh stlink mario

Once done, power cycle the G&W as prompted.

 

 

Next script ;

./5_restore.sh stlink mario

Once done, power cycle the G&W as prompted.

---------------------------------------------------------------------------------------------------------------------------

 

 

 

Installing RetroGo on the G&W

 

Once done with the backup, in the same terminal window, type the following commands to start the RetroGo install ;

Spoiler

 

cd ..

 

git clone --recurse-submodules https://github.com/kbeckmann/game-and-watch-retro-go

 

Now that you have RetroGo, this is the time to copy your ROMs into the RetroGo folder (Downloads > game-and-watch-retro-go > roms), the ROMs will be copied when the command make will be run. If you forgot, you can run that command again to simply copy the ROMs to the G&W. The G&W flash drive is only 1MB in size, if you want to change the flash chip, there are instructions and resources on the G&W mods reddit linked in the resource section at the top.

 

 

Now, onto the compiling and flashing RetroGo onto the G&W ;

 

cd game-and-watch-retro-go

 

export ADAPTER=stlink

 

python3 -m pip install -r requirements.txt

 

make -j8 flash

 

 

And you're done, power cycle the G&W, unplug the STLink and screw the back cover on and enjoy! 🙂

If you need help with your forum account, please use the Forum Support form !

Link to comment
Share on other sites

Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

×