sonik-br / lgff_wheel_adapter

Adapter for Logitech force feedback wheels
GNU General Public License v3.0
19 stars 1 forks source link

Add support for Formula GP (without FF) #2

Open Invictaz opened 8 months ago

Invictaz commented 8 months ago

I have this wheel and would like to use it on my Playstation 2 and 3 (with ps2 emulation)

There is no force feedback so no motor control needed. Just the spring, axis and buttons.

sonik-br commented 8 months ago

It's USB? Might be possible to do. Can you build the adapter?

Invictaz commented 8 months ago

Yes it has USB it's the same as the red one with force feedback (that one called formula force, this one just formula). Might be different PID and VID.

image

https://www.pcgamingwiki.com/wiki/Controller:Logitech_WingMan_Formula_GP

I was looking for a usb hat but I did not find any. I don't understand why the micro usb port of the pico cannot be used. Is it only for programming?

Can you also upload a wiring diagram how to wire the Pico to the Playstation 2?

sonik-br commented 8 months ago

The usb port on the pico can be configured for input or output (host or device). I'm using it to output and a second port must be added for input.

There's no "wiring" for PS2. The adapter can do only usb to usb. What I can try to do is receive input from the wingman gp and output it as another logitech wheel, like the gt force.

Invictaz commented 8 months ago

I thought you are outputting to a Playstation 2 Controller plug?

ps2controller_wiring

"What I can try to do is receive input from the wingman gp and output it as another logitech wheel, like the gt force."

That would be great👍

Does the Playstation 2 give enough amps to power both the Pico and the wheel?

sonik-br commented 8 months ago

Adapter is only for logitech ffb wheels, usb to usb. All logitech ffb wheels uses external power so the ps2 will only need to power the pico.

If you want support for your Formula GP wheel added, I would need to know it's usb reports. Could not find info on this online. Can you build the adapter?

Invictaz commented 8 months ago

I don't have the USB breakout board. Need to order it from China. I have both a Pico WH and Pico H so should be doable. Ordering the USB board in a couple of days. Might take a while from China.

Is it possible to sniff the USB reports via Linux on a pc? Do a USB trace? Then I can do it much sooner.

sonik-br commented 8 months ago

It's possible to get it on a linux. I'm not a linux expert but there's some commands that will help:

Connect it to the PC then run dmesg Copy related info

Then sudo lsusb -vd VID:PID (replace VID:PID) This will get the device descriptors. copy it

Then sudo usbhid-dump --model=VID:PID (replace VID:PID) This will get the hid report. copy it

We will just miss the report bytes. I don't know how to get it.

Invictaz commented 8 months ago

I order the USB port this week. I have found a picture of a GT Force and it's power requirement. It's 5v at 100mA. The FF motors most likely are 24v so not needed on mine. The Pico uses approximately 40mA so the 500mA that the PS2 will deliver will most likely be enough. However I might factor in another usb controller so I will order a Y cable as well.

Screenshot_20240109_205721_Vinted

sonik-br commented 8 months ago

Great! Please dump the usb descriptors when possible. I can try to add support for the Formula GP.

Invictaz commented 7 months ago

@sonik-br let me know if this is good or not. wingman.zip

Wingmanformulagp.txt

Also attached are the usbhid-dump natv and xml formats

I pressed all buttons and pedals.

sonik-br commented 7 months ago

Looks good! I can try to add support for it during the weekend. Did you get the pico and an usb female connector?

Also, looking at the STREAM data. Can you test again and identify the axis?

IE: 80 00 7F FF FF The stream have 5 bytes. I believe they are, in that order:

wheel rotation buttons combined pedals? pedal (gas or brake?) pedal (gas or brake?)

And for the buttons, can you take a note of what shows for each button? It should be the second byte. Handy to know at least what maps as he paddles.

Invictaz commented 7 months ago

I am still in the process of soldering the Pico and usb female connector, wanted to do this first since the parts came to my door from china.

I'm doing the stream data now

Wheelrotation.txt

Yellow buttons with top left top right lower left lower right pressed after eachother

