From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:49167) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YQNR4-00013u-44 for qemu-devel@nongnu.org; Tue, 24 Feb 2015 16:54:38 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1YQNQs-0007k8-9k for qemu-devel@nongnu.org; Tue, 24 Feb 2015 16:54:34 -0500 Received: from e36.co.us.ibm.com ([32.97.110.154]:37673) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YQNQr-0007js-Vk for qemu-devel@nongnu.org; Tue, 24 Feb 2015 16:54:22 -0500 Received: from /spool/local by e36.co.us.ibm.com with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted for from ; Tue, 24 Feb 2015 14:54:21 -0700 From: Michael Roth Date: Tue, 24 Feb 2015 15:48:09 -0600 Message-Id: <1424814498-6993-35-git-send-email-mdroth@linux.vnet.ibm.com> In-Reply-To: <1424814498-6993-1-git-send-email-mdroth@linux.vnet.ibm.com> References: <1424814498-6993-1-git-send-email-mdroth@linux.vnet.ibm.com> Subject: [Qemu-devel] [PATCH 34/43] sb16: fix interrupt acknowledgement List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-devel@nongnu.org Cc: Paolo Bonzini , qemu-stable@nongnu.org, Gerd Hoffmann From: Paolo Bonzini SoundBlaster 16 emulation is very broken and consumes a lot of CPU, but a small fix was suggested offlist and it is enough to fix some games. I got Epic Pinball to work with the "SoundBlaster Clone" option. The processing of the interrupt register is wrong due to two missing "not"s. This causes the interrupt flag to remain set even after the Acknowledge ports have been read (0x0e and 0x0f). The line was introduced by commit 85571bc (audio merge (malc), 2004-11-07), but the code might have been broken before because I did not look closely at the huge patches from 10 years ago. Reported-by: Joshua Bair Cc: Gerd Hoffmann Cc: qemu-stable@nongnu.org Signed-off-by: Paolo Bonzini Signed-off-by: Gerd Hoffmann (cherry picked from commit 9939375c282a0f97afa69dc6799d3c77aaf7d544) Signed-off-by: Michael Roth --- hw/audio/sb16.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/hw/audio/sb16.c b/hw/audio/sb16.c index bda26d0..444eb9e 100644 --- a/hw/audio/sb16.c +++ b/hw/audio/sb16.c @@ -999,7 +999,7 @@ static IO_READ_PROTO (dsp_read) retval = (!s->out_data_len || s->highspeed) ? 0 : 0x80; if (s->mixer_regs[0x82] & 1) { ack = 1; - s->mixer_regs[0x82] &= 1; + s->mixer_regs[0x82] &= ~1; qemu_irq_lower (s->pic); } break; @@ -1008,7 +1008,7 @@ static IO_READ_PROTO (dsp_read) retval = 0xff; if (s->mixer_regs[0x82] & 2) { ack = 1; - s->mixer_regs[0x82] &= 2; + s->mixer_regs[0x82] &= ~2; qemu_irq_lower (s->pic); } break; -- 1.9.1