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 --