RPCS3 / rpcs3

PS3 emulator/debugger
https://rpcs3.net/
GNU General Public License v2.0
15.19k stars 1.89k forks source link

[Feature Request] Generic (force feedback) peripherals emulation #11438

Open ikt32 opened 2 years ago

ikt32 commented 2 years ago

Quick summary

RPCS3 currently supports USB pass-through for a limited number of devices.

Building a layer which allows the user to bind any device to specific devices supported by games, would allow incompatible devices, or combination of devices, to work as input for the game(s).

Details

A suggestion would be a layer which uses a generic Windows API such as DirectInput to gather equipment from the host system, and binds that to a simulated input device, which the Playstation games natively support.

In RPCS3, the user would choose which device to emulate, assign their inputs and force feedback axes to the emulated device, and play the game as if they used a supported device.

For example, one would have a Fanatec wheel setup with a separate shifter on the host machine, and want to play Gran Turismo, which supports Thrustmaster and Logitech wheels. The wheel functions would be mapped onto a Thrustmaster T500RS or other supported device.

1. Please describe, what part of RPCS3 would be affected by your feature:

2. Please tell us, why your feature is important to RPCS3.

It would allow users to play games with similar-but-unsupported equipment. It would reduce user steps to modify their drivers for their equipment to work with RPCS3.

Megamouse commented 2 years ago

So you want us to reverse engineer yet another device?

ikt32 commented 2 years ago

It's just a suggestion/feature request, feel free to ignore it if it's not feasible/outside scope/a bad idea?

Darkhost1999 commented 2 years ago

All I understood from this was.

I would like to be able to use any controller I want to use. That as far as the game is concerned I am using an authentic device the ps3 natively uses.

And also "Please implement Dinput." Screenshot_20220124-135140_Moonlight.png (You can choose any device class you want. Guitar drums dance mat etc if that's what you're asking)

So I was just thinking. Isn't that how all the input handlers work? And is this request only asking to add a direct input handler?

DragRedSim commented 2 years ago

For the input side of things, it is very likely that the entire device setup can already be mapped individually using the MMDevice handler, however it does not appear that there is a method to collate inputs from multiple devices onto one controller. As mentioned in the example, one use-case of this is an H-pattern shifter, which is not connected to the main steering wheel input on its own; they both hook via USB to the same computer.

In regards to force feedback, only certain licensed input devices are permitted by the console, and some of them expose more or different effects than just the small and large rumble motor. At this point, you're getting into the USB Physical Interface Descriptors of the devices, and mapping them appropriately (if needed).

Hopefully this clears up the request somewhat. There is currently no Steering Wheel device class offered for emulated pads, which means the inputs are still presented to the emulated game as coming from a pad, rather than from a wheel. This tends to induce certain "corrections" made by the game due to the smaller size of a pad meaning functionally less accuracy.

Yuuyatails commented 1 year ago

Sorry for necro'ing this, but with all PS3-compatible wheels being discontinued, I think it is appropriate to add general force feedback support for racing wheels on PC, and not everyone has access to Collective Minds Drive Hub USB adapter due to numerous circumstances.

Furthermore, using software like Zadig to replace the PC driver with WinUSB driver on Windows might not be a good idea, as it can permanently breaks some of the wheel's functionalities even after restoring the driver install, and said bug can only be fixed with the in-place upgrade Windows repair (which is a big hassle). I encountered this problem once with my Logitech G29 on my Windows 11 PC after swapping driver with the WinUSB driver.

On Windows, native racing wheel force feedback support are usually done using the USB HID spec's Device Class Definition for Physical Interface Devices (usually called HID PID) and APIs like Windows HID API or the Windows.Gaming.Input.ForceFeedback UWP API. Unfortunately, general force feedback support might be difficult to implement on other platforms compare to Windows.

It is also worth noting that racing wheel support are almost non-existing outside of consoles and Windows. On PC, Logitech is the only company that provide racing wheel support on MacOS, while others like Thrustmaster and Fanatec doesn't.

Lillowh commented 1 year ago

It is also worth mentioning that this feature has been implemented through SDL in PCSX2 and is working properly with modern devices to emulate Driving Force Pro and GT Force wheels