Keyboard issues, native DOS mode
Hi all,
Some of you will already be aware of this issue, as it has been discussed on #qemu on freenode (irc). This issue is as follows.
http://www.haltech.com.au/downloads/E6GMv509.zip
This particular application, which is used to tune the aftermarket fuel injection computer in my car, has a problem when running in native DOS mode, where two keypresses are received, instead of just the one that
was actually pressed. In particular I'm referring to the cursor keys.
Interestingly enough, this behaviour is not exhibited when the program is run from within either win98se or win2k. However, as this program needs direct access to the serial port, this is not a desirable workaround.
You can test this by selecting offline mode when starting the application. Press ALT F to get to the file menu, and try navigating around with the cursor keys.
Apologies that this issue has already been posted in the forums under the Linux section, however as this is of a more technical nature I thought it would be best directed towards the developer's list.
It might be of note that I'm using a debian sid system, but I've also tried it on Ubuntu Breezy, and several others have reproduced the same result.
Regards,
David B.
Quoted 6 lines · David Burrows
Hi all,
This particular application, which is used to tune the aftermarket fuel injection computer in my car, has a problem when running in native DOS mode, where two keypresses are received, instead of just the one that was actually pressed. In particular I'm referring to the cursor keys.
Patch attached.
Quoted 3 lines
Interestingly enough, this behaviour is not exhibited when the program is run from within either win98se or win2k.
w2k (don't say win2k or win98 - see RMS on why) emulates its own kbd controller, Hence this bus would never have manifested.
Not sure how w98 handles this but I'd guess it does emulation as well, so you don't see the bug for the same reason.
Quoted 5 lines
It might be of note that I'm using a debian sid system, but I've also tried it on Ubuntu Breezy, and several others have reproduced the same result.
Shouldn't matter, as it's a qemu bug so it'd be present on all versions (in fact it'd be present when running DOS in qemu on a Windows host iiuc).
Signature · 2 lines
Infinite complexity begets infinite beauty. Infinite precision begets infinite perfection.
ps2.c renamed from ps2.c.orig +10 -0
@@ -146,6 +146,7 @@PS2State *s = (PS2State *)opaque;PS2Queue *q;int val, index; +static int hahaha =0 ; q = &s->queue;if (q->count ==0 ) {
@@ -156,7 +157,16 @@if (index <0 ) index =PS2_QUEUE_SIZE -1 ; val = q->data[index]; +if (hahaha){ +val =0 ; +hahaha =0 ; +printf ("many badness\n" ); +}else +{ hahaha =1 ; +printf ("some badness\n" ); +} }else { +hahaha =0 ; val = q->data[q->rptr];if (++q->rptr ==PS2_QUEUE_SIZE ) q->rptr =0 ;
Quoted 9 lines · Jim C. Brown
Quoted 6 lines · David Burrows
Hi all,
This particular application, which is used to tune the aftermarket fuel injection computer in my car, has a problem when running in native DOS mode, where two keypresses are received, instead of just the one that was actually pressed. In particular I'm referring to the cursor keys.
Patch attached.
Incidently, I tried to fix this by removing the bugfix for EMM886.EXE completely but this just caused your program to break. It didn't appear to recieve any keypresses whatsoever. Strange.
Signature · 2 lines
Infinite complexity begets infinite beauty. Infinite precision begets infinite perfection.