Some Game Boy bootleg cartridges made nowadays have no battery in their PCBs. Instead, they use a single Flash ROM that stores both the game and the savegame.
Pirate cartridge sellers patch the ROMs they are going to sell so the games redirect reads/writes calls from/to SRAM and use the Flash ROM instead.
This RGBDS skeleton project allows you to create your own battery-less patches for your Game Boy ROMs, so you can reflash a bootleg cartridge with your favorite game and keep its loading/saving features working.
It's based on BennVennElectronic's tutorial.
All this does is to automate and ease the process by making the most of RGBDS's RGBLINK overlaying features.
Still, Game Boy hardware and debugging knowledge is needed because user will need to find some offsets, free RAM sections, etc, where our new code will be stored.
For now, it's only compatible with WR/AAA/A9 cart types and 64kb flashable sector size. But code should be easily scalable to other types if somebody does the reverse engineer needed for them.
Thanks to BennVennElectronic and Lesserkuma for their help!
rgbds
folder or specify your rgbds folder using RGBDS=../rgbds/ make
roms/"category"/"romname"/"romname".gbc
file. The last folder and the ROM must have the same name.roms/"category"/"romname"/"romname".sav
then it will be included into the batteryless ROM.settings.asm
files to your new roms/"category"/"romname"
directory and carefully edit it, filling all needed offsets and constants for your game.make
.Note: when saving, the game might freeze a few frames. This is normal, it's just the cheap Flash ROM chip doing its magic!
You can find settings.asm
examples for some ROM hacks and translations in the roms/
folder.
Just create a new folder in roms/*/
- if both a settings.asm
and a input.gbc
file are present, it will be build by make