Buttons.txt

Flippers behind the wheel first left then right

flippers.txt

Pedal gas full throttle and let go

pedalgas-fullthrottle.txt

Pedal brake full brake and let go

pedalbreak-fullbreak.txt

Hope this helps

Invictaz commented 7 months ago

Btw there is a setting in the windows Logitech software to make pedals combined. Since this dump was made on Ubuntu, I did not use any drivers at all and thus the pedals are not combined I think. Windows calls this the Z axis if I'm right.

sonik-br commented 6 months ago

Firmware is ready for testing. Let me know when you build the adapter.

Invictaz commented 6 months ago

@sonik-br The adapter is ready. I'm no soldering expert but it works with the OGX-Mini firmware. So I'm ready to test the Formula GP firmware :)

20240311_190552

sonik-br commented 6 months ago

Looking good! Try the firmware for Formula Force GP first as it should match more close what your wheel has to offer. A lot of PS2 game supports it. There's also a firmware to emulate a Driving Force. But the driving force have a dpad and yours don't so it will be more complex to use it with any game.

firmwares.zip

Invictaz commented 6 months ago

Looking good! Try the firmware for Formula Force GP first as it should match more close what your wheel has to offer. A lot of PS2 game supports it. There's also a firmware to emulate a Driving Force. But the driving force have a dpad and yours don't so it will be more complex to use it with any game.

firmwares.zip

Great. Is there an overview which games support the Driving Force and which games support the FFGP?

I will try it asap and report! Thanks a lot for developing.

sonik-br commented 6 months ago

I don't have a list but I remember that a lot of games supported it when I tested.

The PS branded version of the FFGP is called GT Force. Search for it.

Check out this video. The guy shows a lot of game covers.

https://www.youtube.com/watch?v=K-Y3drXNDKQ

Driving Force is supported on even more games. Also works on ps3.

Edit: Test it also on windows with the logitech driver. Verify if you get the full rotation range. Pedals too.

Invictaz commented 6 months ago

This confuses me. The same wheel shape as mine but two different names.

image

image

Invictaz commented 6 months ago

I will test both firmwares first. Also the calibration.

sonik-br commented 6 months ago

Yes, the GT Force looks almost identical to yours. And that's why I said it would be the best one to emulate. Same number of buttons and they are in the same position.

The Driving Force have the DPAD and more buttons.

Invictaz commented 6 months ago

The Formula Force GP conversion works without any problems. It's just my yellow wheel with some force feedback motors. The mapping works on Windows fine and all buttons work. I will try it on Playstation 2 and report.

Some things are needed, a Driving Force GT, or G25 or G27 mapping would be welcome to have it connected to a CronusMax/Cronus Zen for PS4 conversion. I don't know if it is possible but I hope so. Cronus has only input translations for these wheels.

The Driving Force firmware has some problems now. It seems on Windows 11 that the dpad is continuously pressed. There is no dpad on my wheel but it shouldn't be pressed.

And the yellow steering wheel buttons should be mapped to the wheel and not to the cross and circle (or was this intentional?). Or is it possible to change them with a config file in .ini or .cfg or something?

The flippers behind the wheel are now mounted to the upper front buttons on the wheel.

https://github.com/sonik-br/lgff_wheel_adapter/assets/20338545/bb97659b-87d9-4639-a3b0-842f5a9f086f

Invictaz commented 6 months ago

In this video you can see what I mean with the deadzone in the middle. The guy moves the wheel but the F1 car does not turn the wheels.

https://youtu.be/Yh8dSajuUY8?t=1276

sonik-br commented 6 months ago

I know what causes the dpad to be active. Going to fix.

The buttons are mapped this way on a Driving Force as they are the main buttons. The most important ones, required for gaming navigation.

Lets start with the basics first. How is the mapping when in GT Force mode? It should be 1:1 with your wheel. Also how the rotation maps? It's linear?

Invictaz commented 6 months ago

The rotation is exactly like it is on normal Formula GP firmware. So full lock left is full lock left. But I have to fire up my PS2 to test.

