GBA Memory: POSTFLG support and BIOS skip register parity

This commit is contained in:
Jeffrey Pfau 2016-10-30 11:13:23 -07:00
parent a6cd5f44db
commit 5c15ed7dd5
3 changed files with 13 additions and 0 deletions

View File

@ -22,6 +22,7 @@ Bugfixes:
- GB Memory: Fix patching ROM bank 0 - GB Memory: Fix patching ROM bank 0
- GB: Fix audio not being deinitialized - GB: Fix audio not being deinitialized
- GBA Memory: Fix VCOUNT being writable - GBA Memory: Fix VCOUNT being writable
- GBA Memory: Improve initial skipped BIOS state
Misc: Misc:
- SDL: Remove scancode key input - SDL: Remove scancode key input
- GBA Video: Clean up unused timers - GBA Video: Clean up unused timers
@ -36,6 +37,7 @@ Misc:
- Core: Clean up some thread state checks - Core: Clean up some thread state checks
- Debugger: Make building with debugging aspects optional - Debugger: Make building with debugging aspects optional
- GBA Memory: Support for Mo Jie Qi Bing by Vast Fame (taizou) - GBA Memory: Support for Mo Jie Qi Bing by Vast Fame (taizou)
- GBA Memory: Support reading/writing POSTFLG
0.5.1: (2016-10-05) 0.5.1: (2016-10-05)
Bugfixes: Bugfixes:

View File

@ -215,6 +215,8 @@ void GBASkipBIOS(struct GBA* gba) {
} else { } else {
cpu->gprs[ARM_PC] = BASE_WORKING_RAM; cpu->gprs[ARM_PC] = BASE_WORKING_RAM;
} }
gba->memory.io[REG_VCOUNT >> 1] = 0x7E;
gba->memory.io[REG_POSTFLG >> 1] = 1;
int currentCycles = 0; int currentCycles = 0;
ARM_WRITE_PC; ARM_WRITE_PC;
} }

View File

@ -333,6 +333,11 @@ void GBAIOInit(struct GBA* gba) {
gba->memory.io[REG_BG2PD >> 1] = 0x100; gba->memory.io[REG_BG2PD >> 1] = 0x100;
gba->memory.io[REG_BG3PA >> 1] = 0x100; gba->memory.io[REG_BG3PA >> 1] = 0x100;
gba->memory.io[REG_BG3PD >> 1] = 0x100; gba->memory.io[REG_BG3PD >> 1] = 0x100;
if (!gba->biosVf) {
gba->memory.io[REG_VCOUNT >> 1] = 0x7E;
gba->memory.io[REG_POSTFLG >> 1] = 1;
}
} }
void GBAIOWrite(struct GBA* gba, uint32_t address, uint16_t value) { void GBAIOWrite(struct GBA* gba, uint32_t address, uint16_t value) {
@ -579,6 +584,10 @@ void GBAIOWrite8(struct GBA* gba, uint32_t address, uint8_t value) {
} }
return; return;
} }
if (address == REG_POSTFLG) {
gba->memory.io[(address & (SIZE_IO - 1)) >> 1] = value;
return;
}
if (address >= REG_DEBUG_STRING && address - REG_DEBUG_STRING < sizeof(gba->debugString)) { if (address >= REG_DEBUG_STRING && address - REG_DEBUG_STRING < sizeof(gba->debugString)) {
gba->debugString[address - REG_DEBUG_STRING] = value; gba->debugString[address - REG_DEBUG_STRING] = value;
return; return;