diff --git a/CHANGES b/CHANGES index 80b70b01c..3cbbde329 100644 --- a/CHANGES +++ b/CHANGES @@ -13,6 +13,7 @@ Emulation fixes: - GB Video: Fix window being enabled mid-scanline (fixes mgba.io/i/1328) - GB I/O: Filter IE top bits properly (fixes mgba.io/i/1329) - GBA Video: Fix scanline cache with scale factor change edge cases + - GBA DMA: Fix DMA0-2 lengths (fixes mgba.io/i/1344) Other fixes: - Qt: More app metadata fixes - Qt: Fix load recent from archive (fixes mgba.io/i/1325) diff --git a/src/gba/io.c b/src/gba/io.c index 2946e6ab7..c5a5a7c71 100644 --- a/src/gba/io.c +++ b/src/gba/io.c @@ -461,19 +461,19 @@ void GBAIOWrite(struct GBA* gba, uint32_t address, uint16_t value) { 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);