all repos — mgba @ 38613e1c78bbf840fb78abfe9f6d71a6a549d712

mGBA Game Boy Advance Emulator

GBA Serialize: Fix serializing DMA transfer register
Vicki Pfau vi@endrift.com
Fri, 24 Jan 2020 18:03:47 -0800
commit

38613e1c78bbf840fb78abfe9f6d71a6a549d712

parent

ab2a8c1e62c94c4b7c14af06a9e4647d982459f3

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

jump to
M CHANGESCHANGES

@@ -3,6 +3,7 @@ Emulation fixes:

- ARM: Fix ALU reading PC after shifting - ARM: Fix STR storing PC after address calculation - GBA Memory: Misaligned SRAM writes are ignored + - GBA Serialize: Fix serializing DMA transfer register Other fixes: - Qt: Only dynamically reset video scale if a game is running - Qt: Fix race condition with proxied video events
M src/gba/io.csrc/gba/io.c

@@ -950,7 +950,7 @@ STORE_32(gba->memory.dma[i].nextCount, 0, &state->dma[i].nextCount);

STORE_32(gba->memory.dma[i].when, 0, &state->dma[i].when); } - state->dmaTransferRegister = gba->memory.dmaTransferRegister; + STORE_32(gba->memory.dmaTransferRegister, 0, &state->dmaTransferRegister); GBAHardwareSerialize(&gba->memory.hw, state); }

@@ -993,7 +993,9 @@ GBADMASchedule(gba, i, &gba->memory.dma[i]);

} } GBAAudioWriteSOUNDCNT_X(&gba->audio, gba->memory.io[REG_SOUNDCNT_X >> 1]); - gba->memory.dmaTransferRegister = state->dmaTransferRegister; + + LOAD_32(gba->memory.dmaTransferRegister, 0, &state->dmaTransferRegister); + GBADMAUpdate(gba); GBAHardwareDeserialize(&gba->memory.hw, state); }