fix IRQ at DMA start edge case

This commit is contained in:
OV2 2012-08-12 19:31:45 +02:00
parent 466c3162d6
commit 3c8804d6ca
1 changed files with 4 additions and 1 deletions

View File

@ -1586,8 +1586,11 @@ void S9xSetCPU (uint8 Byte, uint16 Address)
if (CPU.InDMAorHDMA) if (CPU.InDMAorHDMA)
return; return;
// XXX: Not quite right... // XXX: Not quite right...
if (Byte) if (Byte) {
CPU.PrevCycles = CPU.Cycles;
CPU.Cycles += Timings.DMACPUSync; CPU.Cycles += Timings.DMACPUSync;
S9xCheckInterrupts();
}
if (Byte & 0x01) if (Byte & 0x01)
S9xDoDMA(0); S9xDoDMA(0);
if (Byte & 0x02) if (Byte & 0x02)