libretro / dosbox-svn

GNU General Public License v2.0
6 stars 17 forks source link

Libretro gamepad D-Pad only responds to Left presses #40

Open vaguerant opened 4 years ago

vaguerant commented 4 years ago

This issue appears to be identical to the one over at the non-SVN core: libretro/dosbox-libretro#112

I don't think this issue is platform-specific, but I'm running RetroArch/DOSBox-SVN on a Wii U and trying to use the D-Pad on the Wii U GamePad (the giant thing with a screen on it).

When RetroArch's menus have the controller input set to Gamepad, only D-Pad Left and the standard input buttons are functional. Up, Right and Down simply do nothing in games. Over in the above-linked issue, @fr500 says that this issue can be worked around by using a calibration tool in DOS, but it still seems worthwhile to have an issue here until there's a proper fix. Changing the input from Gamepad to Joystick in the RetroArch menu does seem to give working directional input, although it also restricts input to the analog sticks, as joystick input can't be mapped to the d-pad.

realnc commented 4 years ago

That's how DOS gamepads work. Every PC/gamepad/joystick combination would result in completely different port input values. So games always offered a calibration option either in their in-game menus, or in their installers. So if a game has an install.exe or setup.exe, you might need to run that to see if it has a calibration option.

There is nothing dosbox itself can do about it.

vaguerant commented 4 years ago

I'm open to my memory just being fallible, but I'm old enough to have used DOS machines and I'm pretty sure I remember most games working without calibration. Going through a couple of my games with gamepad support, I can see that Apogee's Hocus Pocus--which I played with a gamepad as a kid--has no gamepad calibration screen, so I'm not sure how this game would have ever worked historically if calibration was necessary.

Wacky Wheels does have a calibration screen, but calibrating my "gamepad" (i.e. whatever the Libretro gamepad is mapped as) doesn't seem to fix anything. I definitely feel like there's something other than "DOS gamepad support is weird" going on here.

I'll try the mainline, non-Libretro DOSBox at the nearest opportunity to see how things work over there.

EDIT: Mixed results on mainline DOSBox (tested on a Raspberry Pi). Hocus Pocus works out of the box, no calibration required. Wacky Wheels, however, has constant down/right input in-game, even after calibration. Oddly enough, this bad input isn't visible in SETUP.EXE, where the calibration is performed and where you can run a pad test. It works great there, just broken in-game.

EDIT 2: Just to note, this was a brand new DOSBox installation, I've never used it before on my Pi, so there are no prior configurations involved here.

EDIT 3: Over on the Pi I was able to get rid of that spurious input in Wacky Wheels by setting the joystick to timed = false.

realnc commented 4 years ago

The cycles setting also affects this. Just like on real hardware; if you depressed the "turbo" button on a PC to lower the speed of the CPU, you'd need to calibrate again. So it might be that games that don't have a calibration option end up being CPU speed-sensitive. On CPUs that are too fast or too slow, input doesn't work correctly.

Anyway, I'll try and take a look at these games myself.

realnc commented 4 years ago

There have been a couple changes and fixes to input handling. Does this happen to change anything in this case?