[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"project-109952":3},{"id":4,"name":5,"fullName":6,"owner":7,"repo":5,"description":8,"homepage":9,"htmlUrl":10,"language":11,"languages":10,"totalLinesOfCode":10,"stars":12,"forks":13,"watchers":14,"openIssues":15,"contributorsCount":16,"subscribersCount":16,"size":16,"stars1d":17,"stars7d":18,"stars30d":19,"stars90d":16,"forks30d":16,"starsTrendScore":20,"compositeScore":21,"rankGlobal":10,"rankLanguage":10,"license":22,"archived":23,"fork":23,"defaultBranch":24,"hasWiki":25,"hasPages":23,"topics":26,"createdAt":10,"pushedAt":27,"updatedAt":28,"readmeContent":29,"aiSummary":30,"trendingCount":16,"starSnapshotCount":16,"syncStatus":14,"lastSyncTime":31,"discoverSource":32},109952,"gba-ds","kyannon\u002Fgba-ds","kyannon","Dual-screen GBA for your Android or Linux emulation handheld.","",null,"C",291,22,2,13,0,19,115,230,114,93.97,"GNU General Public License v3.0",false,"main",true,[],"2026-11-23 02:30:39","2026-11-23 13:13:53","# GBA DS\n\n\u003Cp align=\"center\">\u003Cimg src=\"docs\u002Flineup.png\" width=\"100%\" alt=\"GBA DS on three dual-screen handhelds: Metroid: Zero Mission with its map on a DS-style handheld, Pokémon Pinball's table across both screens of one with a wide top screen, and Golden Sun with its menu on another\">\u003C\u002Fp>\n\nA Game Boy Advance emulator for dual-screen handhelds (built for the Anbernic RG DS Plus, on ROCKNIX and on Android with GammaOS). 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.\n\nThe 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...)\n\n\u003Cp>\n\u003Cimg src=\"docs\u002Ffusion.png\" width=\"19%\" alt=\"Metroid Fusion with its map\">\n\u003Cimg src=\"docs\u002Fcotm.png\" width=\"19%\" alt=\"Castlevania: Circle of the Moon with its 99.8% map\">\n\u003Cimg src=\"docs\u002Fmario-kart-race.png\" width=\"19%\" alt=\"Mario Kart: Super Circuit with its race HUD on the second screen\">\n\u003Cimg src=\"docs\u002Fsma2.png\" width=\"19%\" alt=\"Super Mario Advance 2: Super Mario World with the island's level list on the second screen\">\n\u003Cimg src=\"docs\u002Fthps2.png\" width=\"19%\" alt=\"Tony Hawk's Pro Skater 2 with the goal sheet on the second screen\">\n\u003C\u002Fp>\n\n\u003Csub>Stacked screens, pixel-perfect scaling, LCD grid on.\u003C\u002Fsub>\n\nGBA DS supports 42 games, with their regional releases: see [Supported games](https:\u002F\u002Fgithub.com\u002Fkyannon\u002Fgba-ds\u002Fwiki\u002FSupported-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.\n\n**Documentation is in the [wiki](https:\u002F\u002Fgithub.com\u002Fkyannon\u002Fgba-ds\u002Fwiki):** [Playing](https:\u002F\u002Fgithub.com\u002Fkyannon\u002Fgba-ds\u002Fwiki\u002FPlaying) · [Supported games](https:\u002F\u002Fgithub.com\u002Fkyannon\u002Fgba-ds\u002Fwiki\u002FSupported-games) · [Map screen surrounds and overlays](https:\u002F\u002Fgithub.com\u002Fkyannon\u002Fgba-ds\u002Fwiki\u002FMap-screen-surrounds-and-overlays) · [Settings](https:\u002F\u002Fgithub.com\u002Fkyannon\u002Fgba-ds\u002Fwiki\u002FSettings) · [Troubleshooting](https:\u002F\u002Fgithub.com\u002Fkyannon\u002Fgba-ds\u002Fwiki\u002FTroubleshooting) · [Adding second-screen compatibility for a game](https:\u002F\u002Fgithub.com\u002Fkyannon\u002Fgba-ds\u002Fwiki\u002FAdding-second-screen-compatibility-for-a-game) · [Philosophy](https:\u002F\u002Fgithub.com\u002Fkyannon\u002Fgba-ds\u002Fwiki\u002FPhilosophy)\n\n## How it works\n\nEmulation is [libmgba](https:\u002F\u002Fmgba.io). 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:\n\n1. It copies the live game's state into the silent copy. The game you're playing is never paused or touched.\n2. 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.\n3. 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.\n\nYou 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).\n\nGames without a map use the second screen in other ways:\n\n- **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.\n- **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.\n\nUntil 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.\n\n## Install\n\nDownload the latest release from the [Releases page](https:\u002F\u002Fgithub.com\u002Fkyannon\u002Fgba-ds\u002Freleases), then follow the guide for your system:\n\n- **[ROCKNIX](https:\u002F\u002Fgithub.com\u002Fkyannon\u002Fgba-ds\u002Fwiki\u002FInstall-on-ROCKNIX)** (stock ROCKNIX or ROCKNIXDS): unzip `gba-ds-v…-linux-aarch64.zip` into `\u002Fstorage\u002Froms\u002Fports\u002F` and start **GBA DS** from Ports. The guide also covers the Ports icon, starting games from EmulationStation's Game Boy Advance list, and upgrading.\n- **[BananaOS](https:\u002F\u002Fgithub.com\u002Fkyannon\u002Fgba-ds\u002Fwiki\u002FInstall-on-BananaOS)**: the same zip, unzipped into the card's `roms\u002Fports`; games in `roms\u002Fgba`.\n- **[Stock Linux OS](https:\u002F\u002Fgithub.com\u002Fkyannon\u002Fgba-ds\u002Fwiki\u002FInstall-on-Stock-Linux-OS)** (the RG DS Plus's own system, experimental): the same zip, unzipped into the card's `Ports` folder; games in `Roms\u002FGBA`.\n- **[Android](https:\u002F\u002Fgithub.com\u002Fkyannon\u002Fgba-ds\u002Fwiki\u002FInstall-on-Android)** (GammaOS): install `gba-ds-v…-android.apk`, allow All files access, and put your ROMs in `ROMs\u002Fgba`. To start games from GammaOS, Daijisho, ES-DE or another frontend, see [Launching from Android frontends](https:\u002F\u002Fgithub.com\u002Fkyannon\u002Fgba-ds\u002Fwiki\u002FLaunching-from-Android-frontends).\n\n## Building\n\nOn an x86_64 Linux host with git, cmake, make, and zip, run:\n\n```sh\nscripts\u002Fbuild-rocknix.sh            # -> dist\u002Fgba-ds-v\u003CVERSION>-linux-aarch64.zip\n```\n\nThe script fetches a GCC aarch64 toolchain, mGBA (pinned commit), and SDL2 into `deps\u002F`.\n\nDev builds (a `-dev` VERSION) also carry `gba-ds\u002Fweb\u002Fgba-ds.wasm`, GBA DS compiled to WebAssembly by `scripts\u002Fbuild-web.sh` (needs clang, wasm-ld and llvm-ar; it builds its own SDL2, libmgba and binaryen's `wasm-opt` the first time). Dropping such a zip on the GBA DS tab of the State Saver tool (`tools\u002Fstatesaver\u002F`) runs that build in a browser, both screens at default settings, for testing before it goes on a device.\n\nTo build for the host so you can develop and test (needs libpng-dev too):\n\n```sh\nscripts\u002Fsetup-host.sh   # first time: mGBA and SDL2 into deps\u002F, then builds\nmake && make tools      # afterwards: build\u002Fhost\u002Fgba-ds, build\u002Fhost\u002Fharness\n```\n\nRun it headless and drive it from a script (button combos, `HOME`, `TAP:x,y`, `SHOT:file.bmp`, `QUIT`; see `--help`):\n\n```sh\nSDL_VIDEODRIVER=offscreen SDL_AUDIODRIVER=dummy GBADS_WINDOW=640x960 \\\n  build\u002Fhost\u002Fgba-ds --rom-dir=roms --state-dir=\u002Ftmp\u002Fst --input-script=test.txt\n```\n\nTo add second-screen support for another game, see [Adding second-screen compatibility for a game](https:\u002F\u002Fgithub.com\u002Fkyannon\u002Fgba-ds\u002Fwiki\u002FAdding-second-screen-compatibility-for-a-game), and [Philosophy](https:\u002F\u002Fgithub.com\u002Fkyannon\u002Fgba-ds\u002Fwiki\u002FPhilosophy) for what should go on the second screen.\n\n## Roadmap\n\n- Better save and load state handling, toggles for auto-save and auto-load\n- \"Bug report save\" functionality that includes a rewound state, button logs, and custom notes\n- A hideable touch menu on the second screen that gives all games access to performance and other functionality without needing to pause\n- Better aspect ratio and display controls for more devices\n- Hopefully, with dev permissions and as the emulator matures, deeper integration options for the popular RG DS\u002FDS+ operating systems\n- Eventually, potentially, RetroAchievements hardcore support\n- As always: more games!\n\n## AI Disclosure\n\nGBA 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.\n\n**How a change gets made**\n\n1. **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.\n2. **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.\n3. **I test every build on real hardware.** That's an Anbernic RG DS Plus, on ROCKNIX and on Android (GammaOS). 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.\n4. **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.\n\n**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.\n\n**What isn't AI-generated:** the game logos, map borders 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](https:\u002F\u002Fmgba.io)'s, a long-established, human-written emulator, which GBA DS builds on.\n\n**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](https:\u002F\u002Fgithub.com\u002Fkyannon\u002Fgba-ds\u002Fissues); it gets tested on hardware the same way.\n\n## Not affiliated with Nintendo\n\nGBA 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.\n\nGBA DS includes no games, BIOS files or other copyrighted game data. Use your own legally obtained copies of your games.\n\n## Licence\n\nGBA DS is free software: you can redistribute it and\u002For modify it under the terms of the [GNU General Public License](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](LICENSE) for more details.\n\nThe parts of GBA DS made by others keep their own licences, all compatible with the GPL:\n\nGBA DS statically links libmgba, which is © Jeffrey Pfau and licensed under MPL-2.0. The mGBA source is at \u003Chttps:\u002F\u002Fgithub.com\u002Fmgba-emu\u002Fmgba> (pinned commit in `scripts\u002Fbuild-rocknix.sh`).\n\nThe interface text is set in [Jost](https:\u002F\u002Fgithub.com\u002Findestructible-type\u002FJost) (© The Jost Project Authors), bundled under the SIL Open Font License 1.1 (`assets\u002Ffonts\u002FJost-OFL.txt`), and drawn with [stb_truetype](https:\u002F\u002Fgithub.com\u002Fnothings\u002Fstb) (public domain).\n\nRetroAchievements support uses [rcheevos](https:\u002F\u002Fgithub.com\u002FRetroAchievements\u002Frcheevos) (© RetroAchievements, MIT licence), vendored in `third_party\u002Frcheevos`.\n","GBA DS 是一款为双屏掌机（如 Anbernic RG DS Plus）定制的 Game Boy Advance 模拟器，通过在第二屏实时显示游戏地图或辅助信息（如 HUD、关卡列表、目标清单），复现 Nintendo DS 风格的双屏交互体验。项目基于 libmgba 实现核心模拟，采用双实例同步机制，在主屏运行游戏的同时，副屏通过内存扫描与场景切换检测动态更新对应内容；支持像素级缩放、LCD 网格模拟及自定义边框。适用于拥有物理双屏的 Linux\u002FAndroid 掌机用户，尤其适合希望提升经典 GBA 探索类、竞速类、RPG 类游戏操作效率与沉浸感的场景。","2026-11-24 04:38:00","CREATED_QUERY"]