Page 1 of 1

The state of joystick emulation?

Posted: Sun Jul 18, 2021 5:16 pm
by akeley
I'm using a wireless Dualshock 4 as my main controller. I've just tried it in ao486 and in some games it works, in some doesn't. I was wondering if it's normal or maybe I'm doing something wrong?

After defining both "AO486 buttons" and "Button/Key remap". Before that it did not work at all. So is the joystick actually recognised or just remapped?
-Keen (Vorticons) - works
-A10 Tank Killer -works
-Battlehawks & Secret Weapons Of Luftwaffe - registers only as a singular input, so if I try to turn left for example, it will only turn a tiny degree.
-Falcon AT - has calibration screen which seemed to have worked, but then the simulation itself goes a bit batty so can't say how well it works

EDIT: Could you name a game where joysticks works 100%, so I could try it myself?

Re: The state of joystick emulation?

Posted: Sun Jul 18, 2021 8:25 pm
by jdeberhart
Not all games support joysticks, some simply use a keyboard.

Re: The state of joystick emulation?

Posted: Sun Jul 18, 2021 9:16 pm
by bbond007
I have been able to write some DOS programs that support the joystick very well. The joystick emulation does work...

The problem is the original PC joystick design is poor requiring a calibration routine and reading the analog axis positions requires timing loops.

Not only does this waste a lot of CPU cycles, but If any the CPU speed is altered in any way (MiSTer OSD or even "turbo" button on real PC) after the joystick calibration routine is performed, subsequent reading of the X & Y axis will be completely inaccurate.

Re: The state of joystick emulation?

Posted: Mon Jul 19, 2021 11:40 am
by akeley
bbond007 wrote: Sun Jul 18, 2021 9:16 pm The problem is the original PC joystick design is poor requiring a calibration routine and reading the analog axis positions requires timing loops.

Not only does this waste a lot of CPU cycles, but If any the CPU speed is altered in any way (MiSTer OSD or even "turbo" button on real PC) after the joystick calibration routine is performed, subsequent reading of the X & Y axis will be completely inaccurate.
Maybe this could account for the erratic behaviour, at least in some cases (not all games I tested have calibration and I didn't always change the speed in-game either.)

Spent some more time testing this today. I did reset the OSD settings/keybinds from yesterday, to make sure it's actual joystick being detected (for the record, I've been only trying games with known native joystick support).

Arrrgh - works fine (if you choose Joystick 1)
Arkanoid - sort of works, but it's too sensitive
Bad Dudes - only few inputs are recognised (left, punch, jump)
Battlehawks - at first it was the same as yesterday, then, oddly, it started working fine :?:
Cabal - says "Joystick not recognized"
Death Sword - has calibration, and joy works in menus, can't start the game though
Altered Beast - works fine after in-game calibration

Would be nice if somebody could try the problematic games and see if they behave the same on their setup. Also, seems that at least some games differentiate between ports 1/2 - could it be a possible reason for some of the joy problems? (as in, game expects the joy to be in particular port, sort of like in C64)

Re: The state of joystick emulation?

Posted: Mon Jul 19, 2021 10:18 pm
by bbond007
akeley wrote: Mon Jul 19, 2021 11:40 am Spent some more time testing this today. I did reset the OSD settings/keybinds from yesterday, to make sure it's actual joystick being detected (for the record, I've been only trying games with known native joystick support).
If a game supports the Gravis protocol, you may have better luck with that option.