Fixed: HDMA registers were not being updated during transfer

This commit is contained in:
Lior Halphon 2017-02-07 00:24:26 +02:00
parent 7ee96766b6
commit d5c9a52337

View File

@ -677,6 +677,17 @@ void GB_hdma_run(GB_gameboy_t *gb)
} }
gb->hdma_current_src += 0x10; gb->hdma_current_src += 0x10;
gb->hdma_current_dest += 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){ if(--gb->hdma_steps_left == 0){
gb->hdma_on = false; gb->hdma_on = false;
gb->hdma_on_hblank = false; gb->hdma_on_hblank = false;