mirror of
https://github.com/libretro/bsnes-libretro.git
synced 2024-11-27 11:00:47 +00:00
HBlank HDMA should start instantly when starting during HBlank. Fixes 3-D Ultra Pinball.
This commit is contained in:
parent
9fbcce689c
commit
dbd04f09e8
@ -577,6 +577,10 @@ static void write_high_memory(GB_gameboy_t *gb, uint16_t addr, uint8_t value)
|
||||
}
|
||||
gb->hdma_on = (value & 0x80) == 0;
|
||||
gb->hdma_on_hblank = (value & 0x80) != 0;
|
||||
if (gb->hdma_on_hblank && (gb->io_registers[GB_IO_STAT] & 3) == 0) {
|
||||
gb->hdma_on = true;
|
||||
gb->hdma_cycles = 0;
|
||||
}
|
||||
gb->io_registers[GB_IO_HDMA5] = value;
|
||||
gb->hdma_steps_left = (gb->io_registers[GB_IO_HDMA5] & 0x7F) + 1;
|
||||
/* Todo: Verify this. Gambatte's DMA tests require this. */
|
||||
|
Loading…
Reference in New Issue
Block a user