From b65cc6d97dc8594894ae073c9cb3c07530c0dfe3 Mon Sep 17 00:00:00 2001 From: Vicki Pfau Date: Sun, 9 Apr 2017 14:39:35 -0700 Subject: [PATCH] DS: Set boot complete bit in RAM on boot (fixes #576, #580, #586) --- CHANGES | 4 ++++ src/ds/ds.c | 1 + 2 files changed, 5 insertions(+) diff --git a/CHANGES b/CHANGES index 8417b570e..5ae19f740 100644 --- a/CHANGES +++ b/CHANGES @@ -1,3 +1,7 @@ +medusa alpha 2: (Future) +Misc: + - DS: Set boot complete bit in RAM on boot (fixes mgba.io/i/576, mgba.io/i/580, mgba.io/i/586) + 0.6.0: (Future) Features: - GBA: Support printing debug strings from inside a game diff --git a/src/ds/ds.c b/src/ds/ds.c index 1c5f856b2..9948829c7 100644 --- a/src/ds/ds.c +++ b/src/ds/ds.c @@ -301,6 +301,7 @@ void DS7Reset(struct ARMCore* cpu) { memcpy(&ds->memory.ram[0x3FF804 >> 2], DS_CHIP_ID, 4); memcpy(&ds->memory.ram[0x3FFC00 >> 2], DS_CHIP_ID, 4); memcpy(&ds->memory.ram[0x3FFC04 >> 2], DS_CHIP_ID, 4); + ds->memory.ram[0x3FFC40 >> 2] = 1; memcpy(&ds->memory.ram[0x3FFE00 >> 2], header, 0x170); DS7IOWrite32(ds, DS_REG_ROMCNT_LO, header->busTiming | 0x2700000); // TODO: Error check