all repos — mgba @ 944604fe841154501570c503dd3558a7749b7f6f

mGBA Game Boy Advance Emulator

DS DMA: Fix Clearning enable bit clearing too much
Vicki Pfau vi@endrift.com
Sun, 26 Feb 2017 19:06:55 -0800
commit

944604fe841154501570c503dd3558a7749b7f6f

parent

b86fe419ec65ebdab1f68f0cc619ddbdaf3217e5

1 files changed, 1 insertions(+), 1 deletions(-)

jump to
M src/ds/dma.csrc/ds/dma.c

@@ -123,7 +123,7 @@ if (!GBADMARegisterIsRepeat(dma->reg) || GBADMARegisterGetTiming(dma->reg) == DMA_TIMING_NOW) {

dma->reg = GBADMARegisterClearEnable(dma->reg); // Clear the enable bit in memory - memory->io[(DS_REG_DMA0CNT_HI + memory->activeDMA * (DS_REG_DMA1CNT_HI - DS_REG_DMA0CNT_HI)) >> 1] &= 0x7FE0; + memory->io[(DS_REG_DMA0CNT_HI + memory->activeDMA * (DS_REG_DMA1CNT_HI - DS_REG_DMA0CNT_HI)) >> 1] &= 0x7FFF; } if (GBADMARegisterGetDestControl(dma->reg) == DMA_INCREMENT_RELOAD) { dma->nextDest = dma->dest;