USB Joystick on the Raspberry Pi?

General development discussion not covered by a specific forum
Vanfanel
Posts: 600
Joined: Mon Sep 16, 2013 12:01 am

USB Joystick on the Raspberry Pi?

Post by Vanfanel »

Do you guys know if there was any progress on this?
I was asking around in the RiscosOpen forums back in 2014 or so, and I don't know if USB joysticks are supposed to be workin on Risc OS in 2017/2018.
And, assuming they would be supported by the OS, does ADFFS support them? Don't see any mention in the docs.
richw
Posts: 159
Joined: Sat Sep 14, 2013 9:05 pm

Re: USB Joystick on the Raspberry Pi?

Post by richw »

Supposedly the USB HID utility will allow RISC OS to recognise them. I believe that it provides the Acorn Joystick SWIs, so the handful of games which supported the Acorn A3010 interface should just work. I tried to buy HID, but despite assurances, never received it. So I have not tried it myself.

Bigger issue is that most games tend to be driven by the keyboard or mouse. Those with Joystick support could use the RTFM, SerialPort, Vertical Twist or Acorn SWIs! All of that needs consolidating too!

I did get some USB devices and even bought the DDE. I intended to write some code to respond to an Atari-style stick. Struggled to find enough samples of RISC OS USB code and got a bit stuck. Also, life tends to get in the way... One day...
Vanfanel
Posts: 600
Joined: Mon Sep 16, 2013 12:01 am

Re: USB Joystick on the Raspberry Pi?

Post by Vanfanel »

@richw

So, you are saying that with this "USB HID utility" I will be able to use USB joysticks with some ADFFS games?
Where is that utility?
And what games could I try?
JonAbbott
Posts: 3066
Joined: Thu Apr 11, 2013 12:13 pm
Location: Essex
Contact:

Re: USB Joystick on the Raspberry Pi?

Post by JonAbbott »

Vanfanel wrote: Tue Dec 19, 2017 3:57 pm Do you guys know if there was any progress on this?
It required a new API, of which there was no feedback, so didn't go anywhere.
Vanfanel wrote: Thu Dec 21, 2017 11:53 am So, you are saying that with this "USB HID utility" I will be able to use USB joysticks with some ADFFS games?
Where is that utility?
And what games could I try?
USB HID does provide Acorn Joystick emulation for USB Joysticks, I've never tried any games with it though. Most Krysalis titles support Acorn Joysticks, possibly a few other games from RTFM.

Joysticks weren't that widely supported in games as they were a bit of an afterthought by Acorn, hence why there are several Joystick "standards" all with different interface methods.
Vanfanel
Posts: 600
Joined: Mon Sep 16, 2013 12:01 am

Re: USB Joystick on the Raspberry Pi?

Post by Vanfanel »

@Jon: Thanks for the background info on Risc OS joysticks.
I have tried that USB HID program, but the joystick option is always greyed out, even if I DO have an USB joystick connected.
No way for ADFFS to provide it's own mechanism to access USB joysticks directly?
richw
Posts: 159
Joined: Sat Sep 14, 2013 9:05 pm

Re: USB Joystick on the Raspberry Pi?

Post by richw »

The free version of HID doesn't support joysticks (it will always be grey). You need to pay for the full version. I tried to, but failed.

To complicate things further, the Serial Port' JS interface also came with software to allow you to get the joysticks to emulate key or mouse input. This meant you could make the normal non-JS games playable with a stick. And shortly after the A3010 came out, the idea was rehashed into 'JoyMaster', which worked with the built-in Acorn interface.

Oh, and I completely forgot about the STD/Gamesware parallel port d-pad interfaces, which appeared in the mid/late 1990s. Not sure how they operated from an API perspective (I would guess that they used Acorn's).
JonAbbott
Posts: 3066
Joined: Thu Apr 11, 2013 12:13 pm
Location: Essex
Contact:

Re: USB Joystick on the Raspberry Pi?

Post by JonAbbott »

The website states it's "full featured shareware" so if it doesn't detect your Joystick, I suspect it doesn't work. I've tried it in the past for keyboard HID and found it just ignored keys it didn't specifically know about.
Vanfanel wrote: Fri Dec 22, 2017 5:10 pm No way for ADFFS to provide it's own mechanism to access USB joysticks directly?
It's on the list of projects, specifically adding shims to translate from HID to VoTI, RTFM, Acorn etc.
Vanfanel
Posts: 600
Joined: Mon Sep 16, 2013 12:01 am

Re: USB Joystick on the Raspberry Pi?

Post by Vanfanel »

JonAbbott wrote: Sat Dec 23, 2017 9:06 am It's on the list of projects, specifically adding shims to translate from HID to VoTI, RTFM, Acorn etc.
I think it's the only way we will ever see USB joystick support in Risc OS... :lol:
hubersn
Posts: 23
Joined: Tue Mar 31, 2015 3:02 pm

Re: USB Joystick on the Raspberry Pi?

Post by hubersn »

The LogikJoy and Gamer's Upgrade Joystick interfaces had a capable module that allowed the Joystick to produce configurable keypresses, so that you could control any game that allowed control via keyboard to be controlled via Joystick. IIRC, that piece of software was done by Matthias Seifert (author of Rockfall). I remember playing Conqueror (which predates any Joystick interface) with two Joysticks to control the tank's tracks.

Really sad that especially the Gamer's Upgrade interface was not open sourced - it was quite cleverly connected to I2C bus, so left all the other expansion ports free. And it had 4 ports - we once played a Spheres of Chaos 8 player match - 4 with Joysticks, 1 with mouse, 3 on the keyboard :-)

I also seem to remember a Joystick interface for the parallel port which could easily be built on a breadboard, designed by Ian Haylock (?). It also came with a keyboard emulation module. Can't find the ZIP at the moment...

Have fun
hubersn
hubersn
Posts: 23
Joined: Tue Mar 31, 2015 3:02 pm

Re: USB Joystick on the Raspberry Pi?

Post by hubersn »

OK, found the ZIP containing the build instructions and software for the Ian Haylock parallel port Joystick interface. Contrary to what I remembered, it works on bidi parallel ports as well as on classic parallel ports (A3xx/4xx/A540/A3000). I think I also had it running on my Risc PC.

http://legacy.huber-net.de/Joystick.zip
Post Reply