From cf88e47a8a795922e42eb641d7ac02f56e4d2b40 Mon Sep 17 00:00:00 2001 From: Jeffrey Pfau Date: Wed, 14 Jan 2015 00:28:49 -0800 Subject: [PATCH] GBA Memory: Fix initial DMA state --- CHANGES | 1 + src/gba/gba-memory.c | 3 ++- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/CHANGES b/CHANGES index 7c3a1f7a7..60ea056da 100644 --- a/CHANGES +++ b/CHANGES @@ -54,6 +54,7 @@ Bugfixes: - GBA BIOS: Fix HuffUnComp to work when games pass an invalid bit length - GBA BIOS: Fix GetBiosChecksum to return the value of a real GBA, regardless of used BIOS - GBA Memory: Properly bounds-check VRAM accesses + - GBA Memory: Fix initial DMA state Misc: - Qt: Disable sync to video by default - GBA: Exit cleanly on FATAL if the port supports it diff --git a/src/gba/gba-memory.c b/src/gba/gba-memory.c index 79d7f6024..8b063b502 100644 --- a/src/gba/gba-memory.c +++ b/src/gba/gba-memory.c @@ -100,9 +100,10 @@ void GBAMemoryReset(struct GBA* gba) { memset(gba->memory.dma, 0, sizeof(gba->memory.dma)); int i; for (i = 0; i < 4; ++i) { - gba->memory.dma[i].count = 0x10000; + gba->memory.dma[i].count = 0x4000; gba->memory.dma[i].nextEvent = INT_MAX; } + gba->memory.dma[3].count = 0x10000; gba->memory.activeDMA = -1; gba->memory.nextDMA = INT_MAX; gba->memory.eventDiff = 0;