DS I/O: Initialize POSTFLG since we replace the boot process
Vicki Pfau vi@endrift.com
Mon, 20 Feb 2017 16:23:49 -0800
2 files changed,
4 insertions(+),
2 deletions(-)
M
include/mgba/internal/ds/io.h
→
include/mgba/internal/ds/io.h
@@ -97,6 +97,8 @@ DS_REG_IE_LO = 0x210,
DS_REG_IE_HI = 0x212, DS_REG_IF_LO = 0x214, DS_REG_IF_HI = 0x216, + + DS_REG_POSTFLG = 0x300, }; enum DS7IORegisters {@@ -114,7 +116,6 @@
// Memory control DS7_REG_VRAMSTAT = 0x240, DS7_REG_WRAMSTAT = 0x241, - DS7_REG_POSTFLG = 0x300, DS7_REG_HALTCNT = 0x301, DS7_REG_POWCNT2 = 0x304, DS7_REG_BIOSPROT_LO = 0x308,@@ -257,7 +258,6 @@ DS9_REG_SQRT_PARAM_3 = 0x2BE,
DS9_REG_MAX = 0x106E, - DS9_REG_POSTFLG = 0x300, DS9_REG_POWCNT1 = 0x304, };
M
src/ds/io.c
→
src/ds/io.c
@@ -166,6 +166,7 @@
void DS7IOInit(struct DS* ds) { memset(ds->memory.io7, 0, sizeof(ds->memory.io7)); ds->memory.io7[DS_REG_IPCFIFOCNT >> 1] = 0x0101; + ds->memory.io7[DS_REG_POSTFLG >> 1] = 0x0001; } void DS7IOWrite(struct DS* ds, uint32_t address, uint16_t value) {@@ -322,6 +323,7 @@
void DS9IOInit(struct DS* ds) { memset(ds->memory.io9, 0, sizeof(ds->memory.io9)); ds->memory.io9[DS_REG_IPCFIFOCNT >> 1] = 0x0101; + ds->memory.io9[DS_REG_POSTFLG >> 1] = 0x0001; } void DS9IOWrite(struct DS* ds, uint32_t address, uint16_t value) {