Disable keyboard buffer

Having problems with a specific game or application? Post your problems here!

Disable keyboard buffer

Postby xarx » 2017-11-30 @ 12:07

I'm trying to make work a DOS-port of an old 8-bit console arcade game (Montezuma's Revenge). I have tried several different executables, but they all have the same problem with keyboard, and are unplayable. At first, the game-character makes a step, chucks, and then it starts running. When you release the key, the character keeps running, and after a few seconds it stops.

The problem is caused by the fact that the game does not access the key-states directly but uses the buffered key-stream. I tried to use a program like "turbokey" or "modex", that allows to set the initial delay and repeat frequency. This helps a little, but the game is still unplayable.

Code: Select all
turbokey A 1
or
Code: Select all
mode delay=1 rate=32

Is there a setting in Dosbox that allows to disable the keyboard-buffer completely? I don't believe there is a DOS utility that would allow this, in any case I've found none.
Or would you have a better suggestion how to make the game playable?
xarx
Newbie
 
Posts: 5
Joined: 2017-11-30 @ 11:42

Re: Disable keyboard buffer

Postby ripsaw8080 » 2017-11-30 @ 12:54

You can't really disable the keyboard buffer, although it's technically possible to make it hold only one keypress. In any case, use "turbokey m2" (no space between "m" and "2") for longer typematic delays like those of an original IBM PC. You were on the right track, but mistakenly used shorter delays when they need to be longer. FYI, the game was originally released as a boot disk and then later converted (unofficially) to DOS, which is why it kind of expects BIOS defaults for the typematic delays.
User avatar
ripsaw8080
DOSBox Author
 
Posts: 4121
Joined: 2006-4-25 @ 23:24

Re: Disable keyboard buffer

Postby Kubik » 2017-11-30 @ 12:57

I'm not sure what do you mean with DOS port - are you writing the game, using the graphics/sound from the 8bit version? If yes, and you do have access to source code, you'd better avoid using DOS and access keyboard port directly.
Kubik
Newbie
 
Posts: 81
Joined: 2017-11-06 @ 08:24

Re: Disable keyboard buffer

Postby xarx » 2017-11-30 @ 13:07

use "turbokey m2"

Much much better, thank you. But the chuckling after the first step is still there, can it be removed too?

I'm not sure what do you mean with DOS port

I meant by that that the game was originally released for 8-bit consoles, and only much later re-released also for PCs. Though I didn't know whether that was an official release or an unofficial port, ripsaw8080 clarified that.
xarx
Newbie
 
Posts: 5
Joined: 2017-11-30 @ 11:42

Re: Disable keyboard buffer

Postby ripsaw8080 » 2017-11-30 @ 13:48

The "m2" delay values are like a real IBM PC, for better or worse, but of course you can experiment with other values.

I'm not familiar with "chuckling" in your usage of the word, but on a guess you may prefer a short initial delay, so try "m1".

BTW, I suggest a cycles setting in DOSBox from 270 to 300 for Montezuma's Revenge.
User avatar
ripsaw8080
DOSBox Author
 
Posts: 4121
Joined: 2006-4-25 @ 23:24

Re: Disable keyboard buffer

Postby xarx » 2017-11-30 @ 15:11

"m1" is even better :-). But still not ideal.
Unfortunately it seems that there's no way to set the initial delay shorter than .25s (which corresponds to the "1"), is there?
xarx
Newbie
 
Posts: 5
Joined: 2017-11-30 @ 11:42

Re: Disable keyboard buffer

Postby ripsaw8080 » 2017-11-30 @ 18:12

250 ms is the shortest initial delay possible. Anything shorter could cause too many accidental repeats when typing at the prompt.

BTW, "x1" will use 250 ms for both initial and repeat delay. Keeps the delays consistent, but Panama Joe may move more sluggishly than you like. ;)
User avatar
ripsaw8080
DOSBox Author
 
Posts: 4121
Joined: 2006-4-25 @ 23:24

Re: Disable keyboard buffer

Postby ripsaw8080 » 2017-11-30 @ 19:27

Forgot to mention: you can blame the game developers for using BIOS to read keys instead of an IRQ 2 handler to track key presses and releases, but the joystick input works better. Some games only need d-pad-style input from a joystick rather than true analog, and Montezuma's Revenge seems to be one of those.

If you don't have a joystick, you can still map keys for the joystick with DOSBox's keymapper. Use settings of joysticktype=2axis and timed=true in the conf, press Ctrl-F1 to bind keys to joystick axes and buttons, save the key map, and in-game choose the joystick option. While playing, press up, down, left, and right before trying to move around too much, because the game apparently calibrates as it goes, with no separate calibration function.
User avatar
ripsaw8080
DOSBox Author
 
Posts: 4121
Joined: 2006-4-25 @ 23:24

Re: Disable keyboard buffer

Postby xarx » 2017-11-30 @ 22:26

In joystick mode, the game does not work. It behaves as if the joystick was stuck to the left hand side. Perhaps if a real joystick was connected, this bad behaviour would disappear, but a virtual joystick doesn't work.
xarx
Newbie
 
Posts: 5
Joined: 2017-11-30 @ 11:42

Re: Disable keyboard buffer

Postby ripsaw8080 » 2017-11-30 @ 22:48

Works for me with a "joykey" mapping, joysticktype=2axis, timed=true, and cycles=300. Yes, cycles matter with timed=true.
User avatar
ripsaw8080
DOSBox Author
 
Posts: 4121
Joined: 2006-4-25 @ 23:24

Re: Disable keyboard buffer

Postby xarx » 2017-12-01 @ 14:06

"Joykey": did you mean any of these programs? https://www.zophar.net/joy.html
Because they all seem to map a joystick to keys, while I need the opposite direction - keys to joystick.
xarx
Newbie
 
Posts: 5
Joined: 2017-11-30 @ 11:42

Re: Disable keyboard buffer

Postby ripsaw8080 » 2017-12-01 @ 14:59

Don't look just at "joykey" but also the word *MAPPING* that followed it. I was referring to using the DOSBox keymapper to bind keys to the joystick input, just as I described in my previous comment.
User avatar
ripsaw8080
DOSBox Author
 
Posts: 4121
Joined: 2006-4-25 @ 23:24

Re: Disable keyboard buffer

Postby Errius » 2017-12-01 @ 15:24

Shamus and Centipede (the official port) also have this problem
“This all reminds me when i took the windows vista sticker thingy off my old laptop, and on my washing machine as a joke. A few days later said washing machine stopped working. I still think this cannot be a coincidence."
User avatar
Errius
Oldbie
 
Posts: 671
Joined: 2015-12-16 @ 19:16
Location: Lave Station

Re: Disable keyboard buffer

Postby ripsaw8080 » 2017-12-01 @ 15:47

It's potentially a problem for ANY action game that uses auto-repeat behavior of the keyboard; e.g. Kroz and ZZT. However, the problem is exaggerated on games intended for 4.77 MHz PCs because a short repeat delay causes the key buffer to fill up when the game can't process the keys fast enough.
User avatar
ripsaw8080
DOSBox Author
 
Posts: 4121
Joined: 2006-4-25 @ 23:24


Return to DOSBox Games/Apps

Who is online

Users browsing this forum: No registered users and 2 guests