@avih, thanks for testing! The initial calibration movements are built into the PS2 games and aren't perfect. It depends on initial wheel position and degrees your wheel is set to in control panel. I think it expects centered/200*. I remember this happening on the PS2 too along with subsequent reboots. Running the wheel full left/right usually fixes it.
@jackun, having the readfile/writefile in the same thread as tokenin/tokenout will cause slowdowns. readfile/writefile should have their own thread because they have a waitforsingleobject which might screw with the USBasync, i have had some issues with them hanging in the past anyway.
nothing wrong with rawinput, just need to share the memory between 2 threads, or make sure it doesnt need to wait like with DINPUT.
I would prefer raw passthrough because then GT4 will use extra features (900 degrees+better input resolution) on my logitech wheels without much reverse engineering. That and linux support (PS2 wheels only) might be the only advantage.
I did manage to enable these features with DINPUT, but there was some commands during calibration that weren't parsed and my wheel stayed pegged to one side after initial calibration.
Then, in-game I was able to drive with 900 degrees mode and the FFB fixed itself once on track, but i did not think it was good enough for release.
also there is no clutch support on PS2.. so only X/Y/RZ are usable.
Enthusia has a clutch BUTTON (L2), it is a button only; setting to pressure sensitive (TRIANGLE) with LilyPad it still behaves like digital button.
GT4 has none, but some say the handbrake acts like one if you time it right
I ended up leaving it as DrivingForce descriptor.
This is what the force packet is. Very simple ConstantForce is all that is used by GT4/Enthusia. The rest is feature toggle commands that I ignore.
Code:
struct constantforce_data
{
uint8_t reportid : 8; //17 or 19? 17 is constantforce
uint8_t index : 8; //0-255 controller id? always 8
uint8_t magnitude: 8; //0-255 127 is no torque
uint8_t pad: 8; //always 128 ??
};
constantforce_data cfd={0};