Replies: 3 comments 2 replies
-
That' great news! I dug out my steering wheel, put it back together with my teensy breadboard that I built a few years ago, and tried two old forcefeedback test programs, WheelCheck.exe and ForceTest.exe. And voila - the device is recognized as "LUFA Wheel wFBB". I'd like to do some more experiments, maybe try some real game. Can you recommend programs or some free game for testing? I don't want to buy a game as long as I don't know if I will be happy with it. 25 years ago my favority game was Sega Rally in Windows 95, but I'm afraid there is no chance for a revival of this great game, not even on Steam or on an emulator... |
Beta Was this translation helpful? Give feedback.
-
Beta Was this translation helpful? Give feedback.
-
Hi, I don't know basically nothing about coding but I would like to start playing with my wheel that I own since I bought it 98 or something... I Would like to help in some way giving some feedback on the firmware. |
Beta Was this translation helpful? Give feedback.
-
So I've been playing Assetto Corsa (AC) with the gameport Sidewinder Wheel and full force feedback function!
I set myself the goal of getting it working in AC to start with for a number of reasons:
I only had to implement the commands for:
But I also got working, because it was straightforward:
The framework for SysEx handling, effect modification and effect control commands for the wheel were already written by Skoo. Also effect duration. Not to mention that It wouldn't have been possible to get this far without his notes in the Wiki and the DescentBB thread, since I don't have a Win98 PC with gameport.
The one puzzle I had to solve was in understanding the bit flag 0x00/0x40 which Skoo referred to as a "Default" indicator. It turns out this is not optional and is actually related to the checksum. If (256 < sum of all bytes <=384) then 0x40 else 0x00. This took me quite a while to figure out and sent me off on the wrong track a few times, since some effect modifications would work and some formulated the same way would not. I do not know why Microsoft made it this way. My best guess is that it was a fudge to avoid interfering with other MIDI devices, but it may just be obfuscation…
Device Control and Device Gain
These are the only other additions to record for now since everything else I've used is consistent with the wiki.
0xf3 0x1d Reset (stop all effects; free all effects; reset device gain to 0x7F; enable actuators; enable auto spring centre)
0xf3 0x2e Enable actuators
0xf3 0x3f Disable actuators (but time stepping continues for effects)
0xf3 0x48 Pause (time stepping is paused)
0xf3 0x59 Continue (resume paused effects)
0xf3 0x6a Stop All (including stop auto centre)
The last nibble is checksum from xor'ing the first 3 nibbles. Note 4 and 5 are swapped relative to the joystick.
Device Gain is a 6 byte 0xF1 modify message form with effect id = 0x00, address 0x-0 and value 0x00 to 0x7f in the LSB. e.g. 0xf1, 0x10, 0x40, 0x00, 0x7f, 0x00 for max gain
USB Descriptors, Axes and Buttons
I have not fiddled much with the descriptors to change the axes/buttons etc. I have fixed the report outputs so the FORCE toggle does not show up as a button and there are no spurious hat switch outputs. There is a bug not yet fixed that means the descriptors have to be the same number of bytes for the joystick and wheel so not much scope to customise this at present. This may result in compatibility issues with some games that aren't very flexible with controller assignments.
At last some firmware:
I've put four firmware files here, options for both Teensy and Micro, with and without virtual serial port logging. These are alpha1 version since I've not done extensive testing. I'm also thinking to keep this out of the main repo until there is a good hardware solution for the backpowering issue #49.
See here for Teensy wiring and note for Micro/Pro Micro PB6 is swapped for PB0.
If you pick a LOG version you will always need to have a terminal open to the COM port as per #50. You will be able to record the force feedback messages being received and sent over USB and MIDI. Performance doesn't seem to be noticeably worse.
In AC I needed to tick the "Half FFB Update Rate" box because the adapter doesn't seem to handle the default update rate of 333Hz. You get a "99% CPU Occupancy" warning in the game when it is not keeping up.
There are guides around on how to configure AC FFB for old wheels. I set steering gamma to 1.5 for stability with the limited rotation.
And a Warning:
I believe there is potential to damage the Atmega or even the wheel if the adapter is connected to a powered wheel without usb power. See #49. So far mine have survived despite several prolonged periods in this condition. USE AT YOUR OWN RISK
Observe the following connection sequence:
Pedals can be connected at any point
When stopping, always remove 12V power before USB. I recommend not leaving 12V power attached in case your PC stops providing USB power.
Next Steps
In order to get to a more complete PID implementation like for the joystick it would be necessary to understand how to translate the formula for spring/damper/inertia effects from coefficients, saturations, deadband and offset, into the different representation in the wheel MIDI effects.
There are a few other unknown parameters to discover. Does the wheel have e.g. an explicit effect gain or triggerbutton?
There is a mystery modify message sent by the drivers after each effect is defined by SysEx e.g.
f1 01 0e 02 7f 7f for periodics. This isn't essential to get effects to play. Perhaps it exposes some additional parameters?
I'm intending to record any further developments on wheel FFB in this thread.
Beta Was this translation helpful? Give feedback.
All reactions