From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1FvVZw-0006Vv-DY for qemu-devel@nongnu.org; Wed, 28 Jun 2006 04:39:20 -0400 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1FvVZt-0006UI-S7 for qemu-devel@nongnu.org; Wed, 28 Jun 2006 04:39:19 -0400 Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1FvVZt-0006UC-LI for qemu-devel@nongnu.org; Wed, 28 Jun 2006 04:39:17 -0400 Received: from [213.165.64.21] (helo=mail.gmx.net) by monty-python.gnu.org with smtp (Exim 4.52) id 1FvVmB-0007tt-4j for qemu-devel@nongnu.org; Wed, 28 Jun 2006 04:51:59 -0400 Message-ID: <44A24028.20005@gmx.de> Date: Wed, 28 Jun 2006 10:39:04 +0200 From: Oliver Gerlich MIME-Version: 1.0 Subject: Re: [Qemu-devel] qemu kbd emulation References: <200606281027.31617.zswi@pers.pl> In-Reply-To: <200606281027.31617.zswi@pers.pl> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit 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 RafaƂ Cygnarowski wrote: > Hi! > > I wanted to correct qemu emulation of keyboard under DOS as > guest OS, so I started with simple pascal program to check > what happen on guest DOS (and DOS) when I press up/down/left/right > keys. > > The program was: > > -- BEGIN test.pas -- > program time; {$M 2048,0,0} > uses crt, dos; > var OldKeyInt : procedure; > > procedure NewKeyInt; interrupt; > begin > write(Port[$60]); write(' ') > inline($9c); OldKeyInt; > end; > > begin > getintvec($9, addr(OldKeyInt)); > setintvec($9, @NewKeyInt); > keep(0); > end. > -- END test.pas -- > > and it look that qemu does not generate some codes before > pressing and after releasing arrow keys. For example pressing > up key on qemu looks like: > > 224 72 224 200 > > while without emulation it looks: > > 224 42 224 72 224 200 224 170. > > It's true only for single keystrokes, but good for the > beginning. > > So I tried to patch qemu for this and created following patch: > > -- BEGIN sdl.patch -- [snipped patch] > -- END sdl.patch -- > > Unfortunatelly results of this patch completely suprised me. After this patch > my test program produces results witch are impossible to produce in normal > situation. Example output for UP key was: > > 224 224 72 88224 224 170. > > What's wrong with this patch? What I'm doing wrong? > > Regards, What SDL version are you using? I noticed some strange keyboard behavior with SDL 1.2.9 (Debian package), and this didn't happen when using SDL 1.2.10 (self-built). The problems were things like no Shift-Tab in Windows, and "showkey" under Linux displaying strange keycodes when using Shift-Tab. Regards, Oliver