GB, GBA Savedata: Fix savestate loading overwriting saves on reset
Vicki Pfau vi@endrift.com
Wed, 25 Jul 2018 21:27:51 -0700
3 files changed,
3 insertions(+),
1 deletions(-)
M
CHANGES
→
CHANGES
@@ -43,6 +43,7 @@ - GBA BIOS: Fix BitUnPack final byte
- GB I/O: DMA register is R/W - GB Video: Fix SCX timing - GBA Video: Improve sprite cycle counting (fixes mgba.io/i/1126) + - GB, GBA Savedata: Fix savestate loading overwriting saves on reset Misc: - GBA Timer: Use global cycles for timers - GBA: Extend oddly-sized ROMs to full address space (fixes mgba.io/i/722)
M
src/gb/gb.c
→
src/gb/gb.c
@@ -295,7 +295,6 @@ gb->memory.mbcType = GB_MBC_AUTODETECT;
gb->isPristine = false; gb->sramMaskWriteback = false; - GBSavedataUnmask(gb); GBSramDeinit(gb); if (gb->sramRealVf) { gb->sramRealVf->close(gb->sramRealVf);@@ -468,6 +467,7 @@ GBSIOReset(&gb->sio);
cpu->memory.setActiveRegion(cpu, cpu->pc); + gb->sramMaskWriteback = false; GBSavedataUnmask(gb); }
M
src/gba/gba.c
→
src/gba/gba.c
@@ -185,6 +185,7 @@ cpu->gprs[ARM_SP] = SP_BASE_SYSTEM;
struct GBA* gba = (struct GBA*) cpu->master; if (!gba->rr || (!gba->rr->isPlaying(gba->rr) && !gba->rr->isRecording(gba->rr))) { + gba->memory.savedata.maskWriteback = false; GBASavedataUnmask(&gba->memory.savedata); }