💡 OPEN FEATURE: Force Feedback

Eggheads talking about bytes and stuff.
Post Reply
User avatar
Krishty
Site Admin
Posts: 1364
Joined: 2022-Jan-09, 00:59

Re: 🔴 OPEN BUG: crash in Plane Controls

Post by Krishty »

mikew wrote: 2023-Nov-12, 09:17
just remember all the joystick problems with TFXplorer
I do. It was maybe that 2005 era Logitech stick I was using, but I don't remember the details. The 2014 era cheap generic stick works great but that may be because all the problems with the other one were fixed.
If the comments in my code can be believed, the thing was your youstick not offering a Z axis but a slider instead. The two should be identical, except that DirectInput defaults to Z for throttle and your slider was inverted over the normal Z, for whatever reason. So you had no throttle and if you re-mapped the axis, the throttle was inverted.
Aside from TFXplorer, joysticks used to 'just work' in the old days, maybe due to DirectInput (or whatever it was called).
Things seem more complicated now with AC7 needed a branded joystick, and MSFS2020 not providing a sensible default for generic sticks. So, I had to use an XBox controller for these.
Yes, absolutely. DirectInput did handle this stuff in a great way. Then MS decided that they wanted to use their monopoly to push the XBox controller*, and so they stopped DirectInput from supporting that controller and forced the XInput API on us instead. Now the genie was out of the bottle and everyone started using proprietary APIs again, and games started ditching DirectInput because it no longer worked with all controllers.

IIRC, the one thing that cannot be done without DirectInput is force feedback. Even if you’re working directly with USB data (like TFXplorer does) you still have to go through the DirectInput protocol for that. Would love to hear what Linux does in this regard.

* There may have been the small technical reason that the XBox controller has more than six axes (every button is pressure-sensitive IIRC), and DirectInput was very bad at handling that. It would have been trivial to fix in an updated version, though.
mikew
Data Genius
Posts: 603
Joined: 2022-Jan-09, 20:21

Re: 🔴 OPEN BUG: crash in Plane Controls

Post by mikew »

That Logitech stick is FF capable, but I don't remember playing any FF games with it. I've also got an original Microsoft Sidewinder FF stick (at least I don't remember throwing it out) with a gameport that probably was my best stick ever. This is not because of the FF, but due to the solid base that FF requires.
I bought it around the same time as ADF, and it made the difference to conquer ADF's learning curve. If I hadn't done that, I'd have a different hobby now. :D

While I bought EF2000 when it first came out, I only had one of those $10 analog sticks with 4 suckers to hold it down and which needed to be re-calibrated every 30 seconds. So, I didn't play EF2000 much back then.

While ADF didn't support FF, the default Sidewinder behaviour gave a plausible FF effect. So much so, that when TAW came out with FF support, it was rather disappointing as there was less FF effect than before.

There's a file called 'ffdid.ifr' in TAW's 'Program' folder which looks like it contains the FF definitions.
The .ifr extension implies that DID used a third party tool to help with this, rather than generate the DirectInput commands themselves.
https://ir.immersion.com/static-files/6 ... ca43b3d580
The company is still going, but their 'Resources' section doesn't go back very far.
mikew
Data Genius
Posts: 603
Joined: 2022-Jan-09, 20:21

Re: 🔴 OPEN BUG: crash in Plane Controls

Post by mikew »

I couldn't resist investigating further, and a later version of the tool is available here:
https://web.archive.org/web/20011106110 ... ioFull.msi

...and TAW's 'ffdid.ifr' can be opened with it.
ffdir.PNG
ffdir.PNG (50.18 KiB) Viewed 1360 times
User avatar
Krishty
Site Admin
Posts: 1364
Joined: 2022-Jan-09, 00:59

💡 OPEN FEATURE: Force Feedback

Post by Krishty »

Let’s collect anything regarding force feedback here. It’s not like I’ll start implementing it tomorrow, but it’s always good to plan ahead and information is really hard to find.

So, Force Feedback is usually realized via DirectInput. TFXplorer doesn’t use DI but the USBHID API. Finding a go-to tutorial on FF is almost impossible, but this article series comes very close: https://forum.microchip.com/s/forums/m958105.aspx
It’s for an embedded system, but it uses the same USBHID API TFXplorer does.
User avatar
Krishty
Site Admin
Posts: 1364
Joined: 2022-Jan-09, 00:59

Re: 💡 OPEN FEATURE: Force Feedback

Post by Krishty »

Just amazing work! I don’t think FF has changed much from 1998, so there is some chance that this data is actually useful to us!
Post Reply