From 94ec760a9f6daea842dbf51eb036d0ef77e7301a Mon Sep 17 00:00:00 2001 From: Vicki Pfau Date: Sat, 1 Sep 2018 14:44:43 -0700 Subject: [PATCH] GBA: Reset WAITCNT properly --- CHANGES | 1 + src/gba/memory.c | 1 + 2 files changed, 2 insertions(+) diff --git a/CHANGES b/CHANGES index 3c0389abe..309b38c3a 100644 --- a/CHANGES +++ b/CHANGES @@ -10,6 +10,7 @@ Bugfixes: - GBA BIOS: Fix BitUnPack final byte - GB I/O: DMA register is R/W - GBA Video: Improve sprite cycle counting (fixes mgba.io/i/1126) + - GBA: Reset WAITCNT properly Misc: - FFmpeg: Support libswresample (fixes mgba.io/i/1120, mgba.io/b/123) diff --git a/src/gba/memory.c b/src/gba/memory.c index 42a571a46..4f7cd6c48 100644 --- a/src/gba/memory.c +++ b/src/gba/memory.c @@ -113,6 +113,7 @@ void GBAMemoryReset(struct GBA* gba) { gba->memory.iwram = anonymousMemoryMap(SIZE_WORKING_IRAM); memset(gba->memory.io, 0, sizeof(gba->memory.io)); + GBAAdjustWaitstates(gba, 0); gba->memory.prefetch = false; gba->memory.lastPrefetchedPc = 0;