GBA: Fix DMA in savestates hopefully for good this time
Jeffrey Pfau jeffrey@endrift.com
Fri, 14 Nov 2014 01:19:34 -0800
1 files changed,
4 insertions(+),
3 deletions(-)
jump to
M
src/gba/gba-io.c
→
src/gba/gba-io.c
@@ -62,9 +62,9 @@ 0, 0, 0, 0, 0, 0, 0, 0,
1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, // DMA - 1, 1, 1, 1, 1, 1, 1, 1, - 1, 1, 1, 1, 1, 1, 1, 1, - 1, 1, 1, 1, 1, 1, 1, 1, + 0, 0, 0, 0, 0, 1, 0, 0, + 0, 0, 0, 1, 0, 0, 0, 0, + 0, 1, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, // Timers@@ -478,6 +478,7 @@
gba->timersEnabled = 0; memcpy(gba->timers, state->timers, sizeof(gba->timers)); for (i = 0; i < 4; ++i) { + gba->memory.dma[i].reg = state->io[(REG_DMA0CNT_HI + i * 12) >> 1]; gba->memory.dma[i].nextSource = state->dma[i].nextSource; gba->memory.dma[i].nextDest = state->dma[i].nextDest; gba->memory.dma[i].nextCount = state->dma[i].nextCount;