all repos — mgba @ d2804505cbcb66106ba79da9d132f4a415e2534e

mGBA Game Boy Advance Emulator

GBA: Add DMA timer check to savestate loading
Jeffrey Pfau jeffrey@endrift.com
Thu, 01 Oct 2015 22:16:22 -0700
commit

d2804505cbcb66106ba79da9d132f4a415e2534e

parent

9b667209554def8e1afc5dfe1246cd984090e11f

2 files changed, 5 insertions(+), 0 deletions(-)

jump to
M CHANGESCHANGES

@@ -32,6 +32,7 @@ - Qt: Prevent savestate window from opening while in multiplayer

- Qt: Disable menu items in multiplayer that don't make sense to have enabled - Qt: Dropping multiplayer windows works more cleanly now - GBA BIOS: Implement RegisterRamReset for SIO registers + - GBA: Additional savestate sanity checks 0.3.0: (2015-08-16) Features:
M src/gba/serialize.csrc/gba/serialize.c

@@ -107,6 +107,10 @@ if (state->timers[0].nextEvent < 0 || state->timers[1].nextEvent < 0 || state->timers[2].nextEvent < 0 || state->timers[3].nextEvent < 0) {

GBALog(gba, GBA_LOG_WARN, "Savestate is corrupted: timer nextEvent is negative"); error = true; } + if (state->dma[0].nextEvent < 0 || state->dma[1].nextEvent < 0 || state->dma[2].nextEvent < 0 || state->dma[3].nextEvent < 0) { + GBALog(gba, GBA_LOG_WARN, "Savestate is corrupted: DMA nextEvent is negative"); + error = true; + } if (state->audio.eventDiff < 0) { GBALog(gba, GBA_LOG_WARN, "Savestate is corrupted: audio eventDiff is negative"); error = true;