View Full Version : DOSBOX freezes keyboard input
Aldaraia
08-06-2012, 06:41 PM
Recently I've been playing Duke Nukem II through DOSBOX 0.74, on W7. I've had several other issues getting it to work right such as inverted colors and black bars on the bottom which I've managed to solve.
There is still one problem that is proving very bothersome. Occasionally DOSBOX will freeze up just for a second. Afterwards, the keyboard will have no response, and whatever key I was last using, will be 'stuck'. For instance if I was moving right and DOSBOX froze up, my character would be endlessly moving to the right, even if I let go of the button.
So far the only way to fix it is to hit the Windows button and get back into DOSBOX as fast as humanly possible before Duke Nukem ends up walking off a cliff. Since I cannot pause when this happens, this has caused me countless unnecessary deaths.
Any help would be greatly appreciated.
The Fifth Horseman
08-06-2012, 11:02 PM
Default DOSBox configuration?
Eagle of Fire
08-06-2012, 11:55 PM
I don't know that much about new systems... But it sounds like you have lag issues because you don't have enough CPU power. Of course I could be completely off track but that's what I'd guess out of it.
Now, mentioning a shortfall of CPU power for a new system might sound stupid but I don't know if DOSBox has been optimized for multi cores yet. If the answer is no then you might actually have less CPU power available for this program than I do with my old 10 years old rig. And by this I mean only one of your cores would be used by DOSBox, and that core is usually the one used by Windows too so if you have a dual core you simply divide your total megahertz by two and reduce from that all the resources currently used by the OS.
So, long story short... Did you try reducing cycles manually to see if it increases performance?
Aldaraia
09-06-2012, 03:18 AM
Nah, I only got a 2.4ghz single-core processor, so I don't see the CPU being the problem. I usually have to crank the cycles up to about 5000 to get the game going in good playable speed, though the confg does mention that too high of a speed causes lag, I dunno if this lag is capable of causing the keyboard to become unresponsive until I alt-tab back to DOSBOX.
Currently I've got the output mode set to 'ddraw' with the aspect set to 'true', the scaler being set to 'supereagle forced'. Both the cores and cycles are set to auto as well. I suppose I can lower the cycles below the default 3000 to see what good it will do.
EDIT: CPU spikes that cause DOSBOX to momentarily lag, should these lags ever be capable of temporarily disabling keyboard input? I've decided to give DNII another try and set the cycles to 4000 and I got a wonderful 20 minutes of playtime in before the lag happened again. I'm guessing somewhere around 3500-4000 is the sweet spot for this game if the cycles are to blame. Should DOSBOX usually be ran without any other programs running?
Eagle of Fire
09-06-2012, 04:22 AM
Thing is, does it have that problem only with that specific game or with any game you run with DOSBox?
If CPU or cycles are not a problem then there might be a program interfering in the background while you play. Or it could simply be DOSBox which is acting up by itself too, y'know.
Do you use a frontend like Boxer or whatever? Those are known to create problems you would not have if you would load the game normally.
Aldaraia
09-06-2012, 05:19 AM
I have not tested any other games yet since I downloaded DOSBOX just a few days. I plan to do it promptly though.
I load the game straight through the typical TUI of DOS itself. I did happen to notice something interesting in the status window just by chance though.
"vga" is not a valid value for variable: machine.
It might now be rest it to default value: svga_s3
The Fifth Horseman
09-06-2012, 06:59 AM
Nah, I only got a 2.4ghz single-core processor, so I don't see the CPU being the problem. I usually have to crank the cycles up to about 5000 to get the game going in good playable speed, though the confg does mention that too high of a speed causes lag, I dunno if this lag is capable of causing the keyboard to become unresponsive until I alt-tab back to DOSBOX. Unlikely.
EDIT: CPU spikes that cause DOSBOX to momentarily lag, should these lags ever be capable of temporarily disabling keyboard input? I don't think they should.I'm guessing somewhere around 3500-4000 is the sweet spot for this game if the cycles are to blame.The cycles aren't to blame. Should DOSBOX usually be ran without any other programs running?Depend on what programs those are. Any more resource (and CPU) demanding ones should be closed down before starting DOSBox. If you are experiencing issues, that's one of the first things to check. Another is scanning your system for malware. Another yet is checking if the issue happens with a different keyboard (just to make sure).
Aldaraia
09-06-2012, 07:02 AM
Unlikely.
I don't think they should.The cycles aren't to blame. Depend on what programs those are. Any more resource (and CPU) demanding ones should be closed down before starting DOSBox. If you are experiencing issues, that's one of the first things to check. Another is scanning your system for malware. Another yet is checking if the issue happens with a different keyboard (just to make sure).
I think it just might be the game itself. After playing Masters of Orion for awhile, I haven't encountered the problem once. It probably just depends on the type of game apparently.
DarthHelmet86
09-06-2012, 08:05 AM
I have Duke 2, I play it rather often as a place holder for videos about streaming and the like on my Youtube account, I have never run in to any input lag related to the game. Perhaps your copy of Duke is corrupted in some way or there still might be an issue. MoO isn't the most button heavy game, perhaps try another platformer like Duke that needs rapid presses of buttons.
Scatty
09-06-2012, 01:31 PM
Nah, I only got a 2.4ghz single-core processor, so I don't see the CPU being the problem. I usually have to crank the cycles up to about 5000 to get the game going in good playable speed, though the confg does mention that too high of a speed causes lag, I dunno if this lag is capable of causing the keyboard to become unresponsive until I alt-tab back to DOSBOX.
Currently I've got the output mode set to 'ddraw' with the aspect set to 'true', the scaler being set to 'supereagle forced'. Both the cores and cycles are set to auto as well. I suppose I can lower the cycles below the default 3000 to see what good it will do.
EDIT: CPU spikes that cause DOSBOX to momentarily lag, should these lags ever be capable of temporarily disabling keyboard input? I've decided to give DNII another try and set the cycles to 4000 and I got a wonderful 20 minutes of playtime in before the lag happened again. I'm guessing somewhere around 3500-4000 is the sweet spot for this game if the cycles are to blame. Should DOSBOX usually be ran without any other programs running?
Set the CPU cycles to 10.000 or 15.000 instead of auto, with the processor you mentioned it should be no problem, and the option auto not always works well. What you need is more cycles, not less than 3000. Also try setting the core to core=dynamic, with auto it happens to be set to normal, and that is slower.
Vga isn't a valid option for machine, try vgaonly or svga_s3 as suggested by DosBox itself.
See if all that above will be of any help. Good luck.
Smiling Spectre
09-06-2012, 02:02 PM
Hmm, I seen exactly the same several times... but it was long time ago... but I don't use Official builds anymore, so maybe that's really "official" bug...
But also several times it was totally different problem. Lost focus. If any application can draw focus to itself from DOSBox, it will "stuck" in last "remembered" position, until you'll return to it.
And, of course, "pointing" software, like MoO, will be much less affected by it then "moving" like Duke. Just because "stuck" pointer will do nothing in MoO, and you'll release it in next click.
Did you tried de-capture mouse with Alt+F10 instead Windows key? If it is capture issue it would help.
Clicking left mouse button theoretically would work too, but I never tried it. :)
vBulletin® v3.7.1, Copyright ©2000-2025, Jelsoft Enterprises Ltd.