all repos — mgba @ ba6c00637afd1e0b218c3e5585e65f21e5f21df7

mGBA Game Boy Advance Emulator

GBA: Fix RTC on non-standard sized ROMs (fixes #1400)
Vicki Pfau vi@endrift.com
Thu, 02 May 2019 16:20:49 -0700
commit

ba6c00637afd1e0b218c3e5585e65f21e5f21df7

parent

98a368daadf32aa8287ee6c7c2ada113d9afe524

2 files changed, 3 insertions(+), 2 deletions(-)

jump to
M CHANGESCHANGES

@@ -21,6 +21,7 @@ - GB Video: Fix window y changing mid-window (fixes mgba.io/i/1345)

- GB Video: Fix more window edge cases (fixes mgba.io/i/1346) - GB Timer: Fix timing adjustments when writing to TAC (fixes mgba.io/i/1340) - GBA Memory: Fix writing to OBJ memory in modes 3 and 5 + - GBA: Fix RTC on non-standard sized ROMs (fixes mgba.io/i/1400) Other fixes: - Qt: More app metadata fixes - Qt: Fix load recent from archive (fixes mgba.io/i/1325)
M src/gba/gba.csrc/gba/gba.c

@@ -405,8 +405,6 @@ gba->yankedRomSize = 0;

gba->memory.romMask = toPow2(gba->memory.romSize) - 1; gba->memory.mirroring = false; gba->romCrc32 = doCrc32(gba->memory.rom, gba->memory.romSize); - GBAHardwareInit(&gba->memory.hw, &((uint16_t*) gba->memory.rom)[GPIO_REG_DATA >> 1]); - GBAVFameDetect(&gba->memory.vfame, gba->memory.rom, gba->memory.romSize); if (popcount32(gba->memory.romSize) != 1) { // This ROM is either a bad dump or homebrew. Emulate flash cart behavior. #ifndef FIXED_ROM_BUFFER

@@ -421,6 +419,8 @@ }

if (gba->cpu && gba->memory.activeRegion >= REGION_CART0) { gba->cpu->memory.setActiveRegion(gba->cpu, gba->cpu->gprs[ARM_PC]); } + GBAHardwareInit(&gba->memory.hw, &((uint16_t*) gba->memory.rom)[GPIO_REG_DATA >> 1]); + GBAVFameDetect(&gba->memory.vfame, gba->memory.rom, gba->memory.romSize); // TODO: error check return true; }