FIX94 / Nintendont

A Wii Homebrew Project to play GC Games on Wii and vWii on Wii U
1.96k stars 326 forks source link

Fix Wii U adapter clone not working in Wii U mode #1242

Open zardam opened 1 month ago

zardam commented 1 month ago

I have a clone adapter with USB id 0079:1846 when configured in PC mode. It was not working in Wii U mode in Nintendont on a Wii. Adding this control transfer during initialisation make it work. I think it is harmless for other adapters but I cannot be sure as original adapters are very hard to find at a decent price.

eku commented 1 month ago

Does this have an influence on genuine adapters? Did you test?

zardam commented 1 month ago

I did not test with a genuine adapter as I do not have one.

After checking dolphin emulator source code (which supports my adapter in Wii U mode out of the box) , it seems that it does more or less the same here: https://github.com/dolphin-emu/dolphin/blob/f412e2488c24fc81a784c198ba9610e54cdd1d9a/Source/Core/InputCommon/GCAdapter.cpp#L598. It just sends a 1 value instead of 0 in my pull request, I will test with 1 and update it if it works.

Dolphin does not have any issue with genuine adapters, so I guess it will be the same with Nintendont.

I can provide a compiled version if you want to try.

zardam commented 1 month ago

The compiled version is available here: https://github.com/zardam/Nintendont/releases/download/v0/loader.dol if anyone wants to test.

eku commented 1 day ago

Dolphin does not have any issue with genuine adapters, so I guess it will be the same with Nintendont.

https://github.com/dolphin-emu/dolphin/blob/f412e2488c24fc81a784c198ba9610e54cdd1d9a/Source/Core/InputCommon/GCAdapter.cpp#L596C1-L597C66

_"However it returns LIBUSB_ERRORPIPE with Mayflash adapters."

Hmm, can we make this call conditional, i.e. not for the Mayflash adapters?

zardam commented 1 day ago

I dont think it is needed to make this call conditional:

I really think that this control transfer is harmless, and it may be difficult to differentiate the adapters. Mine USB descriptor is pretty generic, no brand or model specified.