Commit 0127783
committed
Candidate/driver alignment on par other drivers and captures (#11)
Driver alignment on par other drivers and captures
Motivation
- Align the T500RS driver’s runtime behavior with the T300/TS‑X pattern and with Windows usbmon captures to improve correctness and reduce in‑game dropouts.
- Ensure parameter updates don’t force re‑uploads, and preserve the device’s idiosyncrasies (EffectID=0 for 0x01/0x41, fixed constant linkage).
What’s changed
- Update path parity (parameter‑only updates; no STOP/0x01 re‑upload):
* FF_CONSTANT: send only Report 0x03 (code=0x0e) with new level.
* FF_PERIODIC: send only Report 0x04 with new magnitude + frequency (Hz×100).
* FF_SPRING/FF_DAMPER/FF_FRICTION/FF_INERTIA (conditions): send only two Report 0x05 packets (coeff/saturation via param_sub; deadband/center via env_sub_first).
* FF_RAMP: send only Report 0x04 with start/cur_val/duration.
- Subtype rules:
* Constant force uses fixed linkage (Report 0x03 code=0x0e; 0x01 b9=0x0e, b11=0x1c; 0x02 subtype=0x1c).
* Periodic/ramp/condition continue to use per‑effect subtypes (param_sub = 0x0e + 0x1c×index; env_sub_first = 0x1c + 0x1c×index).
- Upload sequence parity with captures:
* Pre‑upload STOP (0x41 00 01), dual 0x02 envelopes, 0x01 first/second, and effect‑specific parameter packets (0x03/0x04/0x05) as observed on Windows.
- Protocol correctness fixes and clarifications:
* Periodic parameter uses frequency in Hz×100 (not period in ms).
* EffectID semantics enforced: 0x01/0x41 use EffectID=0 (exception: init STOP for autocenter).
- Quality‑of‑life:
* Range setting simplified to a single 0x40 0x11 command (removed smoothing).
* Wine compatibility: ignore AC=100% requests to avoid permanent autocenter in titles like LFS; documented rationale.1 parent dcb3704 commit 0127783
File tree
4 files changed
+469
-210
lines changed- docs
- src
- tmt500rs
- udev
4 files changed
+469
-210
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
2 | 2 | | |
3 | 3 | | |
4 | 4 | | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
5 | 16 | | |
6 | 17 | | |
7 | 18 | | |
| |||
10 | 21 | | |
11 | 22 | | |
12 | 23 | | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
13 | 32 | | |
14 | 33 | | |
15 | 34 | | |
| |||
22 | 41 | | |
23 | 42 | | |
24 | 43 | | |
25 | | - | |
| 44 | + | |
26 | 45 | | |
27 | | - | |
| 46 | + | |
28 | 47 | | |
29 | 48 | | |
30 | 49 | | |
| |||
41 | 60 | | |
42 | 61 | | |
43 | 62 | | |
44 | | - | |
| 63 | + | |
45 | 64 | | |
46 | 65 | | |
47 | 66 | | |
| |||
56 | 75 | | |
57 | 76 | | |
58 | 77 | | |
| 78 | + | |
| 79 | + | |
| 80 | + | |
| 81 | + | |
| 82 | + | |
| 83 | + | |
| 84 | + | |
| 85 | + | |
| 86 | + | |
59 | 87 | | |
60 | | - | |
61 | | - | |
62 | | - | |
| 88 | + | |
| 89 | + | |
| 90 | + | |
| 91 | + | |
| 92 | + | |
| 93 | + | |
| 94 | + | |
| 95 | + | |
63 | 96 | | |
64 | | - | |
65 | | - | |
66 | | - | |
67 | | - | |
| 97 | + | |
| 98 | + | |
| 99 | + | |
| 100 | + | |
| 101 | + | |
| 102 | + | |
68 | 103 | | |
| 104 | + | |
69 | 105 | | |
70 | | - | |
71 | | - | |
72 | | - | |
| 106 | + | |
| 107 | + | |
| 108 | + | |
| 109 | + | |
73 | 110 | | |
| 111 | + | |
74 | 112 | | |
75 | | - | |
76 | | - | |
77 | | - | |
| 113 | + | |
| 114 | + | |
| 115 | + | |
| 116 | + | |
| 117 | + | |
| 118 | + | |
78 | 119 | | |
79 | 120 | | |
| 121 | + | |
| 122 | + | |
| 123 | + | |
| 124 | + | |
| 125 | + | |
| 126 | + | |
| 127 | + | |
| 128 | + | |
| 129 | + | |
| 130 | + | |
| 131 | + | |
| 132 | + | |
| 133 | + | |
| 134 | + | |
| 135 | + | |
| 136 | + | |
| 137 | + | |
| 138 | + | |
| 139 | + | |
| 140 | + | |
| 141 | + | |
| 142 | + | |
| 143 | + | |
| 144 | + | |
| 145 | + | |
| 146 | + | |
| 147 | + | |
80 | 148 | | |
81 | 149 | | |
82 | 150 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
6 | 6 | | |
7 | 7 | | |
8 | 8 | | |
9 | | - | |
10 | | - | |
11 | | - | |
12 | | - | |
13 | | - | |
14 | | - | |
15 | | - | |
16 | | - | |
17 | | - | |
18 | | - | |
19 | | - | |
20 | | - | |
21 | | - | |
22 | | - | |
23 | 9 | | |
24 | 10 | | |
25 | 11 | | |
| |||
256 | 242 | | |
257 | 243 | | |
258 | 244 | | |
| 245 | + | |
| 246 | + | |
| 247 | + | |
| 248 | + | |
| 249 | + | |
| 250 | + | |
| 251 | + | |
| 252 | + | |
| 253 | + | |
| 254 | + | |
| 255 | + | |
| 256 | + | |
| 257 | + | |
| 258 | + | |
| 259 | + | |
| 260 | + | |
259 | 261 | | |
260 | 262 | | |
261 | 263 | | |
| |||
376 | 378 | | |
377 | 379 | | |
378 | 380 | | |
379 | | - | |
| 381 | + | |
380 | 382 | | |
381 | 383 | | |
382 | 384 | | |
| |||
853 | 855 | | |
854 | 856 | | |
855 | 857 | | |
856 | | - | |
857 | 858 | | |
858 | 859 | | |
859 | 860 | | |
| |||
889 | 890 | | |
890 | 891 | | |
891 | 892 | | |
| 893 | + | |
892 | 894 | | |
893 | 895 | | |
894 | 896 | | |
| |||
0 commit comments