diff --git a/CHANGES b/CHANGES index 0b6785dbb..28404074b 100644 --- a/CHANGES +++ b/CHANGES @@ -33,6 +33,7 @@ Bugfixes: - GBA BIOS: Fix misaligned RLUnCompReadNormalWrite* - Qt: Fix race condition with setting sample rate - GBA Memory: Fix timing of DMAs + - GBA Memory: Fix DMAs triggering two cycles early Misc: - Qt: Window size command line options are now supported - Qt: Increase usability of key mapper diff --git a/src/gba/memory.c b/src/gba/memory.c index 22d6dcfbb..653732154 100644 --- a/src/gba/memory.c +++ b/src/gba/memory.c @@ -1507,8 +1507,8 @@ void GBAMemoryScheduleDMA(struct GBA* gba, int number, struct GBADMA* info) { struct ARMCore* cpu = gba->cpu; switch (GBADMARegisterGetTiming(info->reg)) { case DMA_TIMING_NOW: - info->nextEvent = cpu->cycles; - GBAMemoryUpdateDMAs(gba, 0); + info->nextEvent = cpu->cycles + 2; + GBAMemoryUpdateDMAs(gba, -1); break; case DMA_TIMING_HBLANK: // Handled implicitly