CupidGBA is a Game Boy Advance emulator written in C with SDL2 for video, audio, and input.
- Emulates Game Boy Advance (
.gba) ROMs - Uses optional real BIOS (
-b) or built-in HLE BIOS fallback - Supports battery-backed save types (auto-detect + manual override)
- Renders at native GBA resolution
240x160with integer window scaling
- Linux (or another platform with SDL2)
gccmakepkg-configSDL2development package
On Debian/Ubuntu:
sudo apt update
sudo apt install build-essential pkg-config libsdl2-devFrom the project root:
make clean && makeThis produces the executable:
./cupidgba
./cupidgba rom.gba [-b bios.bin] [-s scale] [-S savetype]Options:
-b <path>: Load real GBA BIOS image (optional)-s <1..10>: Window scale factor (default: 3)-S <type>: Force save type instead of auto-detect
Save types for -S:
sramsram512flash512flash1meepromeeprom512none
Example:
./cupidgba /path/to/game.gba -s 4 -b bios/gba_bios.binKeyboard:
Z= AX= BBackspace= SelectEnter= StartArrow Keys= D-PadA= LS= REsc= Quit
Gamepad (SDL controller mapping):
A/B= A/BBack= SelectStart= StartD-Pad= D-PadLB/RB= L/R- Left analog stick also maps to D-Pad (with deadzone)
- Save data is stored next to the ROM, using the same base name with
.sav - Example:
Pokemon.gba→Pokemon.sav - Saves are periodically flushed during play and once again on exit
- This project currently targets GBA ROMs only.
- Supplying non-GBA ROM formats may fail or crash.
src/— emulator sourcesrc/arm/— ARM7TDMI CPU coresrc/gba/— GBA subsystems (memory, video, audio, DMA, timers, BIOS, savedata)src/gba/render/— software renderer modessrc/core/— timing/event schedulersrc/platform/— SDL frontend (main, audio, input)
include/cupid/— public/internal headersbios/— optional location for BIOS image(s)
- Build fails with missing SDL2: ensure
libsdl2-devandpkg-configare installed. - No audio: emulator continues running if audio init fails.
- Crashes with
.gb/.gbc: use.gbaROMs only.