This recompilation is a byproduct of developing gbarecomp — the games are the proving ground, the framework is the goal. These are in-development previews, not finished ports — expect rough edges, and depth will keep landing over months, not days. My time for any one title is limited, so I ask for your patience. Contributions are welcome — testing, issues, and PRs to the game or framework all help and will accelerate this game's polish. More on the why at: Recomp + AI: 5 Months Later »
Static recompilation of Pokémon Emerald (Game Boy Advance) to native PC, built
on the gbarecomp framework.
Its Gen3 siblings live in
FireRedLeafGreenRecomp (FireRed + LeafGreen) and
RubySapphireRecomp (Ruby + Sapphire).
This is a static-recompilation base + runner, not a finished port. Emerald boots through the BIOS intro to the title screen and into gameplay. It is early — not every code path is statically recompiled yet, and content has not been exhaustively tested. (Emerald's RTC and its larger battle/contest engine are the notable deltas from the other Gen3 games.)
It gets better the more you play. Any code path the static recompiler hasn't covered runs through a built-in interpreter the first time it's hit, then is JIT-compiled to native (in-process, no toolchain needed) and remembered on disk — so the next launch runs it natively from the start. Interpreted once, native ever after; coverage grows toward fully-native as the game is played. See How it self-improves.
Native recompiled builds (no emulator), captured running the original ROM.
| Original | Landscape | Portrait |
|---|---|---|
![]() |
![]() |
![]() |
The ROM's ARM7TDMI machine code is statically translated to native C — every
function the game runs becomes a real generated C function. Unlike most recomp
projects, BIOS services and console devices are provided by the shared engine's
native path. A supplied BIOS remains available where required. The rest of the console — the PPU (graphics), APU + M4A sound engine, DMA, timers, the
cartridge flash save chip + RTC, and hardware I/O — is modeled by the gbarecomp
runtime.
Only symbol metadata (function names, addresses, sizes) from the
pret/pokeemerald decompilation enters this
repo — never its C source, build output, or toolchain. The ROM is never
redistributed; you supply your own legally-dumped copy.
| Target | Game | ROM (USA) | SHA-1 |
|---|---|---|---|
EmeraldRecomp |
Pokémon Emerald | USA | f3ae088181bf583e55daf962a92bb46f4f1d07b7 |
The runtime refuses to launch on an unrecognized ROM — the SHA-1 must match.
- Download the latest
EmeraldRecomp-windows-x64zip from Releases and extract it (or build from source — see below). - Run
EmeraldRecomp. - Supply your own legally-obtained Pokémon Emerald (USA) ROM when prompted. The path is cached next to the exe for future launches.
- Press Play in the shared launcher.
Use Saved game on the launch screen to import or export a raw .sav file
with Android's file picker. Quit the game to return to that screen. If setup
is normally skipped, press and hold the app icon and choose Saved game
on launchers that support app shortcuts.
Import accepts a 128 KiB Emerald native save and keeps the previous save as an exportable backup. Execution save states are separate. Save transfers stay locked while the game is running, including while it is backgrounded.
Mods → Gameplay Diagnostics → Record Gameplay controls the bounded local troubleshooting recorder. It starts enabled and remembers your choice independently of adaptive widescreen.
EmeraldRecomp supports two-player Emerald ↔ Emerald netplay with a virtual
Link Cable or Wireless Adapter. Each peer simulates both GBAs and the
local link hardware; recomp-net exchanges controller inputs using delay-sync
or rollback. LAN / Direct IP and Internet lobbies use the same simulation.
- Use matching builds and the supported Emerald USA ROM on both machines.
- Open Netplay, create or join a lobby, and use a separate trainer save for each player.
- The host selects Lobby Settings → Connection type: Link Cable (default) or Wireless Adapter. All players inherit the host's choice.
- Start the session, then use the corresponding upstairs Pokémon Center desk. Wireless Adapter enables the Union Room; the original game's progression and party requirements still apply.
Cable multiplayer has been play-tested. Wireless currently has validated Union Room entry, mutual discovery and contact, deterministic replay, and input netplay under simulated latency/jitter. Full wireless trades/battles and all RFU recovery behavior have not yet been qualified. See the engine's wireless validation and limits.
v0.1.1 binaries include experimental Wireless Adapter Union Room support; v0.1.0 contains cable support only. Merging source does not replace old release downloads. FireRed/LeafGreen/Ruby/Sapphire cross-version linking, larger lobbies and Single-Pak multiboot are future work.
| GBA button | Keyboard |
|---|---|
| D-Pad | Arrow keys |
| A | X |
| B | Z |
| L / R | C / V |
| Start | Enter |
| Select | Right Shift |
Save states: Shift+F1–F9 save to a slot, F1–F9 load it.
Current source uses the shared engine's native default for BIOS services, graphics, audio and translated game code. Unsupported required BIOS services are reported rather than treated as successful no-ops. Native save files and the title's RTC support remain part of the shared runtime contract.
Initialize the pinned engine, front end and their nested dependencies:
git clone --recurse-submodules https://github.com/mstan/EmeraldRecomp.git
cd EmeraldRecompUse Python 3.11+, CMake, Ninja, a C++20 compiler and SDL2/OpenGL development libraries. Windows builds use the MSYS2 MinGW64 toolchain. The engine's shared entry point validates the original inputs and pins, then generates guest code inside the build tree and builds the title:
python gbarecomp/tools/consumer_build.py --project-root . --rom <original.gba> --bios <gba_bios.bin> --build-dir build --profile quick --jobs 2Supply the supported original ROM listed in baserom.md or the title config.
The original file remains unchanged. The engine selects its native execution
and rendering paths by default; LLE is a separate named engine build.
To create a distributable from the default branch, use the shared release build and packager:
python gbarecomp/tools/consumer_build.py --project-root . --rom <original.gba> --bios <gba_bios.bin> --build-dir build-release --profile release --package --jobs 2Packaging checks the release profile and stages the shared runtime, front end,
licenses and title-owned data described by release.json. Original inputs,
ROM-derived source, saves, caches and local paths stay out of the package.
For this project's code covered by the PolyForm Noncommercial License, PERMISSIONS.md grants standing permission for voluntary donations, sponsorships, and advertising revenue, including support for broader development initiatives. Payment must not buy access to the software, games built with it, or their updates, features, or game content, including early access.
Matthew Stanley has authority from the relevant copyright holders to grant these permissions for the project's PolyForm-covered code. Third-party components and code explicitly licensed under other terms retain those terms.
PolyForm Noncommercial 1.0.0 — see LICENSE. Third-party
components retain their own licenses.
This project contains no copyrighted ROM data, no Nintendo BIOS, and no decomp source — only original recompiler/runtime code and symbol metadata. You must supply your own legally-dumped ROM (and BIOS, where the runtime requires one). Pokémon and Emerald are trademarks of Nintendo / Game Freak / The Pokémon Company; this project is an unaffiliated, non-commercial preservation and research effort.
R.A.I.D. — Retro AI Development · a Discord for AI-assisted retro reverse-engineering, decomp & recomp



