Back to home page

DOS ain't dead

Forum index page

Log in | Register

Back to the forum
Board view  Mix view

keyboard problem in details (Announce)

posted by Japheth Homepage, Germany (South), 09.01.2008, 09:38

> I never had any keyboard trouble ;)

What do you want to tell us with this fact? :-D

There IS a problem with Qemu's keyboard emulation, and the reason isn't unknown. As you surely know, the keyboard controller device regards a read of port 60h as "interrupt acknowledged", allowing it to continue to send data. However, "real" keyboard controllers will wait "some time" until they indeed continue to send. This behavior makes it safe for DOS TSR programs, which have hooked interrupt vector 9, to read port 60h and then call the old interrupt handler (which will repeat the port 60h read access and get the very same data).

Qemu's keyboard emulation, however, lacks this small delay. This causes troubles only if

1. more than 1 program hooked IRQ 1 and reads port 60h AND
2. the keyboard controller has more than 1 byte to send

The second condition is true for "enhanced" keys, which consists of 2 bytes (E0 xx or E1 xx).

The fix is to use a timer to emulate the delay. DosBox shows how it is to be done. However, since this is virtually a problem for DOS guests only, I doubt that we'll see a fix unless it is done by ... :no:

---
MS-DOS forever!

 

Complete thread:

Back to the forum
Board view  Mix view
22632 Postings in 2109 Threads, 402 registered users, 463 users online (1 registered, 462 guests)
DOS ain't dead | Admin contact
RSS Feed
powered by my little forum