VOGONS


First post, by guest

User metadata

https://sourceforge.net/tracker/index.php?fun … 580&atid=112580

See above Bochs bug report for keyboard test app that will allow reproduction of these problems:

I was running the Windows version of DOSBOX on W2K.

1) Pause key puts junk in the keyboard buffer (and doesn't pause anything). A real BIOS pauses the app.

2) Numlock acts like a Pause key was hit (the app halts) and the Numlock state bit in the BIOS flags is NOT set.

3) Scrollock acts like a Pause key was hit (the app halts) and the Scroll Lock status bit in the BIOS flags is NOT set.

4) CapsLock acts like a Pause key was hit (the app halts) and the Caps Lock status bit in the BIOS flags is NOT set.

5) Insert key sends wrong scan 5200 rather than 52E0. Insert mode status bit in BIOS flags is NOT set.

6) Holding down left Ctrl key indicates that the RIGHT Ctrl key is down in the BIOS status bits.

7) Holding down the left Alt key indicates that the RIGHT Alt key is down in the BIOS status bits.

😎 Forward slash above a 101's right side keypad sends wrong scans 352F (which is the scan for the forward slash above and to the right of space bar) rather than E02F

There's a lot more, but whoever does the keyboard handling NEEDS to get my test app and put a couple of machines side by side and really beat on it and compare a real DOS/BIOS to what's going on here.

Reply 1 of 10, by Qbix

User metadata
Rank DOSBox Author
Rank
DOSBox Author

Really ?
Oops 😀
Oh well. Keyboard states wrong aren't that handy 😀

But there are quite some appllications who actually ignore those states.
(and they have problems too 😀

Water flows down the stream
How to ask questions the smart way!

Reply 2 of 10, by Qbix

User metadata
Rank DOSBox Author
Rank
DOSBox Author

I downloaded the kbd.c

Unfortunately i don't have a spare pc to do it on ( and I run linux so no dos prompt)

pause and numlock (all the lock actually) are unhandled evens in dosbox and probably lock up the application as the scancode set returned by dosbox in those cases isn't very game friendly 😀

The keyboard input output table is "borrowed" from bochs.
(scancode translation table) At least I think. Including any errors (like that insert thingie you mentioned)

If you just post your username you registered then I will activate it without email.

edit: the alt en left things are allright as long as you don't get in the e0 state. (you can get out of it by pressing space)
We don't reset the e0 flag at the right moment that's why ctrl and alt mess up if you get in that state).

(at work I have win98 so that's where i did a short comparission. Dosbox isn't doing it that dramaticly wrong.)

Water flows down the stream
How to ask questions the smart way!

Reply 3 of 10, by guest

User metadata

Beware of using Windows v86 mode DOS sessions as a benchmark...Windows gets a lot of this wrong since they completely replace the KBD BIOS once in protected mode (which oddly enough can make some of the buggier KBD BIOS's work better...by not being there anymore 😁 )

In some cases, they've broken some DOS Int 21 API so badly in the v86 protected mode sessions it can cause an app to be blown away.

A bare Win98 startup boot disk running real mode should function OK though.

Reply 4 of 10, by Qbix

User metadata
Rank DOSBox Author
Rank
DOSBox Author

hmmm good point.
will try it without windows as well then.

Water flows down the stream
How to ask questions the smart way!

Reply 5 of 10, by Qbix

User metadata
Rank DOSBox Author
Rank
DOSBox Author

I corrected most of these problems in the attached file. Feel free to test it.

Remaining bugs:
that / and +- on numeric keyboard go wrong.
due sdl issues capslock and numlock pressed will be active as long as no other key is pressed

Pause/break sysreq/printscreen don't do a thing

Fixed bugs:
- keys above arrows (and arrows) return proper scancodes
- insert works (Only it's stateflag)
- alt-number numeric keyboard works
-Numlock works and changes the numerickeypad. shift does this as well (numlock state handled as well (as well leds)
-Capslock works. (including state flag)
-Scrollock works. (only the state flag)
-e0 thingie fixed so right ctrl/alt work fine
-alt/ctrl active doesn't get reset if one goes up while the other down

Changes:
removed unicode translation by not using port 60 but reading keyboard at one.

Introduced bugs:
Non-us keyboard user will not like it 😀
Although alt-number works so any character can be made

Water flows down the stream
How to ask questions the smart way!

Reply 6 of 10, by robertmo

User metadata
Rank l33t++
Rank
l33t++

"Stargate" uses Scroll Lock

Reply 7 of 10, by No name

User metadata

How can I use that file? I can edit it in Visual Studio.NET, but I don't know how to use it. Help please.

Reply 8 of 10, by Markus

User metadata
Rank Newbie
Rank
Newbie

You have Visual Studio .net installed and don't know what to do with a C++ source file?
You have to grab the whole sources, replace the original bios_keyboard.cpp with the one you downloaded and compile the whole thingie.
Or you can wait until 0.62 arrives...

Reply 9 of 10, by robertmo

User metadata
Rank l33t++
Rank
l33t++

I have noticed a strange thing with INSERT key in the latest dosbox20040414.zip

When I test these keys with keys.exe from game Star Control 2 (keyboard testing program) they seems to work.

But with rar.exe or my version of norton commander (vc.com) I cannot highlight files with the INS key (the one below Print Screen) (no action when pressed).
INS from numeric keypad highlights correctly.

Reply 10 of 10, by Markus

User metadata
Rank Newbie
Rank
Newbie

It's not too strange, there were at least three ways, a dos app could get keystrokes, there are two different Interrupts: 9h and 16h providing keyboard access, but I can't remember, if keyb.com catched both or only int 16h.
But a program can also read port 60 to get raw scan-codes.