all repos — mgba @ d3ec40b392db348f3ab1273e90d68e32e7717a15

mGBA Game Boy Advance Emulator

GB Memory: Support manual SRAM editing (fixes #1580)
Vicki Pfau vi@endrift.com
Sat, 30 Nov 2019 11:37:36 -0800
commit

d3ec40b392db348f3ab1273e90d68e32e7717a15

parent

ffe99c08b745bdef74d9385a16c2159c6f5744e6

2 files changed, 11 insertions(+), 1 deletions(-)

jump to
M CHANGESCHANGES

@@ -97,6 +97,8 @@ - 3DS: Fix screen darkening (fixes mgba.io/i/1562)

- Core: Fix uninitialized memory issues with graphics caches - Vita: Fix analog controls (fixes mgba.io/i/1554) - Qt: Fix fast forward mute being reset (fixes mgba.io/i/1574) +Misc: + - GB Memory: Support manual SRAM editing (fixes mgba.io/i/1580) 0.8 beta 1: (2019-10-20) - Initial beta for 0.8
M src/gb/memory.csrc/gb/memory.c

@@ -649,7 +649,15 @@ }

break; case GB_REGION_EXTERNAL_RAM: case GB_REGION_EXTERNAL_RAM + 1: - mLOG(GB_MEM, STUB, "Unimplemented memory Patch8: 0x%08X", address); + if (memory->rtcAccess) { + memory->rtcRegs[memory->activeRtcReg] = value; + } else if (memory->sramAccess && memory->sram && memory->mbcType != GB_MBC2) { + // TODO: Remove sramAccess check? + memory->sramBank[address & (GB_SIZE_EXTERNAL_RAM - 1)] = value; + } else { + memory->mbcWrite(gb, address, value); + } + gb->sramDirty |= GB_SRAM_DIRT_NEW; return; case GB_REGION_WORKING_RAM_BANK0: case GB_REGION_WORKING_RAM_BANK0 + 2: