Rekai Musuka 2bf877d1ec fix(cpu): Ensure mask the high bits of the flag register
There was a bug where POP AF returned 0x1301. In this example, the A
register would be set to 0x13, and the Flag register woud be set to
0x01, which is an invalid state considering only bits 4 -> 7 of the flag
register are used. This commit masks the flag register with & 0xF0
whenever it is read or written to so that we can ensure that only the
high bits can ever be potentially set
2021-03-26 20:25:30 -05:00
2021-01-27 23:59:42 -06:00

Rekai's Gameboy Emulator

Build Status

Status

Currently:

  • CPU passes Blargg's cpu_instrs.gb
  • Gameboy Boot ROM runs correctly
Description
A cycle-accurate, ppu not-quite-so hobby project.
Readme 2.7 MiB
Languages
Rust 100%