nefarius / DsHidMini

Virtual HID Mini-user-mode-driver for Sony DualShock 3 Controllers
https://docs.nefarius.at/projects/DsHidMini/
BSD 3-Clause "New" or "Revised" License
1.2k stars 53 forks source link

SDF layout breaks compatibility with some games #68

Open Kanuan opened 3 years ago

Kanuan commented 3 years ago

The issue

SDF mode sliders number go beyond the DInput limit. This seems to be breaking compatibility with some older games (e.g.: Legacy of Kain: Defiance). When setting the gamepad in-game some buttons don't register and the ones that do are out-of-order. In GPJ mode the buttons are mapped correctly.

To-do

Remove all sliders that reside outside of DInput axis limit and test if this fixes game compatibility to verify if this really is what is causing the issue.

Proposed solution

A new HID Device Mode (Common Gamepad) that spawns a similar layout to SDF but without the buttons' pressure sliders. This mode would be the ideal mode for old games compatibility since it spawns only one device and by not having additional sliders there's no chance of the pressure sliders messing when setting button/axis mappings.

Though GPJ could be used, the sliders in the Joystick part can also mess with button/axis detection when setting the controller in games. Also, there are some games that only register the first controller it recognizes, meaning that if the joystick part is recognized first the controller bindings can't be set up.

Kanuan commented 3 years ago

Hypothesis

The number of total axis in SDF may break compatibility with some games. SDF Mode layout has:

Because of the limitations of D-Input, 8 of the sliders are normally out of reach.

Tests

First, it was tested if the SDF layout was broken beforehand when the unsued 14th button was removed, but after reverting to a version of DsHidMini before the change it was comproved the issue still occurs.

Second, it was tested if the number of total axis in the controller was breaking the input detection in the game by testing the SDF mode with different number of sliders declared in the HID Descriptor (all sliders values were zeroed so slider activity couldn't interfere with the test):

It seems after the 6th new slider each new one included breaks a different button, though more tests weren't made to fully determine if this is the case.

Conclusion

It seems the number of sliders is the one thing breaking input detection in-game. Though this behavior was only verified with a single game, it may also happen with other old games. The best route to keep compatibility appears to be a new HID Device mode based on SDF but without the pressure sliders (Common Gamepad Mode).

MetalGearAlex1 commented 1 year ago

Hello. I am having this exact issue. I am reading thru all ur stuff here and there in these forums. What exactly do i need to do to fix my ps3 cobtroller to work properly on pcsx2 ver 1.7049 nightly build. For MGS3 Subsistence. I just need to know if there is a fix. Please! Or do i have to wait till 3.0v for the fix?

nefarius commented 1 year ago

On latest PCSX2 Qt builds simply use SXS instead, they recently added support for that.

MetalGearAlex1 commented 1 year ago

On latest PCSX2 Qt builds simply use SXS instead, they recently added support for that.

Ok. Ill try that. Thanku! I tried it but it still wont do the pressure sensitive buttons. Im using an official Sony PS3 controller. What setting in PCSX2 would work? I set up sxs in hidmini. At least buttons arent all over the place now.

nefarius commented 1 year ago

IDK, I didn't make the change nor have had the time recently to fire up PCSX2, you best search their issues trackers for the related issue.

MetalGearAlex1 commented 1 year ago

IDK, I didn't make the change nor have had the time recently to fire up PCSX2, you best search their issues trackers for the related issue.

Ok. So i will do that. But i got a ps3 controller for the pressure sensitive buttons & MGS3/2

nefarius commented 1 year ago

IDK, I didn't make the change nor have had the time recently to fire up PCSX2, you best search their issues trackers for the related issue.

Ok. So i will do that. But i got a ps3 controller for the pressure sensitive buttons & MGS3/2

As I said, IDK. Go check PCSX2's support resources.