Compare commits
1 Commits
main
...
version-00
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
ebba3b88ef |
32
README.md
32
README.md
@@ -7,7 +7,7 @@ That driver allows most DirectDrive wheelbases to initialize and work.
|
|||||||
Most of the DirectDrive wheelbases are basically DirectInput wheels, but with some caveats, which Windows allows, but pidff doesn't.
|
Most of the DirectDrive wheelbases are basically DirectInput wheels, but with some caveats, which Windows allows, but pidff doesn't.
|
||||||
In that repository - pidff driver with some changes, which allows most of the DirectDrive wheelbases to work.
|
In that repository - pidff driver with some changes, which allows most of the DirectDrive wheelbases to work.
|
||||||
|
|
||||||
1. Added multiple quirks for better initialization rules for different wheelbases
|
1. Added multiple quirks for better initialization rules for different wheelbases (MOZA, VRS, Cammus)
|
||||||
2. Fixes for infinite-length effects
|
2. Fixes for infinite-length effects
|
||||||
3. Fixes for out-of-bounds values (no more spam in kernel logs)
|
3. Fixes for out-of-bounds values (no more spam in kernel logs)
|
||||||
|
|
||||||
@@ -18,8 +18,7 @@ And that's basically it
|
|||||||
1. MOZA R3, R5, R9, R12, R16, R21
|
1. MOZA R3, R5, R9, R12, R16, R21
|
||||||
2. Cammus C5, C12
|
2. Cammus C5, C12
|
||||||
3. VRS DirectForce Pro
|
3. VRS DirectForce Pro
|
||||||
4. FFBeast Wheel
|
4. ...
|
||||||
5. ...
|
|
||||||
|
|
||||||
## What works?
|
## What works?
|
||||||
1. FFB (all effects from device descriptor)
|
1. FFB (all effects from device descriptor)
|
||||||
@@ -78,38 +77,33 @@ To test the supported effects, use ffbplay from [ffbtools](https://github.com/be
|
|||||||
### VRS DirectForce Pro
|
### VRS DirectForce Pro
|
||||||
You can do it through VRS with Wine. You need to tweak Wine prefix for them.
|
You can do it through VRS with Wine. You need to tweak Wine prefix for them.
|
||||||
|
|
||||||
That software uses hidraw to set up a base. You need to create `udev` rule for allow access to hidraw device:
|
That soft uses hidraw to set up a base. You need to create `udev` rule for allow access to hidraw device:
|
||||||
```
|
```
|
||||||
# VRS DFP
|
|
||||||
echo 'KERNEL=="hidraw*", ATTRS{idVendor}=="0483", ATTRS{idProduct}=="a355", MODE="0666", TAG+="uaccess"' | sudo tee /etc/udev/rules.d/11-vrs.rules
|
echo 'KERNEL=="hidraw*", ATTRS{idVendor}=="0483", ATTRS{idProduct}=="a355", MODE="0666", TAG+="uaccess"' | sudo tee /etc/udev/rules.d/11-vrs.rules
|
||||||
# VRS pedals
|
|
||||||
echo 'KERNEL=="hidraw*", ATTRS{idVendor}=="0483", ATTRS{idProduct}=="a3be", MODE="0666", TAG+="uaccess"' | sudo tee /etc/udev/rules.d/11-vrs.rules
|
|
||||||
|
|
||||||
udevadm control --reload-rules && udevadm trigger
|
udevadm control --reload-rules && udevadm trigger
|
||||||
```
|
```
|
||||||
|
|
||||||
Then you need to force VRS software to use hidraw, not SDL, to find devices:
|
Then you need to force VRS soft to use hidraw, not SDL, to find devices:
|
||||||
1. Create new Wine prefix for them:
|
1. Create new Wine prefix for them:
|
||||||
|
|
||||||
`mkdir ~/.vrs-wine`
|
`mkdir ~/vrs-wine`
|
||||||
1. Launch regedit in prefix:
|
2. Launch regedit in prefix:
|
||||||
|
|
||||||
`WINEPREFIX=$HOME/.vrs-wine wine regedit`
|
`WINEPREFIX=$HOME/vrs-wine wine regedit`
|
||||||
1. Create two keys in
|
3. Create two keys in
|
||||||
`HKEY_LOCAL_MACHINE\System\CurrentControlSet\Services\winebus`:
|
`HKEY_LOCAL_MACHINE\System\CurrentControlSet\Services\winebus`:
|
||||||
|
|
||||||
* `DisableInput` (DWORD) - set to `1`;
|
* `DisableInput` (DWORD) - set to `1`;
|
||||||
* `Enable SDL` (DWORD) - set to `0`; (yes, variable name contains space)
|
* `Enable SDL` (DWORD) - set to `0`; (yes, variable name contains space)
|
||||||
1. Install important packages for VRS config tool to work:
|
4. Now you can launch soft through that WINEPREFIX:
|
||||||
`WINEPREFIX=$HOME/.vrs-wine winetricks win7`
|
|
||||||
`WINEPREFIX=$HOME/.vrs-wine winetricks dotnet48`
|
|
||||||
|
|
||||||
1. Now you can launch soft through that WINEPREFIX:
|
`WINEPREFIX=$HOME/vrs-wine wine VRS.exe` - launch your soft from installation directory.
|
||||||
|
|
||||||
`WINEPREFIX=$HOME/.vrs-wine wine VRS.exe` - launch VRS software from installation directory.
|
|
||||||
|
|
||||||
|
|
||||||
## Known issues with the driver
|
## Known issues with the driver
|
||||||
|
|
||||||
|
### MOZA
|
||||||
- Current limit of usable buttons is 160 (up from the Linux default of 80). Create an issue if you want this increased further.
|
- Current limit of usable buttons is 160 (up from the Linux default of 80). Create an issue if you want this increased further.
|
||||||
|
|
||||||
## Known issues with the firmware
|
## Known issues with the firmware
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
PACKAGE_NAME="universal-pidff"
|
PACKAGE_NAME="universal-pidff"
|
||||||
PACKAGE_VERSION="0.0.12"
|
PACKAGE_VERSION="0.0.9"
|
||||||
MAKE[0]="make KVERSION=$kernelver"
|
MAKE[0]="make KVERSION=$kernelver"
|
||||||
CLEAN="make clean"
|
CLEAN="make clean"
|
||||||
BUILT_MODULE_NAME[0]="hid-universal-pidff"
|
BUILT_MODULE_NAME[0]="hid-universal-pidff"
|
||||||
|
|||||||
17
hid-ids.h
17
hid-ids.h
@@ -10,6 +10,10 @@
|
|||||||
#define USB_DEVICE_ID_MOZA_R12 0x0006
|
#define USB_DEVICE_ID_MOZA_R12 0x0006
|
||||||
#define USB_DEVICE_ID_MOZA_R16_R21 0x0000
|
#define USB_DEVICE_ID_MOZA_R16_R21 0x0000
|
||||||
|
|
||||||
|
// VRS DrivingForce Pro
|
||||||
|
#define USB_VENDOR_ID_VRS 0x0483
|
||||||
|
#define USB_DEVICE_ID_VRS_DFP 0xa355
|
||||||
|
|
||||||
// Moza Racing FH5 mode
|
// Moza Racing FH5 mode
|
||||||
#define USB_DEVICE_ID_MOZA_R3_FH5 0x0015
|
#define USB_DEVICE_ID_MOZA_R3_FH5 0x0015
|
||||||
#define USB_DEVICE_ID_MOZA_R5_FH5 0x0014
|
#define USB_DEVICE_ID_MOZA_R5_FH5 0x0014
|
||||||
@@ -22,17 +26,4 @@
|
|||||||
#define USB_DEVICE_ID_CAMMUS_C5 0x0301
|
#define USB_DEVICE_ID_CAMMUS_C5 0x0301
|
||||||
#define USB_DEVICE_ID_CAMMUS_C12 0x0302
|
#define USB_DEVICE_ID_CAMMUS_C12 0x0302
|
||||||
|
|
||||||
// VRS DrivingForce Pro
|
|
||||||
#define USB_VENDOR_ID_VRS 0x0483
|
|
||||||
#define USB_DEVICE_ID_VRS_DFP 0xa355
|
|
||||||
|
|
||||||
// FFBeast
|
|
||||||
#define USB_VENDOR_ID_FFBEAST 0x045b
|
|
||||||
#define USB_DEVICE_ID_FFBEAST_WHEEL 0x59d7
|
|
||||||
|
|
||||||
// LITESTAR
|
|
||||||
#define USB_VENDOR_ID_LITESTAR 0x11ff
|
|
||||||
#define USB_DEVICE_ID_LITESTAR_WHEEL 0x2141
|
|
||||||
|
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
|||||||
@@ -11,7 +11,6 @@
|
|||||||
#include <linux/hid.h>
|
#include <linux/hid.h>
|
||||||
#include <linux/module.h>
|
#include <linux/module.h>
|
||||||
#include <linux/input-event-codes.h>
|
#include <linux/input-event-codes.h>
|
||||||
#include <linux/version.h>
|
|
||||||
#include "hid-ids.h"
|
#include "hid-ids.h"
|
||||||
#include "hid-pidff.h"
|
#include "hid-pidff.h"
|
||||||
|
|
||||||
@@ -42,45 +41,33 @@ static const struct hid_device_id pidff_wheel_devices[] = {
|
|||||||
.driver_data = PIDFF_QUIRK_NO_DELAY_EFFECT },
|
.driver_data = PIDFF_QUIRK_NO_DELAY_EFFECT },
|
||||||
{ HID_USB_DEVICE(USB_VENDOR_ID_CAMMUS, USB_DEVICE_ID_CAMMUS_C12),
|
{ HID_USB_DEVICE(USB_VENDOR_ID_CAMMUS, USB_DEVICE_ID_CAMMUS_C12),
|
||||||
.driver_data = PIDFF_QUIRK_NO_DELAY_EFFECT },
|
.driver_data = PIDFF_QUIRK_NO_DELAY_EFFECT },
|
||||||
{ HID_USB_DEVICE(USB_VENDOR_ID_VRS, USB_DEVICE_ID_VRS_DFP),
|
{ HID_USB_DEVICE(USB_VENDOR_ID_VRS, USB_DEVICE_ID_VRS_DFP),
|
||||||
.driver_data = PIDFF_QUIRK_NO_DELAY_EFFECT
|
.driver_data = PIDFF_QUIRK_NO_DELAY_EFFECT
|
||||||
| PIDFF_QUIRK_NO_STRICT_PID_CONTROL
|
| PIDFF_QUIRK_NO_STRICT_PID_CONTROL
|
||||||
| PIDFF_QUIRK_NO_PID_PARAM_BLOCK_OFFSET },
|
| PIDFF_QUIRK_NO_PID_PARAM_BLOCK_OFFSET },
|
||||||
{ HID_USB_DEVICE(USB_VENDOR_ID_FFBEAST, USB_DEVICE_ID_FFBEAST_WHEEL),
|
|
||||||
.driver_data = PIDFF_QUIRK_NO_DELAY_EFFECT },
|
|
||||||
{ HID_USB_DEVICE(USB_VENDOR_ID_LITESTAR, USB_DEVICE_ID_LITESTAR_WHEEL),
|
|
||||||
.driver_data = PIDFF_QUIRK_FIX_WHEEL_DIRECTION },
|
|
||||||
{ }
|
{ }
|
||||||
};
|
};
|
||||||
MODULE_DEVICE_TABLE(hid, pidff_wheel_devices);
|
MODULE_DEVICE_TABLE(hid, pidff_wheel_devices);
|
||||||
|
|
||||||
|
|
||||||
static
|
static u8 *moza_report_fixup(struct hid_device *hdev, __u8 *rdesc,
|
||||||
#if LINUX_VERSION_CODE >= KERNEL_VERSION(6,12,0)
|
unsigned int *rsize)
|
||||||
const
|
|
||||||
#endif
|
|
||||||
u8 *moza_report_fixup(struct hid_device *hdev, __u8 *rdesc,
|
|
||||||
unsigned int *rsize)
|
|
||||||
{
|
{
|
||||||
// Fix data type on PID Device Control
|
// Fix data type on PID Device Control
|
||||||
if (rdesc[1002] == 0x91 && rdesc[1003] == 0x02) {
|
if (rdesc[1002] == 0x91 && rdesc[1003] == 0x02) {
|
||||||
rdesc[1003] = 0x00; // Fix header, it needs to be Array.
|
rdesc[1003] = 0x00; // Fix header, it needs to be Array.
|
||||||
}
|
}
|
||||||
return rdesc;
|
return rdesc;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
static
|
static u8 *universal_pidff_report_fixup(struct hid_device *hdev, __u8 *rdesc,
|
||||||
#if LINUX_VERSION_CODE >= KERNEL_VERSION(6,12,0)
|
unsigned int *rsize)
|
||||||
const
|
|
||||||
#endif
|
|
||||||
u8 *universal_pidff_report_fixup(struct hid_device *hdev, __u8 *rdesc,
|
|
||||||
unsigned int *rsize)
|
|
||||||
{
|
{
|
||||||
if (hdev->vendor == USB_VENDOR_ID_MOZA) {
|
if (hdev->vendor == USB_VENDOR_ID_MOZA) {
|
||||||
return moza_report_fixup(hdev, rdesc, rsize);
|
return moza_report_fixup(hdev, rdesc, rsize);
|
||||||
}
|
}
|
||||||
return rdesc;
|
return rdesc;
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
@@ -119,7 +106,7 @@ static int universal_pidff_input_mapping(struct hid_device *hdev, struct hid_inp
|
|||||||
* Add quirks after initialisation
|
* Add quirks after initialisation
|
||||||
*/
|
*/
|
||||||
static int universal_pidff_probe(struct hid_device *hdev,
|
static int universal_pidff_probe(struct hid_device *hdev,
|
||||||
const struct hid_device_id *id)
|
const struct hid_device_id *id)
|
||||||
{
|
{
|
||||||
int ret;
|
int ret;
|
||||||
ret = hid_parse(hdev);
|
ret = hid_parse(hdev);
|
||||||
@@ -146,7 +133,7 @@ err:
|
|||||||
}
|
}
|
||||||
|
|
||||||
static int universal_pidff_input_configured(struct hid_device *hdev,
|
static int universal_pidff_input_configured(struct hid_device *hdev,
|
||||||
struct hid_input *hidinput)
|
struct hid_input *hidinput)
|
||||||
{
|
{
|
||||||
// Remove fuzz and deadzone from the wheel axis
|
// Remove fuzz and deadzone from the wheel axis
|
||||||
struct input_dev *input = hidinput->input;
|
struct input_dev *input = hidinput->input;
|
||||||
|
|||||||
Reference in New Issue
Block a user