Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Cursor key handling problem in Rocky's Boots and other XT-era games #3652

Open
2 tasks done
curby opened this issue May 3, 2024 · 16 comments
Open
2 tasks done

Cursor key handling problem in Rocky's Boots and other XT-era games #3652

curby opened this issue May 3, 2024 · 16 comments
Labels
bug Something isn't working game compatibility Issues related to a specific game input handling Issues related to handling any input (keyboard, mouse, joystick & game controllers)

Comments

@curby
Copy link

curby commented May 3, 2024

Are you using the latest Dosbox-Staging Version?

  • I have checked releases and am using the latest release.

Different version than latest?

No response

What Operating System are you using?

macOS (Apple Silicon)

Whats your question and how can we help?

The DOS version of Rocky's Boots uses Shift and the arrow keys for precise movement commands. This doesn't work if you press the standard arrow keys. You can see it fail here without having to install the game (same behavior as in dosbox-staging 0.81):

https://archive.org/details/msdos_Rockys_Boots_1985

The solution is to use the keymapper to have the arrow keys trigger numpad arrow key events in dosbox-staging.

Sample map file: https://files.curby.net/rocky.map

The key lines:

key_up
key_left
key_down
key_right
key_kp_8 "key 96" "key 82"
key_kp_4 "key 92" "key 80"
key_kp_6 "key 94" "key 79"
key_kp_2 "key 90" "key 81"

I'd like to add this to the wiki here. Should it go on the keymapper page or the configuration examples page? The keymapper page doesn't have game-specific mapping examples, but I think it'd help to include some, especially in cases like this where the keymapper is used to solve tricky control-input issues.

Code of Conduct & Contributing Guidelines

  • Yes, I agree.
@curby curby added the question Not an actual problem, just looking for some answers label May 3, 2024
@johnnovak
Copy link
Member

Thanks for the tip @curby!

I'd like to add this to the wiki here. Should it go on the keymapper page or the configuration examples page?

Neither 😄

It should be added to the Game issues page. I don't think you have access to editing the wiki pages, though. If you can't, let me know, and I'll add it.

@johnnovak johnnovak added the documentation Improvements or additions to documentation label May 3, 2024
@johnnovak
Copy link
Member

johnnovak commented May 3, 2024

But wait a minute... is this a Staging bug? Do Shift+Arrow keys work in other DOSBoxes or earlier versions of Staging? Can you perhaphs confirm the behaviour on real hardware too?

If this is a Staging regression or a general DOSBox bug, we should fix it instead.

@curby
Copy link
Author

curby commented May 4, 2024

I'm not sure if the original DOS release intended you to use the numpad's arrow keys, since the "normal" inverted-t arrows work for normal movement. It's also not seen only in -staging: I think archive.org uses vanilla Dosbox (linked above) and the problem exists there as well.

Whether it's a bug is goes back to developer intent, so no idea. :P I'm just glad I found a work-around!

@interloper98
Copy link
Collaborator

interloper98 commented May 4, 2024

XT PCs were common in the early to mid 80s, and most XT keyboards didn't have separate arrow keys: https://en.wikipedia.org/wiki/File:IBM_PC_XT_5160.JPG

IBM's AT PC was released just before 1985 when this game came out, but that PC cost $6000. I think the bigger keyboards with separate arrow keys got more popular in the late 80s when people were buying AT PCs and clones.

So it's possible the author just used the keypad/numpad for maximum compatibility (or maybe they didn't even know about the separate arrow keys at the time).

@curby
Copy link
Author

curby commented May 4, 2024

Yeah it's just odd that arrow keys still work for normal movement, just not precise movement.

@interloper98
Copy link
Collaborator

interloper98 commented May 4, 2024

Indeed.

The manual mentions using the "arrow keys" and also "holding down the arrow keys" on page 36 to perform cursor movement actions on the IBM and Tandy systems.

Although it's a bit ambiguous, as the arrows appear on both the dedicated arrow keys and on the num pad! I guess no new info here 😃

Rockys-Boots-Manual.pdf

@curby
Copy link
Author

curby commented May 4, 2024

It should be added to the Game issues page.

Added! Feel free to rephrase/tweak as needed for consistency. :)

@johnnovak
Copy link
Member

It should be added to the Game issues page.

Added! Feel free to rephrase/tweak as needed for consistency. :)

Nice one, thanks for adding it to the wiki @curby, the entry looks good 👍🏻

