diff --git a/Core/sm83_cpu.c b/Core/sm83_cpu.c index 0009a69..c9da208 100644 --- a/Core/sm83_cpu.c +++ b/Core/sm83_cpu.c @@ -1512,10 +1512,11 @@ void GB_cpu_run(GB_gameboy_t *gb) opcodes[gb->last_opcode_read](gb, gb->last_opcode_read); } + flush_pending_cycles(gb); + if (gb->hdma_starting) { gb->hdma_starting = false; gb->hdma_on = true; gb->hdma_cycles = -8; } - flush_pending_cycles(gb); }