A Game Boy emulator written entirely in ARM assemly language.
Why assembly language? Why not.
The Makefile is set up for both native building on an ARM platform as well as
cross-compling. Pass your favorite cross-compiling prefix to the make
invocation with something like CROSS=arm-none-eabi-
.
The testing harness can also be invoked on a non-arm platform using QEMU.
Specify something like TEST_WRAPPER=qemu-arm
during the make test
invocation to use QEMU when running tests.
A test harness has been created which runs a ROM for a given number of cycles
and checks a CRC32 of the screen contents against a set value. If the value
doesn't match, a capture of the screen is saved as a .bmp
file and the
process returns non-zero.
At present, only the Blargg tests are targeted. Here are the current passing tests:
cpu_instrs | passing |
---|---|
special | ✔️ |
interrupts | ✔️ |
op sp,hl | ✔️ |
op r,imm | ✔️ |
op rp | ✔️ |
ld r,r | ✔️ |
jr,jp,call,ret,rst | ✔️ |
misc instrs | ✔️ |
op r,r | ✔️ |
bit ops | ✔️ |
op a,(hl) | ✔️ |
timing | passing |
---|---|
instr_timing | ✔️ |
mem_timing | ✔️ |
mem_timing-2 | ✔️ |
misc | passing |
---|---|
oam_bug causes | ✔️ |
oam_bug non_causes | ✔️ |
oam_bug timing_bug | ✔️ |
- Null
- Linux framebuffer
- Bitmap (capture)
- Null
- Linux evdev
(not implemented)
All code is published under the BSD-3-Clause License. See LICENSE for more information.