[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Qemu-devel] [PATCH 0 of 1] Fix for DOS keyboard problems

From: Stefan Ring
Subject: Re: [Qemu-devel] [PATCH 0 of 1] Fix for DOS keyboard problems
Date: Sun, 23 Aug 2009 19:20:31 +0200

On Sun, Aug 23, 2009 at 2:44 PM, Jamie Lokier<address@hidden> wrote:
> Stefan Ring wrote:
>> The keyboard is still very unreliable when a keyboard driver is
>> loaded inside DOS (I assume that the keyboard driver completely
>> disables the BIOS handler).  This behavior is also present without
>> my patch, and I personally don't care about it, so this should not
>> be an obstacle.
> Can you say a bit more about what your patch actually fixes?
> I've been using QEMU with several versions of MS-DOS and haven't
> noticed any keyboard problems.
> I even use various "halt-on-idle" idle programs, and haven't noticed
> any keyboard problems.
> So what behaviour does your patch fix?

The particular problem that I noticed and that is 100% reproducible
and also very understandable when you look at what the DOS programs
do, is that in Borland's Text-Mode DOS IDEs (most likely BC++ 3.1, 4,
Turbo Pascal 6 but definitely Turbo Pascal 7) and IIRC also in Turbo
Vision programs generated by them, every cursor key press is
interpreted twice. So when you open up the leftmost menu and press the
down cursor key once, the third entry gets selected instead of the
second one.

The reason for this is that said programs install an IRQ 1 handler
which does little more than read from port 60h and pass control to the
underlying BIOS (or keyboard driver) handler. The BIOS handler reads
port 60h again, and should apparently see the same value as the first
handler. The problem with the cursor keys is that they generate two
scan codes in succession on port 60h that should be read by two
separate IRQ handler activations but because QEMU's original behavior
is to consume one data byte per read from 60h, the data gets used up
too fast.

reply via email to

[Prev in Thread] Current Thread [Next in Thread]