From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1FJKNt-0000dC-5I for qemu-devel@nongnu.org; Tue, 14 Mar 2006 20:01:05 -0500 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1FJKNr-0000bJ-VZ for qemu-devel@nongnu.org; Tue, 14 Mar 2006 20:01:04 -0500 Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1FJKNr-0000b0-OK for qemu-devel@nongnu.org; Tue, 14 Mar 2006 20:01:03 -0500 Received: from [128.8.10.163] (helo=po1.wam.umd.edu) by monty-python.gnu.org with esmtp (Exim 4.52) id 1FJKSB-0001Td-0N for qemu-devel@nongnu.org; Tue, 14 Mar 2006 20:05:31 -0500 Received: from jbrown.mylinuxbox.org (jma-box.student.umd.edu [129.2.253.219]) by po1.wam.umd.edu (8.12.10/8.12.10) with ESMTP id k2F1142V000652 for ; Tue, 14 Mar 2006 20:01:04 -0500 (EST) Date: Tue, 14 Mar 2006 20:01:00 -0500 From: "Jim C. Brown" Subject: Re: [Qemu-devel] Keyboard issues, native DOS mode Message-ID: <20060315010100.GA17629@jbrown.mylinuxbox.org> References: <20060314191027.X71269@starbug.ugh.net.au> Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="k1lZvvs/B4yU6o8G" Content-Disposition: inline In-Reply-To: <20060314191027.X71269@starbug.ugh.net.au> Reply-To: qemu-devel@nongnu.org List-Id: qemu-devel.nongnu.org List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-devel@nongnu.org --k1lZvvs/B4yU6o8G Content-Type: text/plain; charset=us-ascii Content-Disposition: inline On Tue, Mar 14, 2006 at 07:40:58PM +1100, David Burrows wrote: > Hi all, > > This particular application, which is used to tune the aftermarket fuel > injection computer in my car, has a problem when running in native > DOS mode, where two keypresses are received, instead of just the one that > was actually pressed. In particular I'm referring to the cursor keys. Patch attached. > > Interestingly enough, this behaviour is not exhibited when the program is > run from within either win98se or win2k. w2k (don't say win2k or win98 - see RMS on why) emulates its own kbd controller, Hence this bus would never have manifested. Not sure how w98 handles this but I'd guess it does emulation as well, so you don't see the bug for the same reason. > > It might be of note that I'm using a debian sid system, but I've also > tried it on Ubuntu Breezy, and several others have reproduced the same > result. > Shouldn't matter, as it's a qemu bug so it'd be present on all versions (in fact it'd be present when running DOS in qemu on a Windows host iiuc). -- Infinite complexity begets infinite beauty. Infinite precision begets infinite perfection. --k1lZvvs/B4yU6o8G Content-Type: text/plain; charset=us-ascii Content-Disposition: attachment; filename="snadge-w.diff" --- ps2.c.orig Tue Mar 14 19:46:15 2006 +++ ps2.c Tue Mar 14 19:43:58 2006 @@ -146,6 +146,7 @@ PS2State *s = (PS2State *)opaque; PS2Queue *q; int val, index; +static int hahaha = 0; q = &s->queue; if (q->count == 0) { @@ -156,7 +157,16 @@ if (index < 0) index = PS2_QUEUE_SIZE - 1; val = q->data[index]; +if (hahaha){ +val = 0; +hahaha = 0; +printf("many badness\n"); +} else +{ hahaha = 1; +printf("some badness\n"); +} } else { +hahaha = 0; val = q->data[q->rptr]; if (++q->rptr == PS2_QUEUE_SIZE) q->rptr = 0; --k1lZvvs/B4yU6o8G--