hid-tmff2 icon indicating copy to clipboard operation
hid-tmff2 copied to clipboard

hid-tmff2: add combined pedals and centered clutch support for T300RS

Open Eispala opened this issue 6 months ago • 1 comments

Hello, since Need For Speed: Most Wanted 2005 needs combined pedals to work, i set out to implement this feature.

I am a software developer by trade, but not in C and i have no clue about driver development. So, disclaimer: I used AI to implement this. - After i got it to work, i cleaned the code up (as good as i could at least)

It's only implemented for the t300rs, as i have that wheel.

Changes:

  • Add combine_pedals module param to merge gas/brake into a single Z axis
  • Expose both as sysfs attributes so we can enable/disable it. Also the sysfs file makes it compatible with Oversteer
  • Add center_clutch module param to fix clutch at center (512) when combine_pedals is active (Also for NFS: MW 2005, otherwise the controls in the Menu always scroll down - you can ofc. press the clutch yourself, but it's nicer this way)
  • Add t300rs_raw_event to rewrite pedal data
  • Add t300rs_rdesc_nrm_combined HID descriptor for combined pedal mode

I tested it in NFS: MW 2005 and it works (Combining Pedals at least, it still has some other issues). Also i did some form of regression testing if you can call it that - other games still work.

Eispala avatar May 14 '26 11:05 Eispala

Hi, sorry for the delay, been kinda busy lately. Thanks for taking the time to share this, appreciate it.

So the approach here is to modify the packets that the wheel sends out and let the HID layer take care of the rest. I guess I'm not entirely opposed to the idea, but I dislike how this implementation is very wheel-specific and uses magic constants to reach into the bag of bits that is each event. I also don't quite understand why the rdesc has to be modified, do you have examples of other drivers that do something like this and how do they handle it?

I'm admittedly not super well versed in the input layer of the Linux kernel, so I'm not entirely sure if there are better approaches to take, just trying to learn by asking questions :)

Kimplul avatar May 24 '26 16:05 Kimplul