Live demo: running natively in your browser

Game Boy Advance games, recompiled to native code.

GBA Recomp is a static recompiler. It turns the ARM code inside a GBA ROM into LLVM IR and links it into a real executable for desktop, mobile and the Web. There is no emulator loop and no JIT, and a cycle-exact interpreter verifies the result.

game.gba→ARM / Thumb IR→LLVM 23→native · wasm
POWER · RKANOID
GAME BOY ADVANCErecompiled to WebAssembly
←↑↓→D-pad ZA XB ASL / R EnterStart ⌫Select F1Menu

Click the screen to start; sound begins after that click. Rkanoid is a free homebrew breakout game. Its ROM is recompiled ahead of time to about 5 MB of WebAssembly, and saves stay in your browser.

RESULTS

Measured, not estimated.

Every package can run the native code and the reference interpreter side by side and compare registers, cycles and the framebuffer after every frame.

99.9%of executed instructions run as native code in Pokémon LeafGreen
0cycles of drift from the interpreter across 3000 verified frames
~900frames per second headless on an Apple M4, about 15× real time
99.9999%native instructions in the Rkanoid demo, checked in CI on every push

The LeafGreen framebuffer hash matches the mGBA reference. Commercial ROMs are only used locally and are never distributed.

HOW IT WORKS

From ROM to executable in four steps.

One command (gba-recomp bundle) runs the whole pipeline and produces a package with the game embedded.

Profile

The built-in interpreter plays the game, with optional scripted input, and records every ARM/Thumb run it executes, including routines copied to RAM.

Recompile

Each run is lowered to LLVM IR with exact cycle accounting and compiled in parallel shards for the target triple: x86-64, AArch64, ARMv7 or wasm32.

Link

The machine code is linked with gba-native-rt, which provides the bus, PPU, APU, DMA, timers, IRQs, HLE BIOS, saves and the SDL3 frontend.

Verify

--verify-interpreter runs the native build in lockstep with the interpreter. Code that cannot be translated safely falls back to one interpreted step.

FEATURES

More than a translator.

The recompiled package is a complete player with video, audio, input, settings, saves and online play.

Cycle-exact core

An ARM7TDMI interpreter with PPU modes 0–5, sprites, windows, blending and mosaic, PSG and direct sound, DMA, timers, and SRAM/Flash/EEPROM saves.

Native code in RAM too

Routines that games copy to IWRAM/EWRAM are recompiled as well. Content guards check the bytes before native code runs.

Every controller

Keyboard, USB and Bluetooth gamepads, generic joysticks, GPIO buttons on Raspberry Pi and Orange Pi, and an on-screen gamepad for touch screens.

Settings, your way

Video, audio and control settings in an in-game menu, a native macOS menu bar and context menu, or the separate gba-settings app.

Party over WebRTC

Room codes, with signaling hosted inside one player's own game, and text chat over data channels. Voice, shared screens and link cable are planned next.

One-file packages

bundle embeds the ROM and produces a macOS .app, a Linux or Windows folder, an iOS .ipa, an Android APK or a static website.

PLATFORMS

One ROM, eight targets.

CI builds and tests every target on each push. Each status below states what has actually been run.

macOS · Apple Silicon

aarch64-apple-darwinVerified

Played locally and checked against the interpreter in CI.

macOS · Intel

x86_64-apple-darwinVerified in CI

Cross-built and checked against the interpreter under Rosetta 2.

Linux x86-64

x86_64-unknown-linux-gnuVerified in CI

Bundled demo checked against the interpreter, headless.

Raspberry Pi · Orange Pi

aarch64-unknown-linux-gnuVerified in CI

On ARM64 Linux, with GPIO buttons via gpiochip v2.

Windows x86-64

x86_64-pc-windows-msvcVerified in CI

Bundled demo checked against the interpreter on Windows Server 2025.

Web

wasm32-unknown-emscriptenPlayable

The demo at the top of this page, deployed by CI.

iOS · iPadOS

aarch64-apple-iosBuilds in CI

An unsigned .ipa and a simulator build; not yet run on a device.

Android

aarch64-linux-androidBuilds in CI

A debug-signed APK checked with aapt and apksigner; not yet run on a device.

GET STARTED

Recompile your first game.

You need Rust 1.99, the pinned LLVM 23.1.3 build and SDL3. Prebuilt toolchains and demo packages are attached to every release.

  • Without --embed, compile produces a package with no game data, and players bring their own ROM.
  • --profile-input scripts button presses so the profile reaches more code.
  • --target selects any of the eight triples from a single build host.
terminal
# build the toolchain
export LLVM_SYS_231_PREFIX=/path/to/LLVM-23.1.3
cargo build --release -p gba-recomp -p gba-native-rt

# recompile the free demo into one package
target/release/gba-recomp bundle \
  --rom games/rkanoid-v3.00.gba --out out/Rkanoid

# play it (macOS: out/Rkanoid.app)
out/Rkanoid/game

# or check native code against the interpreter
out/Rkanoid/game --headless --frames 1200 --verify-interpreter

# the same game for the Web
target/release/gba-recomp bundle --rom games/rkanoid-v3.00.gba \
  --out out/web --target wasm32-unknown-emscripten