This is a Gameboy emulator written in Rust for the Rust WP SoSE 24 project at the HAW Hamburg. The original project can be found here.
cargo run
Gameboy Doctor is a tool that can be used to debug the emulator. It can be found here, it's extremely useful.
git clone
the repository (Preferably not in the same directory as the emulator)
projects/gameboy-doctor
and projects/gb_emulator
test_data/individual
./game.gb
cargo run
DUMP_GAMEBOY_DOCTOR_LOG
is set to true
in main.rs
python gameboy-doctor ../gb_emulator/gameboy_doctor_log.txt cpu_instrs NUMBER_OF_ROM
09-op r,r.gb
Mismatch in CPU state at line 16520:
MINE: A:00 F:-H-Z B:01 C:00 D:D0 E:00 H:CE L:46 SP:DFFB PC:CA0E PCMEM:3E,20,CD,37
YOURS: A:00 F:-H-Z B:01 C:00 D:D0 E:00 H:CE L:46 SP:DFFB PC:CA0B PCMEM:C4,45,CA,3E
The CPU state before this (at line 16519) was:
A:00 F:A0 B:01 C:00 D:D0 E:00 H:CE L:46 SP:DFFB PC:CA0B PCMEM:C4,45,CA,3E
The last operation executed (in between lines 16519 and 16520) was:
0xC4 CALL NZ a16