Mooneye GB is a Game Boy research project and emulator written in the Rust programming language. This project aims to provide a highly accurate and well-documented emulator for the original Game Boy.
The primary objectives of Mooneye GB are to achieve high accuracy in emulation and to provide thorough documentation. While other emulators like Gambatte and BGB are known for their accuracy, they often lack clear documentation, making them less useful as references for emulator developers. Mooneye GB strives to fill this gap by explaining the reasons behind specific emulation behaviors.
To understand the precise behavior of the Game Boy hardware, Mooneye GB involves creating numerous test ROMs. These tests help identify corner cases and document exact hardware behaviors, ensuring the emulator's accuracy.
For detailed technical information about the Game Boy, see the Game Boy: Complete Technical Reference. This reference is an invaluable resource for understanding the Game Boy's inner workings.
Mooneye GB has several non-goals, including:
Mooneye GB is a work-in-progress (WIP) project. It requires a boot ROM to function correctly and may lag behind the latest hardware research. The focus is on accurate emulation based on thorough research rather than quick fixes.
Always compile in release mode for better performance. On an i7-3770K desktop, Mooneye GB can run ROMs at speeds of 2000% to 4000%. Without optimizations, the speed drops to 150% to 200%, which is still acceptable for development purposes.
To run the emulator with a GUI:
cargo run --release
$HOME/.local/share/mooneye-gb/bootroms/dmg_boot.bin
.cargo build --release
cargo run --release -- PATH_TO_GAMEBOY_ROM
.Note for Windows: Download an SDL2 package containing SDL2.dll and place it in target/debug
and target/release
.
Game Boy | Key |
---|---|
Dpad | Arrow keys |
A | Z |
B | X |
Start | Return |
Select | Backspace |
Function | Key |
---|---|
Fast forward | Shift |
Toggle performance overlay | F2 |