-
-
Notifications
You must be signed in to change notification settings - Fork 101
Wiimote: Add wireless controller syncing functionality #197
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
Conversation
|
WHOA. ill have to look carefully at this, and test it fully but im looking forward to this! |
|
WOAH |
|
ok so, i made a checklist for this PR that i will post below. i do this because of the huge impact this change has on the community. we've been waiting for this change for a LONG time but i never got around to do it nor do i understand BT/Wiiuse enough haha. Anyway, i would like the following to be checked/done before merge:
this should be it. @Zarithya , it would be great if you could provide a small example program in the wii-examples repo that we can use/ship as an example but also use as a test to test the change :) we (the wii community) are extremely happy with the change and would love to see this merged :) |
|
Also, Wiimotes won't reinit anymore after calling WPAD_Init();
printf("Wiimote LED should be on\n");
sleep(3);
// A lot of apps seem to loop through like this (including Priiloader)
for (int i = 0; i < WPAD_MAX_DEVICES; i++)
WPAD_Disconnect(i);
WPAD_Shutdown();
printf("Wiimote LED should be off\n");
sleep(3);
WPAD_Init();
printf("Wiimote LED should be on again, but it remains off\n");
sleep(3);If you skip calling Thank you so much for sharing this with the community though. This has been on our wishlists for a long time 😊 |
@wiidev The bug is actually with Wiimotes reconnecting if you don't call Of course, Wii games are able to disconnect Wiimotes and have them reconnect later, so I'm not sure how to properly replicate that. Maybe sniffing Bluetooth packets sent between the Wii menu and a Wiimote is in order... |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ok, this is my first passthrough of the change. let this not demotivate you please. i love this and i hope you will see this through!
we would also love to see the test app ^^
aha, so the disconnect actually working as designed now haha |
|
ive logged in dolphin the following when in SM i boot a game:
then the game boots, as code was running @80003400 which is no longer SM:
this doesn't say much to me, but i suspect it only reset the interface, but not actually disconnect wiimotes.
after this, SM boots and is running code @80003400 so i think, but would love @Zarithya & @wiidev's input on this, that we fixed the disconnect bug, but that on the sdk its left in searching state because SDK doesn't actively disconnect them unless its shutting down the system, which i saw when shutting down in dolphin when in SM :
|
|
Updates on this? |
zari was at a con last weekend and has been recovering this week. we haven't forgotten about this aep :) |
DacoTaco
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
move cleanups! :p
DacoTaco
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
overal looks a lot cleaner than before :)
|
Any updates on when this can get fully merged? What's left for that? |
It would be good to put together an example app to demonstrate usage that we can also use to test that everything works as expected. |
we do. i added a wiimote example to test it with ( https://github.com/devkitPro/wii-examples/blob/master/devices/wiimote/source/wiimote.c ) , but the guest sync isn't added yet because this isn't merged yet |
|
It's just Wiimote/Console Power button separation left, right? |
This PR makes sweeping changes to how controllers are connected in homebrew apps, allowing for the pairing of new controllers without leaving a homebrew environment. This can be done either through pressing the red sync button on the front of the console (which is also exposed to homebrew authors via
WPAD_SetSyncButtonCallback) for permanent pairing or by callingWPAD_Search/WPAD_StopSearch, which replicates the "Reconnect" button on the Home Menu and allows for guest controllers to be connected temporarily.I wrote this as a convenience so I don't have to keep exiting to the Wii menu every time I want to test a new controller (I refurbish a lot of Wii controllers) but I figured it could be of use to others writing homebrew. This is my first time doing anything like this (including Wii software and Bluetooth driver development) so please let me know if anything needs to be tweaked!
The SYSCONF writing functionality was borrowed from AnyRegion Changer, written by tona.