sonik-br commented 6 months ago

What I see in the video above looks normal to me. And the guy is using a wheel made for the ps2, with a ps2 game that supports the wheel. I can't see why it would be wrong. The game might have a deadzone adjustment. Or it simply sux :P

Let me know if all the buttons maps correctly from your wheel to the GT Force.

Invictaz commented 6 months ago

Oke some first results of my Playstation 2 test

Firmware used is Driving Force

Need For Speed Underground 1: need to press both pedals at the same time for gas. Right pedal seems to be brake instead of gas. Steering very sensitive but works. It's freaking out because the dpad is continuously pressed but that can be circumvented by only connecting the Pico inside a race.

Need for Speed Underground 2: doesn't detect anything.

More games to follow.

sonik-br commented 6 months ago

You should test it with the FFGP (GT Force) firmware. Keep it simple. Also, gas and break are working correctly on the windows tester?

Invictaz commented 6 months ago

I tried with the FFGP firmware which should translate into GT Force and in both Gran Turismo Tokyo-Geneva and Gran Turismo 3 it doesn't detect the wheel.

It's super weird that there are two wheel types on PS2. I mean who is going to buy a separate wheel for Gran Turismo?

It does present itself as a Formula Force GP (red wheel) though in Windows

20240313_032310

Also tested Formula One 2006 with the Driving Force firmware.

Same situation as with NFS Underground. I did enable combined pedals in Windows and then plugged it into the Playstation (disabled let game adjust settings) and as long as you don't touch the brake pedal the gas pedal works as single. If you press the brake pedal only once it becomes a problem again. Then you need to press both pedals at once to gas and right pedal is the brake again.

So there is definitely something going on in the Driving Force firmware situation.

Steering works on the Formula 1 game but the sensivity is extremely high. Just a millimeter to the left and you are off the track 😄

sonik-br commented 6 months ago

It's super weird that there are two wheel types on PS2. I mean who is going to buy a separate wheel for Gran Turismo?

GT Force is the first FFB wheel released for the PS2. And it does not have a dpad... Then logitech released the Driving Force.

Pedals are working correctly on windows in both firmwares?

Setting combined pedals on windows will not change how it works on consoles. It's a windows only feature that the logitech driver handles. Please leave it unchecked for testing.

sonik-br commented 6 months ago

@Invictaz did more tests? I'm going to have some free time to work on it during the weekend. Going to fix the dpad issue.

Invictaz commented 6 months ago

@sonik-br I had some personal matters to work out. Testing again this weekend. Will report back.

Invictaz commented 6 months ago

Seems that this tool can translate my yellow wheel into a new G25. Need to check it out on a Linux pc soon. Hopefully the code can be used for this project.

https://gitlab.com/OdinTdh/pyLinuxWheel/-/blob/master/pyLinuxWheel.py?ref_type=heads

sonik-br commented 6 months ago

My firmware can already do that.

But please test the py script too. I'm curious on what happens when you set the wheel's range. The logitech windows driver have a range setting too?

Invictaz commented 6 months ago

@sonik-br Tested further

The only partially usuable firmware for now is the Formula Force GP (GT Force). I tested in in Gran Turismo 4 and Burnout 2.

The two pedals have to be pressed in order to have gas. If you press brake it goes to full brake lock on GT4. If you disconnnect the USB plug from the wheel to the pico, and then reconnect it you can have one pedal gas, but as soon as you press brake once, the brake fully locks and you have to press both pedals again to have gas. I guess that this has something to do with the combined pedals problem.

Burnout 2 works but the steering in Gran Turismo 4 is way too sensitive, I guess because there is a setting in Burnout 2 that has "force feedback" set to off which compensates for the lack of motor friction. But I did not try to set it to on yet. On GT4 there is only the setting "mild" and "strong" for force feedback and some autosteering help.

Invictaz commented 6 months ago

I tried PyLinuxwheel and it doesn't detect my wheel without the pico, really strange because it should

Bus 001 Device 011: ID 046d:c20e Logitech, Inc. WingMan Formula GP

