Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

zardam
Copy link

@zardam zardam commented Oct 19, 2024

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
Copy link

eku commented Oct 21, 2024

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

@zardam
Copy link
Author

zardam commented Oct 21, 2024

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 zardam force-pushed the fix_wiiu_gc_adapter_clone_not_working branch from 47fc184 to 0ab6ac6 Compare October 21, 2024 20:54
@zardam
Copy link
Author

zardam commented Oct 26, 2024

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

@eku
Copy link

eku commented Nov 25, 2024

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_ERROR_PIPE with Mayflash adapters."

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

@zardam
Copy link
Author

zardam commented Nov 25, 2024

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

  • My adapter in Wii mode works fine on a Switch, that means that the Switch is sending this control transfer.
  • Mayflash adapters also work so they should just ignore this control transfer.
  • Dolphin source says that Mayflash adapters reports an error for this transfer, and the result is ignored (only a warning logged). I do not see reports that Mayflash adapters are not working with Dolphin.

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants