Hi there,
I hate to have my first post be a new topic, but I figure it's better than creating an ambiguous bug report.
I own an SimXperience Accuforce v2 steering wheel. I can post the usb hid report descriptors if need be. It runs perfectly on linux with test applications including fftest and testhaptic.py. It uses the hid-pidff driver.
I downloaded ForceTest.exe. Which works on Windows, however does not work through wine. It is a relativley simple application.
I decided to compile my own version of sdl and see what was happening. I found a bug in SDL and I worked around it.
But what I found by debugging the SDL code when called by ForceTest.exe via wine is that the data sent for the force feedback event was incomplete. For example the entire envelope of the constant force effect was left empty. If I hardcode some values for the data that is necessary I can get ForceTest.exe to trigger the effect.
Where I'm confused is, wouldn't this cause Force Feedback to not work for everyone.
I also understand that there are two different backends in wine, one which uses SDL and one which uses hidraw. But what i'm thinking is, if the dinput layer, does not create full force feedback events, then it doesn't matter if these events get passed to the SDL layer or the hidraw layer, it will produce invalid events that don't do anything.
Like I said, i can post any data you would like. Even my SDL code if it is helpful, but it's really just obvious logging.
I already was debugging wine inside of dinput, but that was before I narrowed it down to where I have now, that the data coming into SDL is not complete. I plan to debug further, but I wanted to get this thread started.
fyi, i'm running Debian Sid with Wine 7.0. any feedback is appreciated
USB Force Feedback
Re: USB Force Feedback
I can confirm it also doesn't work after compiling the latest from source.
what i'm seeing for example is at line 2950 in dlls/dinput/joystick_hid.c
set_parameter_value( impl, impl->type_specific_buf, set_condition->positive_coefficient_caps,
impl->condition.lPositiveCoefficient );
set_parameter_value( impl, impl->type_specific_buf, set_condition->negative_coefficient_caps,
impl->condition.lNegativeCoefficient );
i expect iNegativeCoefficient and iPositiveCoefficient to not be zero.
Has anyone seen a value here? Or is there some reason my dinput is picking up a value for my specific wheel?
what i'm seeing for example is at line 2950 in dlls/dinput/joystick_hid.c
set_parameter_value( impl, impl->type_specific_buf, set_condition->positive_coefficient_caps,
impl->condition.lPositiveCoefficient );
set_parameter_value( impl, impl->type_specific_buf, set_condition->negative_coefficient_caps,
impl->condition.lNegativeCoefficient );
i expect iNegativeCoefficient and iPositiveCoefficient to not be zero.
Has anyone seen a value here? Or is there some reason my dinput is picking up a value for my specific wheel?
Re: USB Force Feedback
actually i think those get set when ForceTest.exe call update.
what i know is a problem is that when the effect is sent to SDL, the replay length is set to -1.
I'm not sure if the fix should be made in wine to set the replay length to SHRT_MAX or if that change should be made in SDL.
what i know is a problem is that when the effect is sent to SDL, the replay length is set to -1.
I'm not sure if the fix should be made in wine to set the replay length to SHRT_MAX or if that change should be made in SDL.
Re: USB Force Feedback
I think there are issues with wine 7, as I can't get much of anything to work with wine 7. But using wine/proton 6.3, i was able to narrow down what the issue actually is.
We have ongoing threads here:
https://github.com/berarma/ffbtools/issues/26
and here:
https://github.com/berarma/ffbtools/issues/26
and a kernel patch to be accepted here:
https://lkml.org/lkml/2022/10/2/99
Until, i am forced to switch to wine 7, i think we can consider this matter resolved?
We have ongoing threads here:
https://github.com/berarma/ffbtools/issues/26
and here:
https://github.com/berarma/ffbtools/issues/26
and a kernel patch to be accepted here:
https://lkml.org/lkml/2022/10/2/99
Until, i am forced to switch to wine 7, i think we can consider this matter resolved?