all repos — mgba @ 25e70e37c7cecf234eb3fec7c50779460e68c1dd

mGBA Game Boy Advance Emulator

GBA Memory: Ensure changing the timing of a DMA reschedules it
Jeffrey Pfau jeffrey@endrift.com
Mon, 06 Apr 2015 03:47:42 -0700
commit

25e70e37c7cecf234eb3fec7c50779460e68c1dd

parent

1856b77cbcc9a6c6d5bb24665e79d77a4ebff734

2 files changed, 6 insertions(+), 0 deletions(-)

jump to
M CHANGESCHANGES

@@ -12,6 +12,7 @@ - GBA Audio: FIFOs should not poll DMAs that are not scheduled for audio

- 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:
M src/gba/memory.csrc/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)) {