all repos — mgba @ 5c15ed7dd536541700014f71f53a7f4cb00240fd

mGBA Game Boy Advance Emulator

GBA Memory: POSTFLG support and BIOS skip register parity
Jeffrey Pfau jeffrey@endrift.com
Sun, 30 Oct 2016 11:13:23 -0700
commit

5c15ed7dd536541700014f71f53a7f4cb00240fd

parent

a6cd5f44dbd25e8420d3f0643a2b3bbd607d99bb

3 files changed, 13 insertions(+), 0 deletions(-)

jump to
M CHANGESCHANGES

@@ -22,6 +22,7 @@ - VFS: Fix resizing memory chunks when not needed

- GB Memory: Fix patching ROM bank 0 - GB: Fix audio not being deinitialized - GBA Memory: Fix VCOUNT being writable + - GBA Memory: Improve initial skipped BIOS state Misc: - SDL: Remove scancode key input - GBA Video: Clean up unused timers

@@ -36,6 +37,7 @@ - Debugger: Modularize CLI debugger

- Core: Clean up some thread state checks - Debugger: Make building with debugging aspects optional - GBA Memory: Support for Mo Jie Qi Bing by Vast Fame (taizou) + - GBA Memory: Support reading/writing POSTFLG 0.5.1: (2016-10-05) Bugfixes:
M src/gba/gba.csrc/gba/gba.c

@@ -215,6 +215,8 @@ cpu->gprs[ARM_PC] = BASE_CART0;

} else { cpu->gprs[ARM_PC] = BASE_WORKING_RAM; } + gba->memory.io[REG_VCOUNT >> 1] = 0x7E; + gba->memory.io[REG_POSTFLG >> 1] = 1; int currentCycles = 0; ARM_WRITE_PC; }
M src/gba/io.csrc/gba/io.c

@@ -333,6 +333,11 @@ gba->memory.io[REG_BG2PA >> 1] = 0x100;

gba->memory.io[REG_BG2PD >> 1] = 0x100; gba->memory.io[REG_BG3PA >> 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) {

@@ -577,6 +582,10 @@ GBAHalt(gba);

} else { GBAStop(gba); } + 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)) {