From bc45f566563b9f56490f2f30b7fe1962b164aef3 Mon Sep 17 00:00:00 2001 From: Robert Pengelly Date: Thu, 29 Oct 2026 20:55:22 +0000 Subject: [PATCH] Implement Sound Blaster DSP IRQ generation and acknowledgement --- cpu.c | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/cpu.c b/cpu.c index a6d4fa3..4246b82 100644 --- a/cpu.c +++ b/cpu.c @@ -2056,6 +2056,10 @@ static uint8_t io_read8 (CPU8086 *cpu, uint16_t port) { case 0x22E: /* Sound Blaster DSP read-buffer status / IRQ acknowledge */ + if (cpu->sb_dsp_irq_pending) { + cpu->pic[0].irr &= (uint8_t) ~0x80; + } + cpu->sb_dsp_irq_pending = 0; return cpu->sb_dsp_reply_count ? 0x80 : 0x00; @@ -2452,6 +2456,13 @@ static void io_write8 (CPU8086 *cpu, uint16_t port, uint8_t value) { break; + case 0xF2: /* Generate 8-bit DMA interrupt */ + + cpu->sb_dsp_irq_pending = 1; + cpu->pic[0].irr |= 0x80; + + break; + default: /* Unsupported DSP commands have no audio effect. */ -- 2.34.1