kyannon/gba-ds
About
Dual-screen GBA for your Android or Linux emulation handheld.
Games & EmulationMeasured star growth
- in 24h
- +4
- in 7 days
- Collecting history
- in 15 days
- Collecting history
- in 1 month
- Collecting history
Net star changes over overlapping periods, not daily totals. Missing measurements are left blank. Stars measure attention, not software quality.
README.md
OriginalGBA DS

A Game Boy Advance emulator for dual-screen handhelds (built for the Anbernic RG DS Plus and tested on it with BananaOS; it also runs on ROCKNIX, Android and other systems). The game runs on one screen, and the game's own map stays up on the other screen and keeps itself current as you explore, the way the DS Castlevanias work.
The idea here is "what if the Game Boy Advance had a second screen" -- part of what this means is that, at least for now, neither screen is treated like a touchscreen. Instead the secondary screen is used similarly to how the DS Castlevania games use it -- displaying maps or other secondary information to make the gameplay experience a little more pleasant on a device with the space to accommodate it. (This whole project was inspired by playing through all the DS Castlevania games and then feeling a little sad about the prospect of going back in time to the GBA games...)
Stacked screens, pixel-perfect scaling, LCD grid on.
GBA DS supports 91 games, with their regional releases and some romhacks of them: see Supported games in the wiki for the list and what each one shows on the second screen. Any other GBA game also runs; it just plays on one screen. So do Game Boy and Game Boy Color games (see Game Boy games). Romhacks and other patches (.ips, .ups, .bps, .xdelta) can be switched on for each game in the pause menu (Extras → Patches).
Documentation is in the wiki: Playing · Supported games · Game Boy games · Overlays · Settings · Troubleshooting · Adding second-screen compatibility for a game · Philosophy
How it works
Emulation is libmgba. GBA DS runs a second, silent copy of the emulator next to the real one. About every second (map_interval in gba-ds.cfg), and right after each room transition (detected as a fade to black), it does the following:
- It copies the live game's state into the silent copy. The game you're playing is never paused or touched.
- It presses the map button there, waits for the map screen to appear and settle, then records a short loop of frames so the blinking or pulsing player marker still animates.
- It checks the result two ways before showing it: a memory flag that is set only while the map screen is open, and fixed pixels of the map screen's frame or background. Title screens, cutscenes, menus, and fades are rejected, and the previous map stays up.
You see the real in-game map with every detail the game draws (explored rooms, save and warp rooms, completion %, area names) at 4× integer scale. Circle of the Moon's map screen has no completion rate, so GBA DS copies the percentage shown after "RATE" on the game's pause screen onto the map, in the top-right corner, which stays clear of rooms even on a fully explored castle (the bottom-right corner is the fallback).
Games without a map use the second screen in other ways:
- Mario Kart: Super Circuit draws each frame twice: once without the HUD for the game screen, and once with only the HUD (coins, laps, time, the top four, the course map) for the second screen, so nothing behind the HUD is lost. The item box and your place are put back in the game screen's corners, and the course map is drawn twice as big over a dimmed picture of the course's scenery.
- Tony Hawk's Pro Skater 2 copies the goal sheet for the current run to the second screen when the game shows it, and keeps it there while you skate.
Until there's something to show, the second screen shows the game's logo, extracted from the ROM in the background the first time a game appears in the list.
Install
Download the latest release from the Releases page, then follow the guide for your system:
- ROCKNIX (stock ROCKNIX or ROCKNIXDS): unzip
gba-ds-v…-linux-aarch64.zipinto/storage/roms/ports/and start GBA DS from Ports. The guide also covers the Ports icon, starting games from EmulationStation's Game Boy Advance list, and upgrading. - BananaOS: the same zip, unzipped into the card's
roms/ports; games inroms/gba. - Armada OS (the AYN Thor's own system, experimental): in Game Mode the second screen goes on the bottom panel, with its touchscreen.
- Stock Linux OS (the RG DS Plus's own system, experimental): the same zip, unzipped into the card's
Portsfolder; games inRoms/GBA. - Android (GammaOS): install
gba-ds-v…-android.apk, allow All files access, and put your ROMs inROMs/gba. To start games from GammaOS, Daijisho, ES-DE or another frontend, see Launching from Android frontends. - In your web browser (beta): choose a GBA game and play it with its second screen on a computer, a tablet or a phone, with nothing to install. Your games and saves stay on your device.
Building
On an x86_64 Linux host with git, cmake, make, and zip, run:
scripts/build-rocknix.sh # -> dist/gba-ds-v<VERSION>-linux-aarch64.zip
The script fetches a GCC aarch64 toolchain, mGBA (pinned commit), and SDL2 into deps/.
Dev builds (a -dev VERSION) also carry gba-ds/web/gba-ds.wasm, GBA DS compiled to WebAssembly by scripts/build-web.sh (needs clang, wasm-ld, llvm-ar, cmake and git, and the mGBA and SDL2 sources in deps/ from scripts/setup-host.sh or scripts/build-rocknix.sh; it builds binaryen's wasm-opt the first time). Dropping such a zip on the GBA DS tab of the State Saver tool (tools/statesaver/) runs that build in a browser, both screens at default settings, for testing before it goes on a device.
To build for the host so you can develop and test (needs libpng-dev too):
scripts/setup-host.sh # first time: mGBA and SDL2 into deps/, then builds
make && make tools # afterwards: build/host/gba-ds, build/host/harness
The Android app, scripts/build-android.sh (-> dist/gba-ds-v<VERSION>-android.apk), needs the Android SDK and NDK, so it runs on GitHub Actions (.github/workflows/android.yml; the APK is in the run's artifacts). The web player, scripts/build-web-player.sh (-> build/web-player/), puts the web build in a page you can open in a browser; GitHub Pages publishes it from main.
Run it headless and drive it from a script (button combos, HOME, TAP:x,y, SHOT:file.bmp, QUIT; see --help):
SDL_VIDEODRIVER=offscreen SDL_AUDIODRIVER=dummy GBADS_WINDOW=640x960 \
build/host/gba-ds --rom-dir=roms --state-dir=/tmp/st --input-script=test.txt
The libretro core, gba_ds_libretro.so (discussion #75), plays a game with its second screen in RetroArch: in RetroArch's views where it has them (stacked, side by side, a window or a display each), else under the game in one frame. It builds with an mGBA of its own (on Android, the APK's), for the desktop (build/host/, with its test host; make core-check tests it), ROCKNIX (build/aarch64-linux-gnu/, with the toolchain scripts/build-rocknix.sh fetches) or Android (build/android-arm64-v8a/, with an NDK in ANDROID_NDK_HOME); docs/LIBRETRO.md has the rest. Releases carry it ready-built for each platform (scripts/package-libretro.sh; players' guide: RetroArch core).
scripts/build-libretro.sh host|aarch64|android
To add second-screen support for another game, see Adding second-screen compatibility for a game, and Philosophy for what should go on the second screen.
AI Disclosure
GBA DS is written almost entirely by AI. The code is written by Claude, Anthropic's AI model, working in Claude Code sessions, and so are the documentation, the changelog and the commit messages. I decide what gets built and how it should behave, and I test it.
How a change gets made
- I ask for something, like a new game, a bug fix or a change to how something looks or feels. I usually include save states, screenshots or photos of the device showing what I mean.
- Claude writes the change and checks it on a desktop build before I see it. GBA DS can run without a screen and play scripted button presses from a save state, so Claude takes screenshots of both screens and looks at them before sending me anything. For new games it also uses a test harness that steps the emulator frame by frame and reads the game's memory.
- I test every build on real hardware. That's an Anbernic RG DS Plus on BananaOS, my main test setup; ROCKNIX and Android (GammaOS) on the same device get tried now and then. Nothing goes into a release until I've played it on the device and confirmed it works and that what already worked still does. When something's wrong, I send photos or screenshots back and we go around again. Some changes take several rounds before they're right.
- Releases are my call. I decide when a version is ready and create each GitHub release myself. The ROCKNIX zip is built from a fresh copy of the release code. The Android APK is built and signed by GitHub Actions, not on anyone's computer.
What you can see in the history: since October 16, 2026, each commit shows "kyannon authored and Claude committed", with a Verified badge. "Authored" means I asked for and approved the change; "committed" means Claude wrote it. Earlier commits show me alone, but they were made the same way.
What isn't AI-generated: the game logos and second-screen art are extracted from your own ROMs while the app runs, not drawn by AI or shipped with the app. Emulation itself is mGBA's, a long-established, human-written emulator, which GBA DS builds on.
What this means for you: I can't promise there are no bugs, but every feature in a release has been used on the device it was made for. A feature that can't be tested on my hardware is labeled experimental (for example, starting games from some Android frontends). If something doesn't work for you, please open an issue; it gets tested on hardware the same way.
Not affiliated with Nintendo
GBA DS is an independent project. It is not affiliated with, endorsed by or sponsored by Nintendo, or by Anbernic, AYN, Retroid or any other device maker. Game Boy Advance, Nintendo DS and the names of the games are trademarks of their owners, used here only to say what GBA DS runs. The pictures show games running in GBA DS; the handhelds in them are generic drawings, not real products.
GBA DS includes no games, BIOS files or other copyrighted game data. Use your own legally obtained copies of your games.
Licence
GBA DS is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License, version 3, as published by the Free Software Foundation. It is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
The parts of GBA DS made by others keep their own licences, all compatible with the GPL:
What GBA DS sends over the network and keeps, and everything it is built from: the wiki's Privacy and Licenses pages (wiki/Privacy.md, wiki/Licenses.md).
GBA DS statically links libmgba, which is © Jeffrey Pfau and licensed under MPL-2.0. The mGBA source is at https://github.com/mgba-emu/mgba (pinned commit in scripts/mgba-options.sh).
The interface text is set in Jost (© The Jost Project Authors), bundled under the SIL Open Font License 1.1 (assets/fonts/Jost-OFL.txt), and drawn with stb_truetype (public domain).
RetroAchievements support uses rcheevos (© RetroAchievements, MIT licence), vendored in third_party/rcheevos. WebP logos are read with libwebp's decoder (© Google Inc., BSD licence), vendored in third_party/libwebp.
Explore related projects
Loading…