From 6a2f1279fd6588f83104b510448c23808a81e03b Mon Sep 17 00:00:00 2001 From: Vicki Pfau Date: Wed, 14 Oct 2020 23:38:00 -0700 Subject: [PATCH] GBA: Clear GBP connection on reset --- CHANGES | 1 + src/gba/gba.c | 6 ++++++ 2 files changed, 7 insertions(+) diff --git a/CHANGES b/CHANGES index 1ccf0dab2..7fe5ce5af 100644 --- a/CHANGES +++ b/CHANGES @@ -22,6 +22,7 @@ Emulation fixes: - GB MBC: Fix some MBC3 bit masking - GB Video: Fix state after skipping BIOS (fixes mgba.io/i/1715 and mgba.io/i/1716) - GBA: Fix timing advancing too quickly in rare cases + - GBA: Clear GBP connection on reset - GBA Audio: Fix deserializing SOUNDCNT_L - GBA Audio: Fix stereo in XQ audio - GBA Audio: Fix volume/mute in XQ audio (fixes mgba.io/i/1864) diff --git a/src/gba/gba.c b/src/gba/gba.c index d47dcd8ef..23801dd43 100644 --- a/src/gba/gba.c +++ b/src/gba/gba.c @@ -216,6 +216,12 @@ void GBAReset(struct ARMCore* cpu) { GBASIOReset(&gba->sio); + // GB Player SIO control should not be engaged before detection, even if we already know it's GBP + gba->memory.hw.devices &= ~HW_GB_PLAYER; + if (gba->sio.drivers.normal == &gba->memory.hw.gbpDriver.d) { + GBASIOSetDriver(&gba->sio, NULL, SIO_NORMAL_32); + } + bool isELF = false; #ifdef USE_ELF struct ELF* elf = ELFOpen(gba->romVf);