gbaSharp is a Game Boy Advance emulator written in C#. The project currently
focuses on compatibility tooling, retail-ROM validation, and a WinForms desktop
frontend for hands-on testing.
- Core tests: 281 passing.
- Curated official boot sweep: 300/300 titles boot in the best-known aligned real-BIOS pass.
- Targeted input slice: 84/84 boot/start/input probes pass in the best-known overlay.
- Deep gameplay confidence is strongest around the Pokemon, Sonic Advance, Mario Kart, Metroid, Castlevania, Wario, Golden Sun, and Advance Wars routes already covered by the route and reference tooling.
See docs/compatibility-sweeps.md and docs/gba-longplay-status.md for the detailed compatibility history and current caveats.
- Windows for the desktop frontend.
- .NET 10 SDK.
- A legally obtained GBA BIOS for real-BIOS testing.
- Local
.gbaROMs. ROMs and generated captures are intentionally not tracked.
dotnet build src\Gba.Desktop\Gba.Desktop.csproj -c Release
dotnet test tests\Gba.Tests\Gba.Tests.csproj -c Release --no-restoreOr run the default local verification gate:
powershell -NoProfile -ExecutionPolicy Bypass -File scripts\run-local-verification.ps1 -NoRestoreUse -IncludeStrictReference and -IncludeHardSoak when the local reference
captures, baselines, BIOS, and curated ROM collection are present and you want a
heavier release-style pass.
Create a desktop publish folder and zip under artifacts:
powershell -NoProfile -ExecutionPolicy Bypass -File scripts\package-desktop.ps1Run the mGBA-first audio route suite:
powershell -NoProfile -ExecutionPolicy Bypass -File scripts\run-audio-accuracy-suite.ps1 -Manifest docs\gba-audio-smoke-routes.csvRun a MAME-backed audio comparison when the local MAME tool is installed under
.research\tools\mame:
powershell -NoProfile -ExecutionPolicy Bypass -File scripts\run-audio-accuracy.ps1 -Rom Ruby.gba -Bios path\to\gba_bios.bin -MameSeconds 5 -SampleRate 48000Launch the WinForms frontend:
dotnet run --project src\Gba.Desktop -c ReleaseOpen a ROM at startup:
dotnet run --project src\Gba.Desktop -c Release -- path\to\game.gbaThe frontend supports:
- BIOS selection and persisted BIOS preference.
- ROM open dialog, drag/drop loading, and recent ROMs.
- Run, pause, reset, single-frame step, and speed controls.
- Audio enable/disable.
- Save export and autosave to the ROM-adjacent
.savpath. - PNG screenshots.
- Status display with title, game code, BIOS state, FPS, frame count, and speed.
Default keyboard mapping:
| GBA | Keyboard |
|---|---|
| A | Z |
| B | X |
| L | A |
| R | S |
| Start | Enter |
| Select | Backspace or Shift |
| D-pad | Arrow keys |
Useful shortcuts:
| Action | Shortcut |
|---|---|
| Open ROM | Ctrl+O |
| Open BIOS | Ctrl+B |
| Write save | Ctrl+S |
| Run/Pause | Space |
| Step one frame | Ctrl+F |
| Reset | F5 |
| Save screenshot | F9 |
Settings are stored under %APPDATA%\gbaSharp\desktop-settings.json.
The CLI is used for compatibility sweeps, frame captures, visual baselines, input-scripted runs, profiling, and reference comparisons:
dotnet run --project src\Gba.Cli -c Release -- compat curated_official_gba --suite boot --bios path\to\gba_bios.binThe scripts in scripts wrap common workflows such as strict reference suite runs, mGBA reference capture comparison, route repeatability, and hard local soaks.