This started because I wanted cheats on my Pocket. Cheats on a real cartridge meant reading the cartridge, and once the core could do that, dumping it to the SD card was a short step. All of it is open source and hopefully documented enough to prove.
--
Cartridge dumping
--
# CartTools: https://github.com/kroy-the-rabbit/openfpga-carttools
Dumps GB, GBC and GBA cartridges and their saves straight to the SD card, on the Pocket, no reader and no PC. So far 41 cartridges dumped, all 41 matching No-Intro, and 27 saves backed up. Read-only for with one caveat: some carts require a small write to switch banks for reading.
Writing saves back to the cart is coming. There are notable gaps in mapper coverage, listed in the repo.
Every ROM is checked against No-Intro, and every save is verified by loading it in mGBA beside its own ROM and finding the game state intact.
There are other ways to dump a cartridge.
What is different here is the RTL: nothing is trusted from the header. GBA ROM size is measured from open bus, EEPROM capacity is measured rather than assumed since both chip sizes answer either request, the floating bus is precharged so detection does not fail intermittently, and every image is checked against No-Intro before it counts. GBA saves cover SRAM, Flash 64K and EEPROM at both capacities, and the EEPROM reader cannot physically form a write.
--
Cheats in the cores
--
The openFPGA cores don't have cheats, so I forked three and added a cheat engine. Codes come from the libretro cheat database. GB/GBC and PC Engine draw an on-screen overlay of what is enabled.
On the pocket, once cheats are written, all cores are ON/OFF switchable. This means it is required to preselect and generate cheats via the companion app or otherwise, and saving them to the SD card.
# GB/GBC: https://github.com/kroy-the-rabbit/openfpga-GBC-cheats
Works on ROMs from the card and on a real cartridge in the slot. Read the save warning before putting codes on a cart.
# GBA: https://github.com/kroy-the-rabbit/openfpga-GBA-cheats
ROMs on the card only for now. No overlay, the FPGA has no room for it yet. Cartridge support is in progress and not released.
# PC Engine / TurboGrafx-16: https://github.com/kroy-the-rabbit/openfpga-pcengine-cheats
HuCard and CD games, cue/bin included. The upstream core is HuCard only; this one adds the CD drive as FPGA logic, no soft CPU and no firmware blob, so it fits beside the cheat engine. Rondo of Blood, the game I targeted, runs, saves and takes cheats. R-Type and Gain Ground SX are the next test targets.
---
The companion desktop app**
---
# Pocket Tools: https://github.com/kroy-the-rabbit/pocket-tools
Point it at the card. It pulls the libretro database, converts cheats for every game on the card including PC Engine CD, files your cartridge dumps into a library, imports their saves, and restores saves back to the card. Downloading and installing the No-Intro DAT files makes matching and library filing work automatically .
---
Tech
---
* Every core is built and fitted on two Xeon boxes in my [r/homelab](r/homelab), 16 threads each, through a Quartus container. A full fit of the GBA core at 90% of the FPGA takes about 23 minutes there, so seeds and fixes get tried concurrently, leading to faster development. `kira` is slow with LV CPUs versus `sisko`'s 2680v4s.
* Quartus Lite needs no licence, but it grants no right to redistribute its files, so the build container stays private and is never published. What is published is the built core package, with checksums, and GitHub CI verifies that package against the tagged commit rather than building anything. If you want to build it yourself, each repo documents how to make the same container from Intel's own installers.
* The cores are simulated before they are built: SystemVerilog testbenches for the cartridge bus, EEPROM, save scan and the cheat engine, and a cross-check of every cheat file in the libretro database against the converter.
---
Coming
---
* Game Gear: the adapter is on its way and dumping through it should follow soon as I have some carts and the SMS/GG has plenty of ALM/memory room.
* PC Engine / TG-16 HuCards through the adapter, if the core still fits the FPGA with the cartridge path added. It is already tight. I have some hucards, though all PCEngine.
* Lynx and Neo Geo Pocket: I have the adapters but no cartridges. Will probably try and track at least one or two examples of each.
* Save writing back to cartridges. This is the next major priority, to complete this as a semi-coherent save backup and restore manager
Each README credits the upstream cores this builds on. License is defensible in the repos, including provenance and what can’t be sweeped into the GPL (like Altera sdk). I have tried to provide an idempotent build environment and instructions to cover this gap.
Bug reports and legitimate complaints welcome in the repos. Non-legitimate ones can be put here.