diff --git a/core/cd_hw/scd.c b/core/cd_hw/scd.c index 0e3411a..f0a061b 100644 --- a/core/cd_hw/scd.c +++ b/core/cd_hw/scd.c @@ -1003,9 +1003,9 @@ static void scd_write_byte(unsigned int address, unsigned int data) /* synchronize CDC DMA with SUB-CPU */ cdc_dma_update(s68k.cycles); - /* halt CDC DMA to 2M Word-RAM */ + /* halt CDC DMA to 2M Word-RAM (if still running) */ + cdc.halted_dma_w = cdc.dma_w; cdc.dma_w = 0; - cdc.halted_dma_w = word_ram_2M_dma_w; } /* Word-RAM is returned to MAIN-CPU */ @@ -1341,9 +1341,9 @@ static void scd_write_word(unsigned int address, unsigned int data) /* synchronize CDC DMA with SUB-CPU */ cdc_dma_update(s68k.cycles); - /* halt CDC DMA to 2M Word-RAM */ + /* halt CDC DMA to 2M Word-RAM (if still running) */ + cdc.halted_dma_w = cdc.dma_w; cdc.dma_w = 0; - cdc.halted_dma_w = word_ram_2M_dma_w; } /* Word-RAM is returned to MAIN-CPU */ diff --git a/core/mem68k.c b/core/mem68k.c index b060040..81e9d80 100644 --- a/core/mem68k.c +++ b/core/mem68k.c @@ -763,9 +763,9 @@ void ctrl_io_write_byte(unsigned int address, unsigned int data) /* synchronize CDC DMA with MAIN-CPU */ cdc_dma_update((m68k.cycles * SCYCLES_PER_LINE) / MCYCLES_PER_LINE); - /* halt CDC DMA to PRG-RAM */ + /* halt CDC DMA to PRG-RAM (if still running) */ + cdc.halted_dma_w = cdc.dma_w; cdc.dma_w = 0; - cdc.halted_dma_w = prg_ram_dma_w; } } else @@ -1092,9 +1092,9 @@ void ctrl_io_write_word(unsigned int address, unsigned int data) /* synchronize CDC DMA with MAIN-CPU */ cdc_dma_update((m68k.cycles * SCYCLES_PER_LINE) / MCYCLES_PER_LINE); - /* halt CDC DMA to PRG-RAM */ + /* halt CDC DMA to PRG-RAM (if still running) */ + cdc.halted_dma_w = cdc.dma_w; cdc.dma_w = 0; - cdc.halted_dma_w = prg_ram_dma_w; } } else