Gameboy Emulation - Performance Improvement Ideas

Regarding JIT ("just in time" compilation), the idea is to translate the gameboy SM83 instructions into ARMv7-M assembly, so that the Playdate CPU runs the code natively -- blazingly fast by gameboy standards. What's more, we can statically optimize out most flag updates.

I have a working demo of SM83-to-arm translation, but it needs more test cases to catch all the bugs. GitHub - nstbayless/jit-playdate-gameboy: JIT for running gameboy instructions on playdate

Current progress: 100% of instructions implemented! But hardly any testing done at all.

It's really tough to test correctness on hardware because of a lack of debugging ability, so I am also emulating arm on my laptop to debug this: How to Emulate Playdate (Arm) with QEMU

5 Likes