Fixed HDMA regression
@@ -906,6 +906,7 @@ void GB_dma_run(GB_gameboy_t *gb)
void GB_hdma_run(GB_gameboy_t *gb)
{
if (!gb->hdma_on) return;
+
while (gb->hdma_cycles >= 0x4) {
gb->hdma_cycles -= 0x4;
@@ -915,6 +916,7 @@ void GB_hdma_run(GB_gameboy_t *gb)
if (--gb->hdma_steps_left == 0) {
gb->hdma_on = false;
gb->hdma_on_hblank = false;
+ gb->hdma_starting = false;
gb->io_registers[GB_IO_HDMA5] &= 0x7F;
break;
}
