Joystick support changes

Discuss ADFFS development and download test releases
Post Reply
JonAbbott
Posts: 2344
Joined: Thu Apr 11, 2013 12:13 pm
Location: Essex
Contact:

Joystick support changes

Post by JonAbbott »

Last week, I started looking at adding Joystick support for games that do not natively support Joysticks.

I started working through the games from A-Z, the first two I hit were 2060 BC, which needs buttons for flapping and picking/dropping things and Alerion which needs two fire buttons. So...off the back of those two games I completely rewrote the * command for mapping Joysticks to keys, so it supports up to 8 fire buttons.

I've also modified the direction key mapping, so it also checks the 16bit Joystick interface which USBJoystick maps to thumb wheels if available. So on XB360 controllers you can use the thumb sticks, or D-Pad to move.

Alerion has however thrown up an issue I need to investigate. When Joystick keymapping is enabled, Alerion randomly crashes which appears to be down to ADFFS calling the KeyV vector to trigger the key press. I've tried various workarounds, such as calling KeyV via CallBack, checking for threading etc. None of which worked.

I think what I'm going to do is continue adding Joystick key mapping to games and see just how many are affected - its possible is simply a re-entry bug in Alerion which needs patching.

Abuse poses another challenge as it uses the mouse for the fire direction, so I need to figure out a solution for that. I did try using the mouse mapping in USBJoystick, but couldn't get it working - I've not had a chance yet to figure out why that didn't work.

I'll post a beta ADFFS build soon, along with updated game packages.

Games with Joystick Key mapping added:
  • F10001 2067 BC (1993) (Oregan Developments)
  • F10006 Aggressor (1992) (Atomic Software)

richw
Posts: 142
Joined: Sat Sep 14, 2013 9:05 pm

Re: Joystick support changes

Post by richw »

I think I had some issues getting the mouse emulation to work, so that will be my bad. I think it is unfinished.

I really must get the Pi out, as it has been hibernating for some time!

JonAbbott
Posts: 2344
Joined: Thu Apr 11, 2013 12:13 pm
Location: Essex
Contact:

Re: Joystick support changes

Post by JonAbbott »

richw wrote:
Thu Nov 19, 2020 12:38 am
I think I had some issues getting the mouse emulation to work, so that will be my bad. I think it is unfinished.
Thanks for confirming what I suspected.

The version of USB Joystick publicly available here and the version bundled with ADFFS are a few versions out of step...ADFFS being several versions ahead, which might explain it.

Post Reply