With the adapter there is only very minor turning. With full turn to the right this is seen

Limiting or extending the range doesn't seem to change that value.

I hope you can work on Driving Force Pro and G25 firmware for my wheel, and fix the DPAD issue on Driving Force firmware. Also the sensivity or button remapping would be nice. I might setup the Pico SDK to compile the firmware after the buttons are changeable.

image

sonik-br commented 6 months ago

Pedals are working correctly on windows logitech profiler in both firmwares? (leave Combined Pedals unchecked) Pedals are also working on pyLinuxWheel?

Invictaz commented 6 months ago

The pedals are doing the same wrong behavior on pylinuxwheel.

sonik-br commented 6 months ago

So it works on windows but not on linux?

Invictaz commented 6 months ago

It's also on Windows a problem.

This is with combined pedals:

https://github.com/sonik-br/lgff_wheel_adapter/assets/20338545/99a6d0d9-c7a4-4332-8acf-082522420043

This is with combined pedals off (brakes are locked, no physical pedal is pressed)

https://github.com/sonik-br/lgff_wheel_adapter/assets/20338545/387325e3-ba91-466f-a6ac-e2887ff35d13

This is when you press both pedals down:

https://github.com/sonik-br/lgff_wheel_adapter/assets/20338545/ec5e9c7a-e596-4e93-9e1e-afcd758b104b

Invictaz commented 6 months ago

The same thing happens on original firmware (so no pico connected, wheel directly to pc).

The brake is only released when you press both pedals at once. I guess this has to do with the combined pedals to be seperated in pc games but not on the playstation side?

https://github.com/sonik-br/lgff_wheel_adapter/assets/20338545/1645a2be-25a7-47a9-9446-aa27dd2e3449

Invictaz commented 6 months ago

With the driving force firmware (FFGP) it is the same. The brake is fully locked until you press both pedals.

https://github.com/sonik-br/lgff_wheel_adapter/assets/20338545/2876d3b4-1ebc-424a-9e36-ddbef4e1dd78

sonik-br commented 6 months ago

The same thing happens on original firmware (so no pico connected, wheel directly to pc).

The brake is only released when you press both pedals at once. I guess this has to do with the combined pedals to be seperated in pc games but not on the playstation side? Bezig.met.opnemen.2024-03-24.161614.mp4

This is very weird! Pedals must work independently. Can you use the controller to play games this way on pc?

Invictaz commented 6 months ago

Yes but some games require combined pedals. Therefore the setting is there.

I hope you can find a solution.

Maybe the problem is here?

https://github.com/sonik-br/lgff_wheel_adapter/blob/a3c19e29fd68feab0292af1021b8bddab1e72a40/pico_lgff_wheel_adapter/pico_lgff_wheel_adapter.ino#L911

https://github.com/sonik-br/lgff_wheel_adapter/blob/a3c19e29fd68feab0292af1021b8bddab1e72a40/pico_lgff_wheel_adapter/pico_lgff_wheel_adapter.ino#L787

https://github.com/sonik-br/lgff_wheel_adapter/blob/a3c19e29fd68feab0292af1021b8bddab1e72a40/pico_lgff_wheel_adapter/pico_lgff_wheel_adapter.ino#L78

sonik-br commented 5 months ago

Sorry but I can't really help if the pedals are acting weird even on logitech profiler. Your device is reporting something wrong for the pedals.

Invictaz commented 5 months ago

Sorry but I can't really help if the pedals are acting weird even on logitech profiler. Your device is reporting something wrong for the pedals.

This is the normal behavior for the pedals. Only if you have a combined pedal setting you have 1 axis that the game expects. I'm really sad now that this cannot be used.

I don't believe there is anything wrong with my device as it is almost brand new.

Show me how it is normally working?

I will try on a Windows XP machine as well.

sonik-br commented 5 months ago

Each pedal should work independently on the logitech profiler. (with combined pedals disabled) ie: if you only press the gas pedal, only the gas pedal gauge should move (from left to right). I can make a video of it later...

The brake is only released when you press both pedals at once.

This should not happen!