Gameboy Doctor
10 hours ago
- #test ROMs
- #debugging tool
- #Gameboy emulator
- Gameboy Doctor is a tool for debugging Gameboy emulators by comparing them against a reference emulator that passes Blargg's test ROMs.
- It pinpoints the exact tick where an emulator's state diverges, enabling targeted bug fixing, and works with a minimally functional CPU and motherboard.
- Using the tool requires Python3 and involves cloning the repository, choosing a supported cpu_instrs test ROM, and making two specific tweaks to the emulator.
- One tweak is initializing the CPU registers to predefined boot ROM values, and the other is hardcoding the LY register read to return 0x90.
- Users must log the CPU state after each operation in a specific format and feed the logfile into Gameboy Doctor for comparison and feedback.
- The tool provides detailed error messages, suggestions for fixes, and confirms success if the log matches the reference for all lines.
- Future work includes expanding support to other test ROMs, pending feedback on its usefulness.