mirror of
https://github.com/ekeeke/Genesis-Plus-GX.git
synced 2025-01-13 11:49:06 +01:00
[Core/CD] fixed potential edge case with CDC DMA halting
This commit is contained in:
parent
3397941b60
commit
30dfba4966
@ -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 */
|
||||
|
@ -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
|
||||
|
Loading…
x
Reference in New Issue
Block a user