1
0
Fork 0

Make autoinit exit work and prevent double single cycle transfers when quitting autoinit

Imported-from: https://svn.code.sf.net/p/dosbox/code-0/dosbox/trunk@4174
This commit is contained in:
Sjoerd van der Berg 2018-11-19 18:34:49 +00:00
parent 9ffb5627aa
commit 72f8544723

View file

@ -537,6 +537,8 @@ static void GenerateDMASound(Bitu size) {
sb.dma.mode = DSP_DMA_NONE;
}
else {
//Copied this value as the count for the final single cycle
sb.dma.total = 0;
LOG(LOG_SB, LOG_NORMAL)("Switch to Single cycle transfer begun");
}
} else {
@ -996,6 +998,8 @@ static void DSP_DoCommand(void) {
DSP_SB2_ABOVE;
/* Set mode to single transfer so it ends with current block */
sb.dma.autoinit=false; //Should stop itself
sb.dma.total = 0; //This will cancel the switch to single cycle mode
//Should really have some sb.dma.autoexit variable since we don't support continue autoinit dsp commands
break;
case 0xe0: /* DSP Identification - SB2.0+ */
DSP_FlushData();