From 2fbd377092414330c261fd6ae635c2712e743281 Mon Sep 17 00:00:00 2001 From: OBattler Date: Mon, 14 Nov 2016 04:55:48 +0100 Subject: [PATCH] DMA master reset register now clears the status register; Implemented DMA mask reset register. --- src/dma.c | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/src/dma.c b/src/dma.c index 12841b8b3..d262cf50d 100644 --- a/src/dma.c +++ b/src/dma.c @@ -117,9 +117,14 @@ void dma_write(uint16_t addr, uint8_t val, void *priv) case 0xd: /*Master clear*/ dma.wp = 0; + dma.stat = 0; dma.m = 0xf; return; + case 0xe: /*Mask reset*/ + dma.m = 0; + return; + case 0xf: /*Mask write*/ dma.m = val & 0xf; return; @@ -194,9 +199,14 @@ void dma16_write(uint16_t addr, uint8_t val, void *priv) case 0xd: /*Master clear*/ dma16.wp = 0; + dma16.stat = 0; dma16.m = 0xf; return; + case 0xe: /*Mask reset*/ + dma16.m = 0; + return; + case 0xf: /*Mask write*/ dma16.m = val&0xf; return;