A Game Boy (DMG) emulator written in Rust.
This repo contains:
nemu-core: Core emulation logic as a Rust library + a built-in debugger binary + custom boot ROM source codenemu-gui: GUI for running ROMs
Requirements:
- Rust toolchain (duh)
- RGBDS toolchain
- A computer (strongly recommended)
Clone with submodules:
git clone --recurse-submodules https://github.com/Arikatsu/nemu.gitBuild the boot ROM:
cd nemu_core/bootrom
./build.sh # OR .\build.ps1 on Windows PowerShellRun tests:
cargo test -p nemu-core --libRun with the debugger:
cargo run -p nemu-core --features debuggerRun with the GUI (supports game saves):
cargo run -p nemu-gui -- <path_to_rom>Features implemented so far:
- Full CPU instruction set and emulation
- Bus and memory mapping (partial, will evolve as more features are implemented)
- Timer
- Interrupt handling
- Debugger
- Background/Window rendering and PPU mode switching
- Sprite rendering
- Joypad input
- Custom Boot ROM (currently only does basic initialization, plan to show my own boot animation later)
- GUI for running ROMs (nemu-gui)
- MBC cartridges
- ROM only
- MBC1 (ROM + RAM + BATTERY)
- Serial
- Sound
- Save states
List items may be updated or even changed as development progresses and does not indicate a strict roadmap.
- Blargg's CPU instruction tests
- Blargg's CPU and Memory instruction timing tests
dmg-acid2test ROM
(need to test more lol)
- The project is still under active development and may contain bugs or incomplete behavior.
- Contributions, bug reports, and feedback are welcome.
- Yes, I have NOT come around to adding the HALT bug yet.