DS: Set boot complete bit in RAM on boot (fixes #576, #580, #586)

This commit is contained in:
Vicki Pfau 2017-04-09 14:39:35 -07:00
parent 2a968d2512
commit b65cc6d97d
2 changed files with 5 additions and 0 deletions

View File

@ -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) 0.6.0: (Future)
Features: Features:
- GBA: Support printing debug strings from inside a game - GBA: Support printing debug strings from inside a game

View File

@ -301,6 +301,7 @@ void DS7Reset(struct ARMCore* cpu) {
memcpy(&ds->memory.ram[0x3FF804 >> 2], DS_CHIP_ID, 4); memcpy(&ds->memory.ram[0x3FF804 >> 2], DS_CHIP_ID, 4);
memcpy(&ds->memory.ram[0x3FFC00 >> 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); memcpy(&ds->memory.ram[0x3FFC04 >> 2], DS_CHIP_ID, 4);
ds->memory.ram[0x3FFC40 >> 2] = 1;
memcpy(&ds->memory.ram[0x3FFE00 >> 2], header, 0x170); memcpy(&ds->memory.ram[0x3FFE00 >> 2], header, 0x170);
DS7IOWrite32(ds, DS_REG_ROMCNT_LO, header->busTiming | 0x2700000); DS7IOWrite32(ds, DS_REG_ROMCNT_LO, header->busTiming | 0x2700000);
// TODO: Error check // TODO: Error check