sonik-br / lgff_wheel_adapter

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

Wii and gamecube output #5

Closed Invictaz closed 4 months ago

Invictaz commented 4 months ago

Hey I saw on your Twitter/X post that you are investigating Wii and Gamecube output.

Did you check out Fakemote and [Nintendont] (https://github.com/FIX94/Nintendont) ?

The latter has support for ini files. So if you would design a pico firmware that outputs as a wii or gamecube wheel we might are able to write an ini file that Nintendont understands to have working in Gamecube games on Wii and WiiU.

Andother finding is HID2VPad which recently got a port to the Aroma environment. If you write an ini file for it it can be used.

I'm not sure how the Gamecube and Wii wheels work. Do they output as a Wiimote with nunchuck for the axis or on the Gamecube side do they output as a controller?

sonik-br commented 4 months ago

I need access to those devices to see how they work. Never seen they before.

Invictaz commented 4 months ago

I have the Wii and WiiU so I can check.

Invictaz commented 4 months ago

For Gamecube input you might want to check this repo's also

https://github.com/DavidPagels/retro-pico-switch

https://github.com/juan518munoz/PicoSwitch-WirelessGamepadAdapter

sonik-br commented 4 months ago

Can you dump the usb data for the wii wheel? Gamecube will be more complex as you will need to build a hardware to talk to the device.

Invictaz commented 4 months ago

Isn't the Wii Wheel data in the new-lg4ff repo?

You don't need the wheel. It connects via a wireless adapter that you put in the Wii USB port

image

image

image

Invictaz commented 4 months ago

See

https://wiibrew.org/wiki/Logitech_USB_steering_wheel

Invictaz commented 4 months ago

The gamecube wheel is made by Immersion technologies

I guess you can use this driver https://github.com/timschumi/iforce-binary-driver

Most Logitech Wheels use the Immersion technology as base.

Some dumps of the wheel connected to Dolphin

logitech-gamecube-wheel-dolphin.txt

https://hitmen.c02.at/files/yagcd/yagcd/chap9.html

image

Invictaz commented 4 months ago

List of Gamecube games that support the Wheel

Burnout Burnout 2 4x4 Evolution 2 Burnout 2: Point of Impact Dakar 2: The World's Ultimate Rally F-Zero GX Hot Wheels: Velocity X Mario Kart Double Dash NASCAR HEAT 2: Dirt to Daytona NASCAR Thunder NASCAR Thunder 2003 Need For Speed Underground Need For Speed Underground 2 Need For Speed:Hot Pursuit 2 PRO RALLY 2002 R: Racing Evolution Rally Championship Street Racing Syndicate The Simpsons Hit & Run V-Rally 3 Starsky & Hutch

Invictaz commented 4 months ago

You also have the Logic3 NW819 wheel for Wii

image

image

Invictaz commented 4 months ago

Gamecube compatible wheels

madcatz mc2 saitek gtz500 thrustmaster universal challenge thrustmaster kart challenge thrustmaster challenge 2 Intec Racing wheel

I have a steering wheel, Mad cats mc2 Product ID: 0xf020 Vendor ID: 0x1bad Version: 4.90 Serial Number: 00CC99FD Speed: Up to 12 Mb/sec Manufacturer: Mad Catz, Inc. Location ID: 0x14200000 / 3 Current Available (mA): 500 Extra Operating Current (mA): 0

sonik-br commented 4 months ago

Isn't the Wii Wheel data in the new-lg4ff repo?

You don't need the wheel. It connects via a wireless adapter that you put in the Wii USB port

Handy to have access to one to do a testing but yes it might be possible to do with the info on that page.

The GC one does not seem to use the exact same commands as other logitech wheels. Dolphin only handles the Constant effect and transtates it to dinput.

Invictaz commented 4 months ago

Isn't the Wii Wheel data in the new-lg4ff repo? You don't need the wheel. It connects via a wireless adapter that you put in the Wii USB port

Handy to have access to one to do a testing but yes it might be possible to do with the info on that page.

The GC one does not seem to use the exact same commands as other logitech wheels. Dolphin only handles the Constant effect and transtates it to dinput.

You mean this file?

https://github.com/dolphin-emu/dolphin/blob/5090a028e6e4125b780bcb1c76dcd8fe956a0b97/Source/Core/Core/HW/SI/SI_DeviceGCSteeringWheel.cpp#L4

https://github.com/NicoHood/Nintendo/commit/ba9816c347ca142030281063487fe8ca9e2137ba

Invictaz commented 4 months ago

It seems on some games the degrees of rotation must be set even lower than 270 degrees

https://soloemulacion.blogspot.com/2014/06/guia-analisis-usando-un-volante-en.html

The earliest build of Dolphin with GC wheels is

https://web.archive.org/web/20140310022112if_/https://dl.dolphin-emu.org/builds/dolphin-GC-Wheel-3.5-105-x86.7z

Invictaz commented 4 months ago

Can you dump the usb data for the wii wheel? Gamecube will be more complex as you will need to build a hardware to talk to the device.

I do have the WUP-028 Gamecube to USB adapter but no driver for it and I don't have the Gamecube Wheel. You can also do it via a 8bitdo GBROS adapter over bluetooth or USB.

sonik-br commented 4 months ago

I'm not sure if a gneric gamecube to usb adapter would help in this case. I can read a gamecube device via arduino or pico but I don't have the wheel. Let's see if I can get one.

Invictaz commented 4 months ago

I'm not sure if a gneric gamecube to usb adapter would help in this case. I can read a gamecube device via arduino or pico but I don't have the wheel. Let's see if I can get one.

This is the official Nintendo adapter

image

sonik-br commented 4 months ago

The adapter is not made for wheel devices. I'm pretty sure that it will not pass force feedback commands.

Invictaz commented 4 months ago

Tis adapter has 2 USB port, one specially for rumble as it requires additionele power.

Joybus protocol indicates the force feedback here

https://n64brew.dev/wiki/Joybus_Protocol

https://sites.google.com/site/consoleprotocols/home/nintendo-joy-bus-documentation/custom-joybus-device

https://www.int03.co.uk/crema/hardware/gamecube/gc-control.html

The only other option is this

https://www.amazon.com/Nyko-Retro-Controller-Adapter-GameCube-Nintendo/dp/B07JGH2645?th=1

Or the Mayflash adapter.

Invictaz commented 4 months ago

046D:C29C=Speed Force Wireless Wheel for Wii 046D:CAB1=Cordless Keyboard for Wii HID Receiver

Wii Wheel USB patch to Linux

https://www.spinics.net/lists/linux-input/msg10530.html https://elixir.bootlin.com/linux/latest/source/drivers/hid/hid-lg4ff.c#L142

sonik-br commented 4 months ago

Tis adapter has 2 USB port, one specially for rumble as it requires additionele power.

Joybus protocol indicates the force feedback here

https://n64brew.dev/wiki/Joybus_Protocol

https://sites.google.com/site/consoleprotocols/home/nintendo-joy-bus-documentation/custom-joybus-device

https://www.int03.co.uk/crema/hardware/gamecube/gc-control.html

The only other option is this

https://www.amazon.com/Nyko-Retro-Controller-Adapter-GameCube-Nintendo/dp/B07JGH2645?th=1

Or the Mayflash adapter.

Rumble on GC is just a single bit. Logitech FFB commands are complex byte arrays. Possible? Yes, but I don't think that the adapter implements ffb.

Invictaz commented 4 months ago

Sadly Logitech doesn't describe the protocol in their pdf. Not even in v1.0. Must be because on older wheels they licensed it from Immersion so it isn't their own protocol.

https://github.com/mathijsvandenberg/g29emu/files/14395098/Logitech_Force_Feedback_Protocol_V1.6.pdf

and the SDK

https://github.com/Pinkii-/STARTHack/blob/master/Assets/Logitech%20SDK/SDK%20Documentation/LogitechGamingSteeringWheelSDK.pdf

Invictaz commented 4 months ago

The C-X5A57 adapter dongle for the Wii Wheel is 10USD on Ebay. It is also used by the wireless Playstation 3 wheel and the Cordless precision controller.

c1823c1e-bd0f-4667-a096-0382a15b5de9

sonik-br commented 4 months ago

Interesting! So same dongle for multiple devices. I bet that it does change it's ID based on the paired device.

Btw ebay does not help. I live in Brazil. Most stuff on ebay does not ship there, or the shipping value plus import tax would be a deal breaker. And if it needs the wheel to work, I would also need the wheel :/

Invictaz commented 4 months ago

I see on X you need the pedal output on the Gamecube wheel. Did you make any progress? From what I asked around on various Discord servers the Wii games had specific powerpc code to address the wireless adapter. It is rumored that to have wheel support you needed a different SDK for Wii to have wheel support. I need to look into the SDK.

sonik-br commented 4 months ago

This is for the wii, right? I don't have that wheel. I'm looking into how it the wiring of the GC pedal.

Invictaz commented 4 months ago

I think the Wii side of things will be much more difficult than the Gamecube for now. But I need to see in the SDK.

sonik-br commented 4 months ago

By looking at the Dolphin code, the GC wheel only seems to support the Constant effect. Or at least that's what Fzero uses. Can't find logs from other games. So GC should be easy to implement as adedicated adapter. Mapping other effects to it will be difficult.

Wii on the other hand seems to use the same ffb commands as other logitech wheels. I hope o get one to do some tests.

sonik-br commented 4 months ago

Closing as it's out of the scope of the project. Gamecube does not use usb, plus I think the wheel only have simple constant effect. It does not share the same ffb protocol as other logitech wheels.

Wii (speed force wireless) input/output might happen in the future if I can get one.