From 16e4b0ed4ba5ae2a08db46a1823290d53796960c Mon Sep 17 00:00:00 2001 From: Jeffrey Pfau Date: Wed, 16 Sep 2015 20:25:39 -0700 Subject: [PATCH] GBA BIOS: Implement RegisterRamReset for SIO registers --- CHANGES | 1 + src/gba/bios.c | 7 ++++++- 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/CHANGES b/CHANGES index 31cb9f34e..04a737f93 100644 --- a/CHANGES +++ b/CHANGES @@ -20,6 +20,7 @@ Misc: - Qt: Prevent savestate window from opening while in multiplayer - Qt: Disable menu items in multiplayer that don't make sense to have enabled - Qt: Dropping multiplayer windows works more cleanly now + - GBA BIOS: Implement RegisterRamReset for SIO registers 0.3.0: (2015-08-16) Features: diff --git a/src/gba/bios.c b/src/gba/bios.c index a20c5ff59..9ea5b5dc9 100644 --- a/src/gba/bios.c +++ b/src/gba/bios.c @@ -63,7 +63,12 @@ static void _RegisterRamReset(struct GBA* gba) { memset(gba->video.oam.raw, 0, SIZE_OAM); } if (registers & 0x20) { - GBALog(gba, GBA_LOG_STUB, "RegisterRamReset on SIO unimplemented"); + cpu->memory.store16(cpu, BASE_IO | REG_SIOCNT, 0x0000, 0); + cpu->memory.store16(cpu, BASE_IO | REG_RCNT, RCNT_INITIAL, 0); + cpu->memory.store16(cpu, BASE_IO | REG_SIOMLT_SEND, 0, 0); + cpu->memory.store16(cpu, BASE_IO | REG_JOYCNT, 0, 0); + cpu->memory.store32(cpu, BASE_IO | REG_JOY_RECV, 0, 0); + cpu->memory.store32(cpu, BASE_IO | REG_JOY_TRANS, 0, 0); } if (registers & 0x40) { GBALog(gba, GBA_LOG_STUB, "RegisterRamReset on Audio unimplemented");