DS I/O: Initialize POSTFLG since we replace the boot process

This commit is contained in:
Vicki Pfau 2017-02-20 16:23:49 -08:00
parent da488b3c2b
commit a4f3c99faf
2 changed files with 4 additions and 2 deletions

View File

@ -97,6 +97,8 @@ enum DSIORegisters {
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 @@ enum DS7IORegisters {
// 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 @@ enum DS9IORegisters {
DS9_REG_MAX = 0x106E,
DS9_REG_POSTFLG = 0x300,
DS9_REG_POWCNT1 = 0x304,
};

View File

@ -166,6 +166,7 @@ static void DSIOUpdateTimer(struct DSCommon* dscore, uint32_t address) {
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 @@ uint32_t DS7IORead32(struct DS* ds, uint32_t address) {
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) {