The state of joystick emulation?

akeley
Top Contributor
Posts: 1303
Joined: Mon May 25, 2020 7:54 pm
Has thanked: 416 times
Been thanked: 399 times

The state of joystick emulation?

Unread post 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?
User avatar
jdeberhart
Posts: 40
Joined: Sun Jun 21, 2020 11:41 pm
Been thanked: 5 times

Re: The state of joystick emulation?

Unread post by jdeberhart »

Not all games support joysticks, some simply use a keyboard.
bbond007
Top Contributor
Posts: 519
Joined: Tue May 26, 2020 5:06 am
Has thanked: 85 times
Been thanked: 198 times

Re: The state of joystick emulation?

Unread post 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.
akeley
Top Contributor
Posts: 1303
Joined: Mon May 25, 2020 7:54 pm
Has thanked: 416 times
Been thanked: 399 times

Re: The state of joystick emulation?

Unread post 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)
bbond007
Top Contributor
Posts: 519
Joined: Tue May 26, 2020 5:06 am
Has thanked: 85 times
Been thanked: 198 times

Re: The state of joystick emulation?

Unread post 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.
Post Reply