Just one thing, could you please remove the link to that externally hosted file and convert it into a GitHub Gist? Thanks!

We'll leave the ticket open with the "bug" label, but it looks like we can't really test this on real hardware if we don't have access to a really old pre-1985 PC, which is highly unlikely 😄 My Pentium MMX won't help here 😄

@johnnovak johnnovak added input handling Issues related to handling any input (keyboard, mouse, joystick & game controllers) bug Something isn't working and removed documentation Improvements or additions to documentation question Not an actual problem, just looking for some answers labels May 5, 2024
@johnnovak johnnovak changed the title Rocky's Boots Precise Movement Problem Solved! Potential keyboard handling problem in Rocky's Boots May 5, 2024
@Grounded0 Grounded0 added the game compatibility Issues related to a specific game label May 14, 2024
@johnnovak
Copy link
Member

johnnovak commented Jun 22, 2024

(Thanks to Tucky27 for reporting this on our Discord ❤️ )

DOSBox-X has the controllertype = xt setting which might help with this games and similar XT-era games.

https://github.com/joncampbell123/dosbox-x/blob/2d3dcc2325af3cb439cd8aa48308516dab8a47c3/src/dosbox.cpp#L3089-L3096

California Games has the same problem, and controllertype = xt seems to be just the ticket:
https://www.pcgamingwiki.com/wiki/California_Games

image

Although, it seems the feature has regressed in X:
joncampbell123/dosbox-x#4950

@interloper98 You might be perhaps interested in this?

@johnnovak johnnovak changed the title Potential keyboard handling problem in Rocky's Boots Cursor key handling problem in Rocky's Boots and other XT-era games Jun 22, 2024
@interloper98
Copy link
Collaborator

interloper98 commented Jun 22, 2024

Although, it seems the feature has regressed in X

Yes, looks like DOSBox-X's controllertype = conf setting was added in 2018, but I'm not seeing any implementation behind it since then -- maybe had to be deferred for more pressing issues 🤔 🙂

@johnnovak
Copy link
Member

johnnovak commented Jun 22, 2024

Although, it seems the feature has regressed in X

Yes, looks like DOSBox-X's controllertype = conf setting was added in 2018, but I'm not seeing any implementation behind it since then -- maybe had to be deferred for more pressing issues 🤔 🙂

Interesting. The PC Gaming Wiki article implies the feature was functional at some point in DOSBox-X.

@interloper98
Copy link
Collaborator

interloper98 commented Jun 22, 2024

Interesting. The PC Gaming Wiki article implies the feature was functional at some point in DOSBox-X.

git log -S controllertype

There are four hits:

  • Two are mass conf setting dumps (both in 2020)
  • Other two just add and modify this conf setting (both in 2018)

There's no code that reads or uses this setting.

Quite a mystery!

@johnnovak
Copy link
Member

johnnovak commented Jun 22, 2024

There's no code that reads or uses this setting.

Quite a mystery!

Well, then the PC Gaming Wiki article is just plain wrong. Entirely within the realm of possibility 😏

False information on the internet—who has even heard of such a thing??! 😆

@interloper98
Copy link
Collaborator

interloper98 commented Jun 22, 2024

I would believe it! The placebo effect works on gamers :-)

"Researchers have discovered gamers have more fun when they think a video game has been updated with fancy new features - even when that's not true": https://www.newscientist.com/article/dn28319-placebo-effect-works-in-video-games-too/

Bro, you gotta try "controllertype = xt-turbo-2000", it's next level.

@johnnovak
Copy link
Member

johnnovak commented Jun 22, 2024

Bro, you gotta try "controllertype = xt-turbo-2000", it's next level.

Maybe I should start advertising bogus settings in 0.82.0 🤔 😆 Well, I'm gonna add 96 kHz support in my work-in-progress mixer PR, so there we go, we're joining the placebo hype train 😎

Or maybe just mention "AI-assisted" in every second sentence in the notes. That will do as well 🤣

@curby
Copy link
Author

curby commented Jun 23, 2024

Just one thing, could you please remove the link to that externally hosted file and convert it into a GitHub Gist? Thanks!

Done! 😊

@Grounded0 Grounded0 mentioned this issue Jul 1, 2024
1 task
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working game compatibility Issues related to a specific game input handling Issues related to handling any input (keyboard, mouse, joystick & game controllers)
Projects
None yet
Development

No branches or pull requests

4 participants