Getting things ready…
Getting things ready…
Section B14 · Emulation · October 2026
A Game Boy Advance with more headroom, rebuilt inside an emulator.
The goal is a custom emulator that lets games and ROM hacks use more hardware than a real Game Boy Advance, with games designed for it. To get there I am rebuilding how the GBA is put together inside an emulator, how it holds memory and runs its processes, opening up the parts that limit it, and then building an SDK that makes ROM hacks for most games easy for anyone.
mGBA is an accurate, widely used Game Boy Advance emulator. This fork adds an opt-in layer on top: a game that declares it needs more can receive extra working RAM, a large read-only content store, and a report of what the PC can spare. Everything else, from ordinary ROMs to the Game Boy side, keeps its standard behaviour.
The motivating idea is a big multi-region game that outgrows a 32 MiB cartridge and 256 KB of work RAM. The first target is smaller and more honest: an original diagnostic ROM that proves each capability before anything is built on top of it.
Granting more memory does not make an old game bigger. The game has to ask for it.
It is GBA-only and opt-in. It does not make existing ROM hacks faster or bigger by itself; their code must target the extension, directly or through the SDK. It keeps the original display and audio, and it does not change the nominal clock of the board.
A Game Boy Advance is an ARM7TDMI processor at about 16.78 MHz, a 240 by 160 screen, and a fixed map of memory. An emulator has to rebuild every piece of that in software, and the memory map is where the limits live.
0x0000000016 KBthe console's built-in boot code0x02000000256 KBthe big, slow work RAM0x0300000032 KBsmall, fast work RAM next to the CPU0x04000000registersvideo, sound, timers, DMA, keys0x050000001 KBthe colours0x0600000096 KBtiles and backgrounds0x070000001 KBthe sprites0x08000000up to 32 MiBthe cartridge, read only0x0E000000up to 64 KBbattery RAM or flashInside mGBA, each of those jobs is its own part: the CPU core, the memory bus, the event scheduler that keeps everything in step, video, audio, timers and DMA. GBA FX leaves that machine alone and adds five carefully placed hooks:
Two controls are kept apart on purpose. The host policy is how much of the PC's RAM and CPU the emulator may use, defaulting to 80% of what is available at launch. The guest grant is the memory and timing profile the game actually sees. Games query what they were given and adapt, rather than assuming a fixed machine.
An enhanced ROM is a conventional GBA boot image followed by an optional content payload and a 64-byte footer. The loader reads the footer from the end of the file before the standard loader can truncate it.
0x00Version10x08Required featuresdetection, host budget, extra RAM, banked content, arithmetic experiment0x10Boot image length + CRC-32the ordinary GBA program, checked0x18Minimum extra RAMup to 16 MiB; the game says what it needs0x1CContent length + CRC-32up to 128 MiB of read-only content0x2CFooter CRC-32so a damaged footer is rejected, not guessed at0x30IdentificationmGBA-FX-DRAFT01, anchored to the end of the fileFilenames, ROM titles, sizes and strings inside the boot code never activate the extension. A recognised footer with bad fields or an unsupported required feature is rejected with a useful message before anything is mapped, and a file without the marker follows the normal rules. Detection state belongs to the loaded core instance, so two emulator instances never share it.
// sketch: anchored to the end of the file, checked before mapping
if (!footerMarkerAtEnd(file)) return loadAsOrdinaryRom(file);
Footer f = readFooter(file); // 64 bytes, little-endian
if (f.version != 1 || f.crc != crc32(f.header)) return reject("bad footer");
if (f.required & ~SUPPORTED_FEATURES) return reject("unsupported feature");
if (f.bootLength + f.contentLength + 64 != file.size) return reject("bounds");
return loadEnhanced(file, f);Extra RAM is a bounded block, tested at 1, 4 and 16 MiB, mapped at a window outside the standard regions. Reads, writes, instruction fetch and block transfers work there, as does running ARM and Thumb code from it. The legacy DMA masks are left alone, so data reaches video and audio memory by CPU copy.
Large content is a read-only payload of up to 128 MiB, reached through a bank-select register and a 16 MiB window, and mapped against the host budget instead of being copied. Because the budget is a ceiling and not an allocation, the emulator does not touch memory it was merely allowed to use. If a game's minimum cannot be met, admission fails with the requested and available amounts.


The scheduler is wired to CPU cycle counters, so changing a frequency constant would silently move video, audio and timers with it. The proof instead keeps board time for every peripheral and gives eligible one-cycle arithmetic in zero-wait IWRAM a half-tick remainder.
On ARM and Thumb loops that completed about 1.91 times as many additions over twelve frames, with matching audio samples and board time within two ticks. Timer IRQ and HALT wake-ups, DMA, event ordering and 32-bit timestamp wrap were tested in controlled cases. It is a proof of a bounded idea, not a general overclock, and it sits behind an explicit build flag, off by default.
Enhanced save states are a separate versioned format that carries the full RAM grant, the arithmetic phase, required capabilities, the content identity and the selected bank. A state is validated before anything is changed, and a failure rolls everything back, so a rejected state can never leave half of a running machine restored. The ordinary state format is unchanged.
Rewind is the expensive part. History is budgeted against the much larger state, reclaimed under memory pressure and visible in the settings, and two shared rewind bugs found along the way were fixed for ordinary games too.
Measured against preserved builds, every-frame rewind capture came out about 9% quicker after a faster CRC, though still only about 38 frames a second in a headless run. Those are host-dependent software-renderer numbers, not pacing guarantees.
The emulator is the foundation. The goal after it is a toolkit that makes writing for this system easy: build a new game, or hack an existing one, without hand-assembling footers and checksums.
One honest note from the plan: existing ROM hacks do not automatically gain new content or use the extra resources. Their code has to target the extension, directly or through the SDK, and the SDK is exactly what is meant to make that approachable.
The CPU cap could not be measured, because an existing external Windows job blocks it, so the project reports a target and does not claim an enforced cap. Automatic CPU calibration, slow-host warnings, sanitizer coverage and frame pacing under a CPU limit are unchecked. Only the Windows Qt desktop frontend is validated, and libretro and video logging reject enhanced ROMs.
The register addresses, the 16 MiB and 128 MiB limits and the footer format are provisional. The SDK and a proper packaged format are separate later work, and a world-scale loading demo is still to be built before any of the limits are frozen.
STACK
Measured from the project's own source: 766 files.
Libraries & tools
Extension by Youbal Lakandri · built on mGBA by its upstream authors · internal prototype, not a release