Hard Light Productions Forums

Modding, Mission Design, and Coding => FS2 Open Coding - The Source Code Project (SCP) => Cross-Platform Development => Topic started by: fitz on July 15, 2008, 06:39:52 am

Title: Linux and Force Feedback with Sidewinder Force Feedback 2
Post by: fitz on July 15, 2008, 06:39:52 am
Hi,

First, thank you to all the contributors to this project.
I have been playing with Freespace 2 for a while, always under Windows.
At first, I used a SideWinder Force Feedback Pro (non USB) joystick with Windows 98. I really enjoyed the immersive experiment that was provided by force effects.
When I switched to XP, I had to buy another joystick (Force Feedback 2) because force-enabled XP drivers were not available.
Now I have Vista and the same story begins again. No force effect for VISTA.
I made a few searches and found out that maybe Linux drivers were available (hid-pidff.c). I did not understand whether this is a real driver (application independent) or whether the application has to compiled with this code.
Could someone tell me whether Freespace support force feedback effects for this particular joystick? If yes what is the procedure to make this work? If no, is there a workaround or any hope that it will be supported one day ?

Many thanks.
Title: Re: Linux and Force Feedback with Sidewinder Force Feedback 2
Post by: taylor on July 15, 2008, 07:12:16 am
Support would have to be added to the game to support FF.  I did write the code necessary for FF on Linux a few years ago, but it never did work 100% so the code was never added to the project officially.  Currently you have to write it low-level, accessing the device directly, which is somewhat painful.  I'm waiting on someone to write a high-level API that doesn't require messing around with ioctl before I even attempt to rewrite FF support.
Title: Re: Linux and Force Feedback with Sidewinder Force Feedback 2
Post by: fitz on July 18, 2008, 01:03:10 pm
Thank you for your reply,

So if I understand it correctly, you have to write everything by yourself into the Freespace code. I can imagine this is a lot of work. So I have not understand what HID was. I thought it was a linux driver supporting Microsoft FF joysticks. Do you know what it is ?

Thanks.
Title: Re: Linux and Force Feedback with Sidewinder Force Feedback 2
Post by: taylor on July 18, 2008, 03:16:03 pm
It provides an interface for communicating with the device, but it's very low-level.  And that's what the code that I wrote utilized btw.  The problem is that it's a lot more complicated to do and any change to how the low-level interface works means that you basically have to rewrite your code.  The FF code that I worked on before was actually rewritten 3 times because of interface changes.  It was basically a situation of upgrading your kernel, and the code would no longer work until you went and fixed it.

That's the kind of thing that a high-level interface would keep us safe from.  If FF support were added to SDL for instance, then we could just write our code for the SDL support and never have to change anything.
Title: Re: Linux and Force Feedback with Sidewinder Force Feedback 2
Post by: chief1983 on August 07, 2008, 07:46:44 pm
Just saw this, but:  Google Summer of Code 2008 project to implement FF into SDL (http://code.google.com/soc/2008/sdl/appinfo.html?csaid=B5C9E98EE23C2168)

Don't know anything else about it, but it was the first google result for 'force feedback sdl'.  Maybe that'll be exactly what you need :)