mirror of https://github.com/mgba-emu/mgba.git
GBA: Fix DMA in savestates hopefully for good this time
This commit is contained in:
parent
d3a60f6555
commit
793f552f43
|
@ -62,9 +62,9 @@ static const int _isSpecialRegister[REG_MAX >> 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,
|
1, 1, 1, 1, 0, 0, 0, 0,
|
||||||
// DMA
|
// DMA
|
||||||
1, 1, 1, 1, 1, 1, 1, 1,
|
0, 0, 0, 0, 0, 1, 0, 0,
|
||||||
1, 1, 1, 1, 1, 1, 1, 1,
|
0, 0, 0, 1, 0, 0, 0, 0,
|
||||||
1, 1, 1, 1, 1, 1, 1, 1,
|
0, 1, 0, 0, 0, 0, 0, 1,
|
||||||
0, 0, 0, 0, 0, 0, 0, 0,
|
0, 0, 0, 0, 0, 0, 0, 0,
|
||||||
0, 0, 0, 0, 0, 0, 0, 0,
|
0, 0, 0, 0, 0, 0, 0, 0,
|
||||||
// Timers
|
// Timers
|
||||||
|
@ -478,6 +478,7 @@ void GBAIODeserialize(struct GBA* gba, struct GBASerializedState* state) {
|
||||||
gba->timersEnabled = 0;
|
gba->timersEnabled = 0;
|
||||||
memcpy(gba->timers, state->timers, sizeof(gba->timers));
|
memcpy(gba->timers, state->timers, sizeof(gba->timers));
|
||||||
for (i = 0; i < 4; ++i) {
|
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].nextSource = state->dma[i].nextSource;
|
||||||
gba->memory.dma[i].nextDest = state->dma[i].nextDest;
|
gba->memory.dma[i].nextDest = state->dma[i].nextDest;
|
||||||
gba->memory.dma[i].nextCount = state->dma[i].nextCount;
|
gba->memory.dma[i].nextCount = state->dma[i].nextCount;
|
||||||
|
|
Loading…
Reference in New Issue