1
0
Fork 0

fix sb halt/continue sequence when no transfer in progress (thanks to tcostin, fixes some GameWizard crash)

Imported-from: https://svn.code.sf.net/p/dosbox/code-0/dosbox/trunk@3696
This commit is contained in:
Sebastian Strohhäcker 2011-04-19 19:46:02 +00:00
parent 66e7ddcea5
commit 617fd7006d

View file

@ -1,5 +1,5 @@
/*
* Copyright (C) 2002-2010 The DOSBox Team
* Copyright (C) 2002-2011 The DOSBox Team
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
@ -900,6 +900,9 @@ static void DSP_DoCommand(void) {
case 0xd0: /* Halt 8-bit DMA */
// DSP_ChangeMode(MODE_NONE);
// Games sometimes already program a new dma before stopping, gives noise
if (sb.mode==MODE_NONE) {
// possibly different code here that does not switch to MODE_DMA_PAUSE
}
sb.mode=MODE_DMA_PAUSE;
PIC_RemoveEvents(END_DMA_Event);
break;
@ -920,7 +923,7 @@ static void DSP_DoCommand(void) {
case 0xd4: /* Continue DMA 8-bit*/
if (sb.mode==MODE_DMA_PAUSE) {
sb.mode=MODE_DMA_MASKED;
sb.dma.chan->Register_Callback(DSP_DMA_CallBack);
if (sb.dma.chan!=NULL) sb.dma.chan->Register_Callback(DSP_DMA_CallBack);
}
break;
case 0xd9: /* Exit Autoinitialize 16-bit */