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!
- Nintendo: NES, SNES (slow), Gameboy, Gameboy Color, Game & Watch
- Sega: SG-1000, Master System, Mega Drive / Genesis, Game Gear
- Coleco: Colecovision
- NEC: PC Engine
- Atari: Lynx
- Others: DOOM (including mods!)
- In-game menu
- Favorites and recently played
- GB color palettes, RTC adjust and save
- NES color palettes, PAL roms, NSF support
- More emulators and applications
- Scaling and filtering options
- Better performance and compatibility
- Turbo Speed/Fast forward
- Customizable launcher
- Cover art and save state previews
- Multiple save slots per game
- Wifi file manager
- And more!
- Download
retro-go_1.x_odroid-go.fw
from the release page and copy it to/odroid/firmware
on your sdcard. - Power up the device while holding down B.
- Select retro-go in the files list and flash it.
- Download
retro-go_1.x_mrgc-g32.fw
from the release page and copy it to/espgbc/firmware
on your sdcard. - Power up the device while holding down MENU (the volume knob).
- Select retro-go in the files list and flash it.
This method is intended to be used when .fw support isn't available (when porting to a new device) or undesirable (devices with smaller flash).
- Build a .img file (refer to Building Retro-Go below)
- Flash the image:
esptool.py write_flash --flash_size detect 0x0 retro-go_*.img
Note: Your particular device may require extra steps (like holding a button during power up), different esptool flags, or modifying base.sdkconfig.
Game covers should be placed in the romart
folder at the base of your sd card. You can obtain a pre-made pack here. Retro-Go is also compatible with the older Go-Play romart pack.
You can add missing cover art by creating a PNG image (160x168, 8bit) named according to the following scheme:
/romart/nes/A/ABCDE123.png
where nes
is the same as the rom folder, and ABCDE123
is the CRC32 of the game
(press A -> Properties in the launcher to find it).
Some emulators support loading a BIOS. The files should be placed as follows:
- GB:
/retro-go/bios/gb_bios.bin
- GBC:
/retro-go/bios/gbc_bios.bin
- FDS:
/retro-go/bios/fds_bios.bin
The roms must be packed with LCD-Game-Shrinker and a tutorial can be found here.
To use wifi you will need to create a /retro-go/config/wifi.json
config file. Its content should look like this:
{
"ssid": "my-network",
"password": "my-password"
}
Multiple networks can be defined using the following format (then selectable in the Options menu):
{
"ssid0": "my-network",
"password0": "my-password",
"ssid1": "my-network",
"password1": "my-password",
"ssid2": "my-network",
"password2": "my-password"
}
Time synchronization happens in the launcher immediately after a successful connection to the network.
This is done via NTP by contacting pool.ntp.org
and cannot be disabled at this time.
Timezone can be configured in the launcher's options menu.
You can find the IP of your device in the about menu of retro-go. Then on your PC navigate to http://192.168.x.x/ to access the file manager.
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.
Retro-Go uses partial screen updating to achieve a higher framerate and reduce tearing. This method isn't
perfect however, if you notice display issues or stuttering you can try changing the Update
option.
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.
You can configure automatic SRAM saving in the options menu. A longer delay will reduce stuttering at the cost of losing data when powering down too quickly. Also note that when resuming a game, Retro-Go will give priority to a save state if present.
You will need a working installation of esp-idf. Only versions 4.1 to 4.4 are supported. Support for 5.0 is coming soon.
Note: As of retro-go 1.35, I use 4.3.3. Version 4.1.x was used for 1.20 to 1.34 versions.
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, seeCapturing crash logs
below 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.
- Generate a .fw file to be installed with odroid-go-firmware (SD Card):
./rg_tool.py build-fw
or./rg_tool.py release
(clean build) - Generate a .img to be flashed with esptool.py (Serial):
./rg_tool.py build-img
or./rg_tool.py release
(clean build)
For a smaller build you can also specify which apps you want, for example the launcher + DOOM only:
./rg_tool.py build-fw launcher prboom-go
It would be tedious to build, move to SD, and flash a full .fw all the time during development. Instead you can:
- Flash:
./rg_tool.py --port=COM3 flash prboom-go
- Monitor:
./rg_tool.py --port=COM3 monitor prboom-go
- Flash then monitor:
./rg_tool.py --port=COM3 run prboom-go
rg_tool.py supports a few environment variables if you want to avoid passing flags all the time:
RG_TOOL_TARGET
represents --targetRG_TOOL_BAUD
represents --baudRG_TOOL_PORT
represents --port
Running ./rg_tool.py ...
on Windows might invoke the wrong Python interpreter (causing the build to fail)
or even do nothing at all. In such cases you should use python rg_tool.py ...
instead.
All images used by the launcher (headers, logos) are located in launcher/main/images
. If you edit them you must run the launcher/main/gen_images.py
script to regenerate images.c
. Magenta (rgb(255, 0, 255) / 0xF81F) is used as the transparency colour.
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.
To resolve the backtrace you will need the application's elf file. If lost, you can recreate it by building the app again using the same esp-idf and retro-go versions. Then you can run xtensa-esp32-elf-addr2line -ifCe app-name/build/app-name.elf
.
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:
- Processor: 200Mhz 32bit little-endian
- Memory: 2MB
- Compiler: C99 (and C++03 for handy-go)
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!
- The design of the launcher was inspired (copied) from pelle7's go-emu.
- The NES/GBC/SMS emulators and base library were originally from the "Triforce" fork of the official Go-Play firmware by crashoverride, Nemo1984, and many others.
- PCE-GO is a fork of HuExpress and pelle7's port was used as reference.
- The Lynx emulator is a port of libretro-handy.
- The SNES emulator is a port of Snes9x 2005.
- The DOOM engine is a port of PrBoom 2.5.0.
- The Genesis emulator is a port of Gwenesis by bzhxx.
- The Game & Watch emulator is a port of lcd-game-emulator by bzhxx.
- PNG support is provided by lodepng.
- PCE cover art is from Christian_Haitian.
- Some icons from Rokey.
- Background images from es-theme-gbz35.
- Special thanks to RGHandhelds and MyRetroGamecase for sending me a G32 device.
- The ODROID-GO community for encouraging the development of retro-go!
Everything in this project is licensed under the GPLv2 license with the exception of the following components:
- components/retro-go (Retro-Go's framework, zlib)
- handy-go/components/handy (Lynx emulator, zlib)