Skip to content

Instantly share code, notes, and snippets.

@kevenwyld
Last active September 22, 2024 08:07
Show Gist options
  • Save kevenwyld/4d336add27996a056cfe3ea08e657d31 to your computer and use it in GitHub Desktop.
Save kevenwyld/4d336add27996a056cfe3ea08e657d31 to your computer and use it in GitHub Desktop.
diff of changes to Dirt Rally (1.0) game files required to use OpenFFBoard with a TH8A shifter connected directly via usb.
diff --git a/share/data/forcefeedback/devicesetup_v2.xml b/share/data/forcefeedback/devicesetup_v2.xml
index a66837f..acbf157 100755
--- a/share/data/forcefeedback/devicesetup_v2.xml
+++ b/share/data/forcefeedback/devicesetup_v2.xml
@@ -35,6 +35,9 @@
<!-- SimSteering Wheel - Note: Recommend starting with a scaleForce of 0.5 until comfortable with the scale of the force -->
<FFBDevice name="{22301DD2-0000-0000-0000-504944564944}" scaleFriction="1.0" scaleForce="0.5"/>
+ <!-- OpenFFBoard wheel -->
+ <FFBDevice name="{FFB01209-0000-0000-0000-504944564944}" scaleFriction="1.0" scaleForce="1.0"/>
+
<!-- SimXperience AccuForce Pro -->
<FFBDevice name="{804C1FC9-0000-0000-0000-504944564944}" scaleFriction="1.0" scaleForce="1.0"/>
diff --git a/share/data/input/feral_paths.xml b/share/data/input/feral_paths.xml
index 2fbcfa9..ce1afb8 100755
--- a/share/data/input/feral_paths.xml
+++ b/share/data/input/feral_paths.xml
@@ -45,6 +45,7 @@
<xmlreader processor="Input" filename="input/sim_steering_c.xml" map="UPDATE" pool="UPDATE_TEMPORARY" userdata="presets" />
<xmlreader processor="Input" filename="input/simxperience_accuforce_pro.xml" map="UPDATE" pool="UPDATE_TEMPORARY" userdata="presets" />
<xmlreader processor="Input" filename="input/mouse.xml" map="UPDATE" pool="UPDATE_TEMPORARY" userdata="presets" />
+ <xmlreader processor="Input" filename="input/openffboard.xml" map="UPDATE" pool="UPDATE_TEMPORARY" userdata="presets" />
<!-- Various configuration xml's -->
<xmlreader processor="InputStrings" filename="input/icons.xml" map="UPDATE" pool="UPDATE_TEMPORARY" userdata="strings" />
diff --git a/share/data/input/ignore_presets.xml b/share/data/input/ignore_presets.xml
index 63bf03c..64563fc 100755
--- a/share/data/input/ignore_presets.xml
+++ b/share/data/input/ignore_presets.xml
@@ -1,6 +1,8 @@
<IgnoreList>
+ <!--
<Ignore name="tm_shifter" device_type_id="{B660044F-0000-0000-0000-504944564944}"/>
+ -->
<Ignore name="mouseDefault" device_type_id="mouse"/>
</IgnoreList>
diff --git a/share/data/input/openffboard.xml b/share/data/input/openffboard.xml
new file mode 100755
index 0000000..81f5c30
--- /dev/null
+++ b/share/data/input/openffboard.xml
@@ -0,0 +1,36 @@
+<!-- Action map for the OpenFFBoard Wheel -->
+<ActionMap name="openffboard" device_type_0="{ffb01209-0000-0000-0000-504944564944}" device_type_1="{B660044F-0000-0000-0000-504944564944}" priority="0" shouldbindalldevicetypes="true">
+
+ <!-- In Game Actions -->
+ <Action id="Steer Left">
+ <Axis id="di_x_axis" type="biDirLower" deadzone="0.0" saturation="1.0" />
+ </Action>
+ <Action id="Steer Right">
+ <Axis id="di_x_axis" type="biDirUpper" deadzone="0.0" saturation="1.0" />
+ </Action>
+ <Action id="Gear 1">
+ <Axis id="di_button_0" restricted_device="{B660044F-0000-0000-0000-504944564944}" />
+ </Action>
+ <Action id="Gear 2">
+ <Axis id="di_button_1" restricted_device="{B660044F-0000-0000-0000-504944564944}" />
+ </Action>
+ <Action id="Gear 3">
+ <Axis id="di_button_2" restricted_device="{B660044F-0000-0000-0000-504944564944}" />
+ </Action>
+ <Action id="Gear 4">
+ <Axis id="di_button_3" restricted_device="{B660044F-0000-0000-0000-504944564944}" />
+ </Action>
+ <Action id="Gear 5">
+ <Axis id="di_button_4" restricted_device="{B660044F-0000-0000-0000-504944564944}" />
+ </Action>
+ <Action id="Gear 6" >
+ <Axis id="di_button_5" restricted_device="{B660044F-0000-0000-0000-504944564944}" />
+ </Action>
+ <Action id="Gear 7" >
+ <Axis id="di_button_6" restricted_device="{B660044F-0000-0000-0000-504944564944}" />
+ </Action>
+ <Action id="Gear Reverse" >
+ <Axis id="di_button_7" restricted_device="{B660044F-0000-0000-0000-504944564944}" />
+ </Action>
+
+</ActionMap>
diff --git a/share/data/input/paths.xml b/share/data/input/paths.xml
index 44aa0a1..5075d23 100755
--- a/share/data/input/paths.xml
+++ b/share/data/input/paths.xml
@@ -39,6 +39,7 @@
<xmlreader processor="Input" filename="input/ignore_presets.xml" map="UPDATE" pool="UPDATE_TEMPORARY" userdata="ignore" />
<xmlreader processor="Input" filename="input/ms_sidewinder_ffb.xml" map="UPDATE" pool="UPDATE_TEMPORARY" userdata="presets" />
<xmlreader processor="Input" filename="input/sim_steering_a.xml" map="UPDATE" pool="UPDATE_TEMPORARY" userdata="presets" />
+ <xmlreader processor="Input" filename="input/openffboard.xml" map="UPDATE" pool="UPDATE_TEMPORARY" userdata="presets" />
<xmlreader processor="Input" filename="input/sim_steering_b.xml" map="UPDATE" pool="UPDATE_TEMPORARY" userdata="presets" />
<xmlreader processor="Input" filename="input/sim_steering_c.xml" map="UPDATE" pool="UPDATE_TEMPORARY" userdata="presets" />
<xmlreader processor="Input" filename="input/simxperience_accuforce_pro.xml" map="UPDATE" pool="UPDATE_TEMPORARY" userdata="presets" />
diff --git a/share/inputdevices.json b/share/inputdevices.json
index ded0cf9..43db832 100755
--- a/share/inputdevices.json
+++ b/share/inputdevices.json
@@ -334,6 +334,15 @@
"Category": "Wheel",
"Type": "UnknownWheel"
},
+ {
+ "Name": "OpenFFBoard",
+ "VendorID": "0x1209",
+ "ProductIDs": [
+ "0xffb0"
+ ],
+ "Category": "Wheel",
+ "Type": "UnknownWheel"
+ },
{
"Name": "PS3 Controller (kernel < 4.12)",
"VendorID": "0x054c",
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment