schellingb / dosbox-pure

DOSBox Pure is a new fork of DOSBox built for RetroArch/Libretro aiming for simplicity and ease of use.
GNU General Public License v2.0
766 stars 63 forks source link

Boppin': Cursor keeps cycling through main menu #75

Open mrmatteastwood opened 3 years ago

mrmatteastwood commented 3 years ago

Hey @schellingb, here's a head-scratcher.

Steps to Reproduce:

  1. Launch the Apogee puzzle game, Boppin'
  2. Proceed to main menu

Expected Results: The user should be able to navigate the main menu.

Current Results: The cursor keeps cycling through the main menu, as if the down key was continuously pressed.

Notes:

Tkcmd commented 3 years ago

~~What platform or you using for testing this ? From what I can tell it is platform related.~~

Only activate port one control and disable all other ports inside RetroArch, should fix the issue.

schellingb commented 3 years ago

Yeah this is a weird one... As Tkcmd found out, Port 2 being set to "Second DOS joystick" can cause constant menu movement in that game. Having it set to that will report the second joystick being plugged in but never with actual stick movement. It should be in the center but sadly it's not that easy with DOS joysticks. If you manage to move in the game menu to 'Set Devices' you can press 'Center Joystick' to fix it. And looking into 'Stick 2 Tolerance' visualizes the problem.

I've been using JOYCHECK.EXE and JOYTEST.EXE to test DOS joysticks. Uploaded here: DOSJOYTESTTOOL.ZIP JoyCheck actually reports a constant 21% offset from center towards the lower right (can be calibrated in the tool). But JoyTest reports all axes perfectly centered (I think, it's a bit hard to read).

I'm a bit at a loss if that's a problem with Boppin' or if that's something that can be improved (without breaking other games).

Do you know any other games (or tools) that visualize joystick inputs without forcing a calibration first?

mrmatteastwood commented 3 years ago

Huh, fancy that. You guys are right, that did the trick! I can't think of any other game where I encountered a similar problem.

Perhaps we can add a tips & tricks section to the eventual DOSBox Pure readme where we add this kind of knowledge for selected games?

schellingb commented 3 years ago

Maybe this issue can be worked around by using the joystick deadzone option added via #77? Then we could close this issue :-)

mrmatteastwood commented 3 years ago

I think you can close it either way, since the workaround suggested by @Tkcmd works. I also added that to my readme doc a while ago.

mrmatteastwood commented 2 years ago

Hey @schellingb, as you mentioned in issue #50:

Btw. we maybe should check if that workaround for "Boppin'" still works as described... Before 0.9.0 the joystick ports were either enabled or disabled based on the port settings (as described). But now joystick ports are always enabled (just like they are always enabled/available on a real IBM PC with a soundcard). This is because Turrican 2 would crash when there is a soundcard but no joystick ports. So I worry Boppin' can now not be worked around anymore...

Yeah, unfortunately, the workaround no longer works :-/

schellingb commented 2 years ago

So I tried this game in regular DOSBox and it shows the same problem but there's a bunch of ways to fix it.

Boppin' uses some form of joystick calibration which depends on the speed of the CPU. And it seems that once it has some form of calibration data, it saves that to its config file. So if you use the game pre-configured while running with different performance emulation (cycles) settings, it will have its joysticks off-calibrated and thus scrolling through the main menu (always holding up or down) or switching between the title screen and the menu (always holding left or right).

To fix this in-game, you need to go to the core options and fiddle around with the Emulated Performance setting until the cursor stops moving.

Alternatively you can fight the cursor to get into the "Set Devices" menu and then into "Stick 1 Tolerance" and "Stick 2 Tolerance" and try to manually re-calibrate the joystick to fit your emulated CPU speed.

A better option is to leave the game, go to the command line and fully reset the config with:

CD BOPPIN
DEL BOPPIN.CFG
SETUP.EXE
BOPPIN.EXE

A certain pirate DOS game distribution has the game pre-configured with 3000 cycles (not really appropriate for a 1994 game) and thus will always be off when playing at the auto performance mode. It's best to clear the config, go through setup manually then directly run the EXE and avoid any .BAT file that might override the config file with bad calibration data.

mrmatteastwood commented 2 years ago

Nice, that works! Added the info to the readme file.