VOGONS


First post, by Smiling Spectre

User metadata
Rank Newbie
Rank
Newbie

Recently I turn to Windows XP from Windows 98. It causes many shifts, and one of them - bad DOS emulation by WinXP. It's NTVDM eats all processor if let it to, but froze games if don't let. 🙁 Ok, there is DosBox!
So I try to start ADOM. All is good and working - just before I switch to other task. I return - oops, diagonal moves don't work. As is NumLock is off. But NumLock LED is lit! Hmmm. Press NumLock twice - it's LED lit and NumLock works again.
Begin experimenting. Receive very strange results.
It seems, there is something strange with DosBox and NumLock. It appears that - at least for ADOM - NumLock status tracked bad. I can press NumLock and it will work. Another time I'll press NumLock and nothing changes. And when I switching to another task - NumLock can be there, but most of time when I resume, program "not see" it's state, until I press it twice.
Very strange.
Is this ADOM bug, or DosBox can't handle NumLock correctly?

Reply 1 of 9, by Qbix

User metadata
Rank DOSBox Author
Rank
DOSBox Author

it's a videocard driver bug I think 😀
a non directx videocard mode in sdl causes wrong numlock handling is sdl which in turn in results in dosbox having the wrong numlock.

But dosbox it's numlock should be the same as your own numlock. (that is if I coded it allright)

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

Reply 2 of 9, by wd

User metadata
Rank DOSBox Author
Rank
DOSBox Author

What dosbox version are you using?

Reply 3 of 9, by Smiling Spectre

User metadata
Rank Newbie
Rank
Newbie

Qbix, bug is exist on the my home nVidia GeForce3Ti200 and on work internal SiS 651. At home, as I notice (but not experimenting too long) ADOM simply _always_ seen NomLock as "off" every time as I switch tasks. In the DosBox itself state of NumLock, seems, tracked accurately. On work I tested it more intensively, and NumLock seems tracked loosely - I can press it several times with no visible effect, and state of NumLock can preserved after task switching sometimes and other times - not.
On both machines, AFAIR, core is dynamic and this is only modification of default conf.
Oh! There is another difference with this machines.
wd, I have official 0.65 at home and ykhwong's build 20061007 at work.
Qbix, I don't know much about sdl, can you say, what to do to prevent this bug? 😀

Reply 4 of 9, by wd

User metadata
Rank DOSBox Author
Rank
DOSBox Author

This is an odd result of the way SDL handles the numlock key (i thought
it wouldn't be visible in 0.65 as the nunblock cursors are handled
different there).
SDL fires a keypress-event when numlock is activated, and a keyrelease-event
when numlock is deactivated. So you only get ONE event for a numlock
press+release. The mapper releases all keys when dosbox looses focus,
to avoid stuck keys.

Reply 5 of 9, by Smiling Spectre

User metadata
Rank Newbie
Rank
Newbie

So I see the cause. But what can _I_ do? Live with it? 😀

Reply 6 of 9, by wd

User metadata
Rank DOSBox Author
Rank
DOSBox Author

Play games that don't require numlock to be on?

Reply 7 of 9, by Smiling Spectre

User metadata
Rank Newbie
Rank
Newbie

No man - no problem. (c) 😀
So I take it as "solution absent". Ok...

Reply 8 of 9, by wd

User metadata
Rank DOSBox Author
Rank
DOSBox Author

Well everything should work fine as long as you don't switch away
from dosbox, and if you do so just hit numlock 2x.
There seem to be even some hacks against SDL sources so the lock
keys behave normally. Maybe there'll be a workaround/fix in the next
dosbox version.

Reply 9 of 9, by Smiling Spectre

User metadata
Rank Newbie
Rank
Newbie

1. Now I use DosBox primarily instead NTVDM. In "heavily switched" surrounding. 😀 Because I have very busy life at home (half-year-old twins+four years old son - it's _many_, as I see 😀, so I forced to share my time between several areas. Just now I try to play ADOM when I pack/repack archives, check my DVDs and make images for old disks. Every such process need 15-20 minutes, but no more, so task switching is nesessary. 😀 And I am sure, there is lot more games, especially old ones, that needs numlock. 😀
2. I'll share my observations for future versions of DosBox: as I notice at home, case is more complicated, than I think. When I switch to DosBox with NumLock on - it's ok, but needed double NumLock pressing. But when I switch with NumLock _off_ - it's bad. There will be no "NumLock" at all for DosBox. 🙁 DosBox don't track it anymore. Solution is switch off DosBox, activate NumLock and switch on again. %)