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:
parent
66e7ddcea5
commit
617fd7006d
1 changed files with 5 additions and 2 deletions
|
@ -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 */
|
||||
|
|
Loading…
Add table
Reference in a new issue