From 8d916cfa5a945058370c55042c3554ec1fc72cb7 Mon Sep 17 00:00:00 2001 From: Ralf Grillenberger Date: Wed, 28 Jul 2010 20:18:04 +0000 Subject: [PATCH] - Fix SB16 16-bit interrupt cause identification (makes games using CT-VOICE.DRV work). - Add SB16 identification bit for an older version of CT-VOICE.DRV Thanks ripsaw8080. Imported-from: https://svn.code.sf.net/p/dosbox/code-0/dosbox/trunk@3625 --- src/hardware/sblaster.cpp | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/src/hardware/sblaster.cpp b/src/hardware/sblaster.cpp index e0427e94..8dbd4799 100644 --- a/src/hardware/sblaster.cpp +++ b/src/hardware/sblaster.cpp @@ -504,6 +504,8 @@ static void GenerateDMASound(Bitu size) { sb.dma.left-=read; if (!sb.dma.left) { PIC_RemoveEvents(END_DMA_Event); + if (sb.dma.mode >= DSP_DMA_16) SB_RaiseIRQ(SB_IRQ_16); + else SB_RaiseIRQ(SB_IRQ_8); if (!sb.dma.autoinit) { LOG(LOG_SB,LOG_NORMAL)("Single cycle transfer ended"); sb.mode=MODE_NONE; @@ -515,8 +517,6 @@ static void GenerateDMASound(Bitu size) { sb.mode=MODE_NONE; } } - if (sb.dma.mode >= DSP_DMA_16) SB_RaiseIRQ(SB_IRQ_16); - else SB_RaiseIRQ(SB_IRQ_8); } } @@ -1345,7 +1345,8 @@ static Bit8u CTMIXER_Read(void) { return ret; case 0x82: /* IRQ Status */ return (sb.irq.pending_8bit ? 0x1 : 0) | - (sb.irq.pending_16bit ? 0x2 : 0); + (sb.irq.pending_16bit ? 0x2 : 0) | + ((sb.type == SBT_16) ? 0x20 : 0); default: if ( ((sb.type == SBT_PRO1 || sb.type == SBT_PRO2) && sb.mixer.index==0x0c) || /* Input control on SBPro */ (sb.type == SBT_16 && sb.mixer.index >= 0x3b && sb.mixer.index <= 0x47)) /* New SB16 registers */