GBA DMA: Fix DMA0-2 lengths (fixes #1344)
Vicki Pfau vi@endrift.com
Sat, 09 Mar 2019 11:31:38 -0800
2 files changed,
4 insertions(+),
3 deletions(-)
M
src/gba/io.c
→
src/gba/io.c
@@ -461,19 +461,19 @@ GBAIOWrite32(gba, address - 2, gba->memory.io[(address >> 1) - 1] | (value << 16));
break; case REG_DMA0CNT_LO: - GBADMAWriteCNT_LO(gba, 0, value); + GBADMAWriteCNT_LO(gba, 0, value & 0x3FFF); break; case REG_DMA0CNT_HI: value = GBADMAWriteCNT_HI(gba, 0, value); break; case REG_DMA1CNT_LO: - GBADMAWriteCNT_LO(gba, 1, value); + GBADMAWriteCNT_LO(gba, 1, value & 0x3FFF); break; case REG_DMA1CNT_HI: value = GBADMAWriteCNT_HI(gba, 1, value); break; case REG_DMA2CNT_LO: - GBADMAWriteCNT_LO(gba, 2, value); + GBADMAWriteCNT_LO(gba, 2, value & 0x3FFF); break; case REG_DMA2CNT_HI: value = GBADMAWriteCNT_HI(gba, 2, value);