Fixed: HDMA registers were not being updated during transfer
This commit is contained in:
parent
7ee96766b6
commit
d5c9a52337
@ -677,6 +677,17 @@ void GB_hdma_run(GB_gameboy_t *gb)
|
||||
}
|
||||
gb->hdma_current_src += 0x10;
|
||||
gb->hdma_current_dest += 0x10;
|
||||
|
||||
gb->io_registers[GB_IO_HDMA2] += 0x10;
|
||||
if ((gb->io_registers[GB_IO_HDMA2] & 0xF0) == 0) {
|
||||
gb->io_registers[GB_IO_HDMA1]++;
|
||||
}
|
||||
|
||||
gb->io_registers[GB_IO_HDMA4] += 0x10;
|
||||
if ((gb->io_registers[GB_IO_HDMA4] & 0xF0) == 0) {
|
||||
gb->io_registers[GB_IO_HDMA3]++;
|
||||
}
|
||||
|
||||
if(--gb->hdma_steps_left == 0){
|
||||
gb->hdma_on = false;
|
||||
gb->hdma_on_hblank = false;
|
||||
@ -688,4 +699,4 @@ void GB_hdma_run(GB_gameboy_t *gb)
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user