Retro-Go is a firmware to play retro games on ESP32-based devices (officially supported are ODROID-GO and MRGC-G32). The project consists of a launcher and half a dozen applications that have been heavily optimized to reduce their cpu, memory, and flash needs without reducing compatibility!
retro-go_1.x_odroid-go.fwfrom the release page and copy it to
/odroid/firmwareon your sdcard.
retro-go_1.x_mrgc-g32.fwfrom the release page and copy it to
/espgbc/firmwareon your sdcard.
This method is intended to be used when .fw support isn't available (when porting to a new device) or undesirable (devices with less than 4MB of flash).
esptool.py -b 921600 write_flash 0x0 retro-go_*.img
Game covers should be placed in the
romart folder at the base of your sd card. You can obtain a pre-made pack from
this repository or from the release page. Retro-Go is also compatible with the older Go-Play romart pack.
You can use one of two naming schemes:
myrom.nes, the cover file will be
/romart/nes/myrom.nes.png(notice the inclusion of the rom extension).
Retro-Go typically detects and resolves application crashes and freezes automatically. However, if you do
get stuck in a boot loop, you can hold
DOWN while powering up the device to return to the launcher.
The maximum fill rate of the LCD is ~30fps. To work around that limitation, retro-go implements a partial
update mode that refreshes only the portions of the screen that have changed. This process works very well at
reducing tearing and improving animations smoothness. However if you notice glitches or stuttering you can try
Update: Full in the options.
The volume isn't correctly attenuated on the GO, resulting in upper volume levels that are too loud and
lower levels that are distorted due to DAC resolution. A quick way to improve the audio is to cut one
of the speaker wire and add a
33 Ohm (or thereabout) resistor in series. Soldering is better but not
required, twisting the wires tightly will work just fine.
A more involved solution can be seen here.
In Retro-Go, save states will provide you with the best and most reliable save experience. That being said, please read on if you need or want SRAM saves. The SRAM format is compatible with VisualBoyAdvance so it may be used to import or export saves.
On real hardware, Game Boy games save their state to a battery-backed SRAM chip in the cartridge. A typical emulator on the deskop would save the SRAM to disk periodically or when leaving the emulator, and reload it when you restart the game. This isn't possible on the Odroid-GO because we can't detect when the device is about to be powered down and we can't save too often because it causes stuttering. That is why the auto save delay is configurable (disabled by default) and pausing the emulation (opening a menu) will also save to disk if needed. The SRAM file is then reloaded on startup (unless a save state loading was requested via "Resume").
Some emulators support loading a BIOS. The files should be placed as follows:
Note: Versions 4.2 and 4.3 will also work but there are unresolved performance issues at this time.
Patching esp-idf may be required for full functionality. Patches are located in
tools/patches and can be applied to your global esp-idf installation, they will not break your other projects/devices.
sdcard-fix: This patch is mandatory for the ODROID-GO (and clones).
panic-hook: This is to help users report bugs, see
Capturing crash logsbelow for more details. The patch is optional but recommended.
enable-exfat: Enable exFAT support. I don't recommended it but it works if you need it.
./rg_tool.py release(clean build)
./rg_tool.py release(clean build)
For a smaller build you can also specify which apps you want, for example the launcher + nes + gameboy only:
./rg_tool.py build-fw launcher nofrendo-go gnuboy-go
It would be tedious to build, move to SD, and flash a full .fw all the time during development. Instead you can:
./rg_tool.py --port=COM3 flash nofrendo-go
./rg_tool.py --port=COM3 monitor nofrendo-go
./rg_tool.py --port=COM3 run nofrendo-go
rg_tool.py supports a few environment variables if you want to avoid passing flags all the time:
All images used by the launcher (headers, logos) are located in
launcher/images. If you edit them you must run the
launcher/gen_images.py script to regenerate
images.c. Magenta (rgb(255, 0, 255) / 0xF81F) is used as the transparency colour.
Fonts are found in
components/retro-go/fonts. There are basic instructions in
fonts.h on how to add fonts.
In short you need to generate a font.c file and add it to fonts.h. It'll try to add better instructions soon...
When a panic occurs, Retro-Go has the ability to save debugging information to
/sd/crash.log. This provides users with a simple way of recovering a backtrace (and often more) without having to install drivers and serial console software. A weak hook is installed into esp-idf panic's putchar, allowing us to save each chars in RTC RAM. Then, after the system resets, we can move that data to the sd card. You will find a small esp-idf patch to enable this feature in tools/patches.
I don't want to maintain non-ESP32 ports in this repository but let me know if I can make small changes to make your own port easier! The absolute minimum requirements for Retro-Go are roughly:
Whilst all applications were heavily modified or even redesigned for our constrained needs, special care is taken to keep Retro-Go and ESP32-specific code exclusively in their port file (main.c). This makes reusing them in your own codebase very easy!
Everything in this project is licensed under the GPLv2 license with the exception of the following components: