borland IDEs double up cursor key presses (need timing on PS2 port input)

Bug #1895363 reported by Michael Slade
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
QEMU
Undecided
Unassigned

Bug Description

Most DOS-era IDEs from Borland (I have tried Borland C++ 2.0, Borland C++ 3.1 and Turbo Pascal 7.1) exhibit strange responses to the keyboard. Cursor keys are registered twice, so each press of a cursor key causes the cursor to move twice. Also the other keys occasionally are missed or duplicated.

From an internet search, the problem appears to be this. These programs read the PS2 input register multiple times per incoming byte, on the assumption that the byte will remain there for at least a few hundred microseconds, before the next byte (if any) appears there. qemu treats a read of the register by the guest as an acknowledgement of the incoming byte and puts the next byte into the register immediately, thus breaking the programs that expect each successive byte to stay in place for a while.

The obvious solution is to use a timer to advance through the queued bytes.

Revision history for this message
Michael Slade (mslade) wrote :

This virtualbox bug talks about the same thing, and also mentions qemu:

https://www.virtualbox.org/ticket/58

One of the people in the conversation created a patch for qemu which wasn't accepted:

http://qemu.11.n7.nabble.com/PATCH-Fix-for-DOS-keyboard-problems-td114076.html

Revision history for this message
Michael Slade (mslade) wrote :

Just found the complete conversation regarding the abovementioned patch:

https://lists.nongnu.org/archive/html/qemu-devel/2009-08/msg01182.html

Revision history for this message
Philippe Mathieu-Daudé (philmd) wrote :

Possible fix:
https://<email address hidden>/msg804823.html

Changed in qemu:
status: New → Confirmed
Thomas Huth (th-huth)
Changed in qemu:
status: Confirmed → In Progress
Revision history for this message
Thomas Huth (th-huth) wrote :

The patch mentioned by Philippe has now been merged to the QEMU master branch (commit d1e45668d2128b064). Michael, could you maybe check the current git version to see whether this problem has been fixed now?

Changed in qemu:
status: In Progress → Fix Committed
Thomas Huth (th-huth)
Changed in qemu:
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.