From 013948f129f5449d7ba718fca940c0ad5c6cf8e9 Mon Sep 17 00:00:00 2001 From: Jeffrey Pfau Date: Tue, 11 Aug 2015 01:14:02 -0700 Subject: [PATCH] GBA Memory: Run multiple DMAs in a tight loop if they all occur before present --- CHANGES | 1 + src/gba/memory.c | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/CHANGES b/CHANGES index 46842b914..33d9f2668 100644 --- a/CHANGES +++ b/CHANGES @@ -118,6 +118,7 @@ Misc: - Qt: Increase usability of key mapper - Qt: Show checkmark for window sizes - Qt: Set window path to loaded ROM + - GBA Memory: Run multiple DMAs in a tight loop if they all occur before present 0.2.1: (2015-05-13) Bugfixes: diff --git a/src/gba/memory.c b/src/gba/memory.c index a1195eeb8..9da33f31b 100644 --- a/src/gba/memory.c +++ b/src/gba/memory.c @@ -1405,7 +1405,7 @@ int32_t GBAMemoryRunDMAs(struct GBA* gba, int32_t cycles) { } memory->nextDMA -= cycles; memory->eventDiff += cycles; - if (memory->nextDMA <= 0) { + while (memory->nextDMA <= 0) { struct GBADMA* dma = &memory->dma[memory->activeDMA]; GBAMemoryServiceDMA(gba, memory->activeDMA, dma); GBAMemoryUpdateDMAs(gba, memory->eventDiff);