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

MegaZeux keyboard regression #3750

Closed
johnnovak opened this issue Jun 9, 2024 · 5 comments
Closed

MegaZeux keyboard regression #3750

johnnovak opened this issue Jun 9, 2024 · 5 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) regression We broke something 😊

Comments

@johnnovak
Copy link
Member

johnnovak commented Jun 9, 2024

I've noticed another keyboard regression in main in MegaZeux. The problem is not present in 0.80.1, 0.81.0, and 0.81.1, so we introduced it recently post-0.81.1.

Paging @FeralChild64 as per usual 😎

Repro steps

  1. Start MegaZeux.
  2. Press fast forward to go past the intro until you see this screen:
image
  1. Current main has the following keyboard issues on this screen:
  • Pressing P doesn't start the game.
  • Enter doesn't bring up the menu.
  • The Esc key brings up the quit dialog, but the cursor keys don't work to switch between the buttons, neither Enter to press a button.

Important note: Pressing P and Enter do work even on main right after starting the game, so before letting the intro commence. The game must mess around with the keyboard configuration during the intro or something—quite weird!

So, again, this is a problem with the current main only, and only after letting the intro sequence play!

This is important because if you try the repro steps before the intro, everything works on main too.

@johnnovak johnnovak added regression We broke something 😊 input handling Issues related to handling any input (keyboard, mouse, joystick & game controllers) labels Jun 9, 2024
@FeralChild64
Copy link
Collaborator

This is strange. AFAIK all the recent keyboard related changes, which went into main, are also a part of 0.81.1...

@Grounded0 Grounded0 added game compatibility Issues related to a specific game bug Something isn't working labels Jun 9, 2024
@weirddan455
Copy link
Collaborator

weirddan455 commented Jun 10, 2024

v0.81.1 is buggy for me. First bad commit is cd0b552 (the Tyrian 2000 keyboard fix)

I cannot reproduce the bug in the way that @johnnovak described. What I did was just move the character around for about 30 seconds with the arrow keys and observe that sometimes it gets "stuck" moving in a certain direction after the arrow keys have been released. The character also sometimes gets stuck unable to move. Spamming the arrow keys can get it "unstuck".

Also, the bug is not reproducible with cycles = max. I think what happened when @johnnovak was testing is that you had a conf file using the new cycles settings. Older builds don't know what to do with those so it defaults to max cycles.

I ran into that too in bisecting so I set cycles = 60000 to consistently reproduce the bug. I noticed you were running with lower cycles so maybe lowering it triggers the menu bug. My method means you don't have to sit through the into to test though.

@FeralChild64
Copy link
Collaborator

Right, after carefully checking the 86Box code I start to suspect the Tyrian fix was a mistake - I have removed it from my work-in-progress keyboard branch (https://github.com/dosbox-staging/dosbox-staging/tree/fc/kbfix-1), this fixes Gods, and probably MegaZeux (haven't tried this game yet).

Now, once the callback assembler generator is manageable, I did some initial replacement of the former Ultima VIII keyboard hack with a more proper solution (still incomplete, I intend to check the Bochs BIOS or SeaBIOS source code). Unfortunately, this does not fix the keyboard in the Tyrian setup, I'll need to re-investigate this particular problem.

@johnnovak
Copy link
Member Author

Thanks for the testing and tips @weirddan455, I might have confused myself there... I will re-test.

@interloper98
Copy link
Collaborator

this fixes Gods, and probably MegaZeux (haven't tried this game yet).

Just chiming in to report that MegaZeux is working now w/ the main branch (P to play work, as does Enter to bring up the menu). @FeralChild64, your PRs have it solved 👍

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) regression We broke something 😊
Projects
None yet
Development

No branches or pull requests

5 participants