diff --git a/CHANGES b/CHANGES index 2b692aaca..4d84885ca 100644 --- a/CHANGES +++ b/CHANGES @@ -12,6 +12,7 @@ Bugfixes: - Qt: Fix "QOpenGLContext::swapBuffers() called with non-exposed window" warning - ARM7: Fix SWI and IRQ timings - GBA Audio: Force audio FIFOs to 32-bit + - GBA Memory: Ensure changing the timing of a DMA reschedules it 0.2.0: (2015-04-03) Features: diff --git a/src/gba/memory.c b/src/gba/memory.c index d3b0770d0..975881689 100644 --- a/src/gba/memory.c +++ b/src/gba/memory.c @@ -1257,6 +1257,11 @@ uint16_t GBAMemoryWriteDMACNT_HI(struct GBA* gba, int dma, uint16_t control) { struct GBAMemory* memory = &gba->memory; struct GBADMA* currentDma = &memory->dma[dma]; int wasEnabled = GBADMARegisterIsEnable(currentDma->reg); + int oldTiming = GBADMARegisterGetTiming(currentDma->reg); + int newTiming = GBADMARegisterGetTiming(control); + if (oldTiming && oldTiming != newTiming) { + wasEnabled = false; + } currentDma->reg = control; if (GBADMARegisterIsDRQ(currentDma->reg)) {