Theorized HDMA behavior proven wrong
This commit is contained in:
parent
9b5dc9eca7
commit
517f455486
@ -1631,9 +1631,6 @@ void GB_cpu_run(GB_gameboy_t *gb)
|
|||||||
/* Wake up from HALT mode without calling interrupt code. */
|
/* Wake up from HALT mode without calling interrupt code. */
|
||||||
if (gb->halted && !effective_ime && interrupt_queue) {
|
if (gb->halted && !effective_ime && interrupt_queue) {
|
||||||
gb->halted = false;
|
gb->halted = false;
|
||||||
if (gb->hdma_on_hblank && (gb->io_registers[GB_IO_STAT] & 3) == 0) {
|
|
||||||
gb->hdma_on = true;
|
|
||||||
}
|
|
||||||
gb->dma_cycles = 4;
|
gb->dma_cycles = 4;
|
||||||
GB_dma_run(gb);
|
GB_dma_run(gb);
|
||||||
gb->speed_switch_halt_countdown = 0;
|
gb->speed_switch_halt_countdown = 0;
|
||||||
@ -1642,9 +1639,6 @@ void GB_cpu_run(GB_gameboy_t *gb)
|
|||||||
/* Call interrupt */
|
/* Call interrupt */
|
||||||
else if (effective_ime && interrupt_queue) {
|
else if (effective_ime && interrupt_queue) {
|
||||||
gb->halted = false;
|
gb->halted = false;
|
||||||
if (gb->hdma_on_hblank && (gb->io_registers[GB_IO_STAT] & 3) == 0) {
|
|
||||||
gb->hdma_on = true;
|
|
||||||
}
|
|
||||||
// TODO: verify the timing!
|
// TODO: verify the timing!
|
||||||
gb->dma_cycles = 4;
|
gb->dma_cycles = 4;
|
||||||
GB_dma_run(gb);
|
GB_dma_run(gb);
|
||||||
|
Loading…
Reference in New Issue
Block a user