Increasing PC in OAM triggers the OAM bug

This commit is contained in:
Lior Halphon 2018-03-27 16:36:39 +03:00
parent 4cbade9a88
commit 7543461c24

View File

@ -1427,6 +1427,7 @@ void GB_cpu_run(GB_gameboy_t *gb)
} }
/* Run mode */ /* Run mode */
else if(!gb->halted) { else if(!gb->halted) {
GB_trigger_oam_bug_read_increase(gb, gb->pc); /* Todo: test T-cycle timing */
gb->last_opcode_read = GB_read_memory(gb, gb->pc++); gb->last_opcode_read = GB_read_memory(gb, gb->pc++);
if (gb->halt_bug) { if (gb->halt_bug) {
gb->pc--; gb->pc--;