USB Joystick on the Raspberry Pi?

General development discussion not covered by a specific forum
richw
Posts: 79
Joined: Sat Sep 14, 2013 9:05 pm

Re: USB Joystick on the Raspberry Pi?

Post by richw » Sun Mar 18, 2018 11:28 pm

Hi Chaps,

I’ve finally stopped procrastinating, dug out the Pi, and started having a bash at sorting out some joystick support.

So far, I have built a module (‘USBJoystick’) which manages any USB HID-compliant joysticks that are attached. There are some star commands which you can use to view live data and configure a mapping so that the modern joysticks look like the old ones. The module emulates the Acorn (Joystick_Read SWI) and Serial Port (Joystick_Status SWI) interfaces, so games which work with either of those should work.

It is still early days, and I need to clean up some rough edges, but I thought this could be the place to get testers and feedback. I am highly conscious that I only have one USB device to test with! (a Mayflash Atari 9-pin dual joystick to USB converter) Obviously, more devices would help. Oh, and I’ve only tried it on a Pi, but it should work on any RISC OS 5 machine with USB.

Future plans include adding keyboard and mouse emulation, so that any game can be joystick controlled. I’ve only tested it with a couple of the games which Jon has publically released that support the Serial Port Joystick interface (James Pond and SWIV) but they did work well.

Is anyone interested? Even some feedback on the idea would be a start. I will hopefully be able to post some alpha modules here, or perhaps via email.


Cheers,
Richard.

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

Re: USB Joystick on the Raspberry Pi?

Post by JonAbbott » Mon Mar 19, 2018 12:30 am

Create a new thread in the Pi section and post the Module, I'll Sticky it for you, then you can maintain it. I'm sure there's lots of folk that would like to try it but it might need mentioning on ROOL.

Annoying I only have wireless XB360 controllers, I do however have a USB Steering Wheel that I've been saving for Stunt Racer and Saloon Car Racer. The latter might need some jiggery-pokery to the game, as its a proprietary interface method.

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

Re: USB Joystick on the Raspberry Pi?

Post by richw » Mon Mar 19, 2018 10:23 pm

Yeah, that’s probably more sensible than this stale thread resurrection!

I’m just going to do a couple of clean ups over the next few days, then I should have a prototype that I can post. When I’ve got that ready, I’ll post it in a new thread, along with some instructions etc.

grannyg
Posts: 17
Joined: Fri Dec 13, 2013 3:47 pm

Re: USB Joystick on the Raspberry Pi?

Post by grannyg » Fri Mar 23, 2018 8:17 am

I've done a port of retroarch to RISC OS. It would greatly benefit from joystick support. Will the keyboard, mouse emulation mean being able to define any key to a joystick action. I also have two usb joysticks to test with.

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

Re: USB Joystick on the Raspberry Pi?

Post by richw » Sat Mar 24, 2018 11:01 pm

Sounds good. I've finally made my 'proper' post here: viewtopic.php?f=8&t=396

Post Reply