From 5a877db291236cd803d37fbdb489a4c0462f480e 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 20fd20be7..652191c94 100644 --- a/CHANGES +++ b/CHANGES @@ -48,6 +48,7 @@ Bugfixes: - GBA Video: Make layer disabling work consistently - GB: Fix IRQ disabling on the same T-cycle as an assert - Core: Fix ordering events when scheduling during events + - GBA: Reset WAITCNT properly Misc: - GBA Timer: Use global cycles for timers - GBA: Extend oddly-sized ROMs to full address space (fixes mgba.io/i/722) diff --git a/src/gba/memory.c b/src/gba/memory.c index 0d16fc82a..668e3d7a9 100644 --- a/src/gba/memory.c +++ b/src/gba/memory.c @@ -121,6 +121,7 @@ void GBAMemoryReset(struct GBA* gba) { } memset(gba->memory.io, 0, sizeof(gba->memory.io)); + GBAAdjustWaitstates(gba, 0); gba->memory.agbPrint = 0; memset(&gba->memory.agbPrintCtx, 0, sizeof(gba->memory.agbPrintCtx));