From: Paolo Bonzini <pbonzini@redhat.com>
To: qemu-devel@nongnu.org
Cc: j_bair@bellsouth.net, Gerd Hoffmann <kraxel@redhat.com>,
qemu-stable@nongnu.org
Subject: [Qemu-devel] [PATCH] sb16: fix interrupt acknowledgement
Date: Tue, 20 Jan 2015 17:23:48 +0100 [thread overview]
Message-ID: <1421771028-5251-1-git-send-email-pbonzini@redhat.com> (raw)
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 <j_bair@bellsouth.net>
Cc: Gerd Hoffmann <kraxel@redhat.com>
Cc: qemu-stable@nongnu.org
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
---
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;
--
2.1.0
next reply other threads:[~2015-01-20 16:24 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-01-20 16:23 Paolo Bonzini [this message]
2015-01-21 9:32 ` [Qemu-devel] [Qemu-stable] [PATCH] sb16: fix interrupt acknowledgement Michael Tokarev
2015-01-21 10:00 ` Paolo Bonzini
2015-01-22 9:56 ` [Qemu-devel] " Gerd Hoffmann
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1421771028-5251-1-git-send-email-pbonzini@redhat.com \
--to=pbonzini@redhat.com \
--cc=j_bair@bellsouth.net \
--cc=kraxel@redhat.com \
--cc=qemu-devel@nongnu.org \
--cc=qemu-stable@nongnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).