Skip to content

Add wireless controller syncing functionality to WPAD/LWBT #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

Open
wants to merge 9 commits into
base: master
Choose a base branch
from

Conversation

Zarithya
Copy link

@Zarithya Zarithya commented Mar 26, 2025

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 calling WPAD_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.

@DacoTaco
Copy link
Member

WHOA.
this is huge!

ill have to look carefully at this, and test it fully but im looking forward to this!

@Aeplexi
Copy link

Aeplexi commented Mar 26, 2025

WOAH

@DacoTaco
Copy link
Member

DacoTaco commented Mar 26, 2025

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:

  • Check Wiiuse changes to see if they don't have any conflicts upstream ( https://github.com/wiiuse/wiiuse ). this is because one day we will want to switch to upstream wiiuse
  • Test if code can handle a sync of a wiimote that is already synced (caused issues in past old wiimote demos)
  • Test Usage & syncing of classic remote and balance board
  • Test Regular & TR wiimotes
  • Test Syncing with red buttons
    • Test on vWii
    • Test on Wii Mini
    • Test on Wii
  • Test Syncing with search functions (temp sync)
    • Test on vWii
    • Test on Wii Mini
    • Test on Wii
  • Add Example in https://github.com/devkitPro/wii-examples
  • Do code review
  • Buy coffee to celebrate

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 :)
because of this, i would like to invite anyone that wants to to help with the checklist above :)

wiiuse/io_wii.c Outdated
Comment on lines 131 to 132
if(wml->sock==NULL)
wml->sock = bte_new();
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This can cause apps to crash and the cursors to go haywire when 2 or more Wiimotes are connected. Removing the null check seems to fix things though.

You'd be able to test for yourself if you can compile USB Loader GX, WiiFlow, Snes9xRX or any other app that can display more than 1 cursor like the system menu.

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hmm, not sure why that would be causing anything to go haywire... We don't want to create a new PCB if we already have one. And in my testing app, I have multiple cursors working just fine... What specific app are you testing with?

Copy link

@wiidev wiidev Mar 27, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I've tested it with USB Loader GX and WiiFlow Lite.

Your code will work when there's 1 Wiimote connected, but if you connect a second then the cursor for player 1 will either freeze in place or it'll change to player 2 and both Wiimotes start fighting over where the cursor should be on the screen. This can eventually result in a DSI exception and the stack dump goes straight to these libogc changes.

With debug enabled like this I got the following.

	if(wml->sock==NULL)
	{
		printf("wml->sock was null\n");
		wml->sock = bte_new();
	}
	else
		printf("err: %d / state: %d / bdaddr: %02x:%02x:%02x:%02x:%02x:%02x\n", wml->sock->err, wml->sock->state, wml->sock->bdaddr.addr[5], wml->sock->bdaddr.addr[4], wml->sock->bdaddr.addr[3], wml->sock->bdaddr.addr[2], wml->sock->bdaddr.addr[1], wml->sock->bdaddr.addr[0]);
Active Wiimote found in slot 1
wiiuse_register 0x80fa858c, bdaddr: 00:19:1d:6d:XX:XX
wml->sock was null
__wpad_linkkeynotCB
WPAD Assigning Slot 1 (used: 0x02)
__wpad_eventCB CONNECT

Active Wiimote found in slot 0
wiiuse_register 0x80fa8538, bdaddr: 00:25:a0:d3:XX:XX
err: 0 / state: 2 / bdaddr: 00:19:1d:6d:XX:XX
__wpad_linkkeynotCB
WPAD Assigning Slot 0 (used: 0x03)
__wpad_eventCB CONNECT

I'm pretty sure that second Wiimote shouldn't be trying to use the same sock as the first. It didn't originally and it didn't in an earlier version of your changes.

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

They definitely shouldn't be sharing a socket, but that code should create exactly one socket for each active slot: four slots for Wiimotes, then two for accessories like the Balance Board. It's meant to be that if a Wiimote disconnects and another one takes its slot, then the socket doesn't need to be destroyed, just redirected. It works in my code, but there's probably a race condition somewhere since I didn't know how to properly avoid those... Will look into this later.

Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hey, I made you a test app. If you check your invites you should find the link to the private repo.

It seems like the issue occurs after you disconnect and then reinitialise Wiimotes. And that's something that we'll typically do when we want to reload to a different IOS.

@wiidev
Copy link

wiidev commented Mar 27, 2025

Also, Wiimotes won't reinit anymore after calling WPAD_Disconnect() followed by WPAD_Shutdown().

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 WPAD_Disconnect() and only call WPAD_Shutdown() then it'll work correctly.

Thank you so much for sharing this with the community though. This has been on our wishlists for a long time 😊

@Zarithya
Copy link
Author

Zarithya commented Mar 27, 2025

Also, Wiimotes won't reinit anymore after calling WPAD_Disconnect() followed by WPAD_Shutdown().

@wiidev The bug is actually with Wiimotes reconnecting if you don't call WPAD_Disconnect() first. Seems like WPAD_Shutdown() isn't waiting long enough before uninitializing the Bluetooth subsystem, so the connection never gets fully disconnected and the Wiimote is left with an open connection that it tries to reconnect to once the Bluetooth subsystem is back online. The intended behavior is for the disconnect to finish processing before shutting down Bluetooth, which leaves the Wiimote satisfied and not trying to reconnect.

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...

Copy link
Member

@DacoTaco DacoTaco left a 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 ^^

@@ -40,6 +41,7 @@ distribution.
static int __conf_inited = 0;
static u8 __conf_buffer[0x4000] ATTRIBUTE_ALIGN(32);
static char __conf_txt_buffer[0x101] ATTRIBUTE_ALIGN(32);
static int __conf_buffer_dirty = FALSE;
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

use actual bool instead of the weird BOOL stuff

if (fd < 0)
return fd;

ret = IOS_Write(fd, __conf_buffer, 0x4000);
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

i would add a define with the value of 0x4000 and call it something like ConfFileSize. its just that the 0x4000 looks iffy at first, but upon closer inspection the file is always 0x4000 (or so wiibrew says).
so maybe the define + comment to explain would be good.
after that, maybe alter the reading too :D

if (ret < 0)
return ret;

/*ret = __CONF_WriteTxtBuffer();
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

in comments and not implemented, can be removed :)

@@ -174,6 +190,10 @@ s32 CONF_GetRegion(void);
s32 CONF_GetArea(void);
s32 CONF_GetVideo(void);

s32 CONF_SetPadDevices(const conf_pads *pads);
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

stupid minor change, but i'd put the Get & Set's together :)

@@ -181,7 +181,7 @@ typedef s8 err_t;
* \hideinitializer
*/
#define LOGGING 0
#define ERRORING 0
#define ERRORING 1
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

maybe leave the error log off :p

default:
printf("__wpad_eventCB(%d)\n", event);
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

comment

return ERR_CONN;
}

static s8 __wpad_linkkeyreqCB(void *arg,struct bd_addr *pad_addr)
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

put this in comments, its unused but useful if the bug you noticed would need fixing in the future

return result;
}

static s32 GetActiveSlot(struct bd_addr *pad_addr)
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

unused ? what is the use of this function?
same for GetRegisteredSlot and GetGuestSlot

@@ -138,12 +141,43 @@ int wiiuse_register(struct wiimote_listen_t *wml, struct bd_addr *bdaddr, struct
return 0;
}

int wiiuse_connect(struct wiimote_listen_t *wml, struct bd_addr *bdaddr, u8 *name, struct wiimote_t *(*assign_cb)(struct wiimote_listen_t *wml, u8 err))
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this is a problem and weird. in both wiiuse upstream as our fork wiiuse_connect's signature is int wiiuse_connect(struct wiimote_t** wm, int wiimotes). how does it compile this? can we make a connect work with that signature?

i ask this because switching to upstream means that wiiuse_connect will be the mentioned signature, and pass the info to a OS (in this case libogc) implementation of the connect function.
the wiimote_t should have all the info you pass here afaik. could you check?
wiiuse: https://github.com/wiiuse/wiiuse/blob/master/src/wiiuse.h#L730
current libogc fork : https://github.com/devkitPro/libogc/blob/master/gc/wiiuse/wiiuse.h#L594

@DacoTaco
Copy link
Member

Also, Wiimotes won't reinit anymore after calling WPAD_Disconnect() followed by WPAD_Shutdown().

@wiidev The bug is actually with Wiimotes reconnecting if you don't call WPAD_Disconnect() first. Seems like WPAD_Shutdown() isn't waiting long enough before uninitializing the Bluetooth subsystem, so the connection never gets fully disconnected and the Wiimote is left with an open connection that it tries to reconnect to once the Bluetooth subsystem is back online. The intended behavior is for the disconnect to finish processing before shutting down Bluetooth, which leaves the Wiimote satisfied and not trying to reconnect.

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...

aha, so the disconnect actually working as designed now haha
i suspect either SDK stuff doesnt call disconnect or indeed a feature is missing. this could be fixed in upstream wiiuse, i dont know...

@DacoTaco
Copy link
Member

DacoTaco commented Mar 27, 2025

ive logged in dolphin the following when in SM i boot a game:

13:27:474 Core/IOS/USB/Bluetooth/BTEmu.cpp:1461 I[IOS_WIIMOTE]: Command: HCI_CMD_RESET
13:29:823 Core/IOS/USB/Bluetooth/WiimoteDevice.cpp:65 I[IOS_WIIMOTE]: Wiimote: #0 Constructed
13:29:823 Core/IOS/USB/Bluetooth/WiimoteDevice.cpp:65 I[IOS_WIIMOTE]: Wiimote: #1 Constructed
13:29:823 Core/IOS/USB/Bluetooth/WiimoteDevice.cpp:65 I[IOS_WIIMOTE]: Wiimote: #2 Constructed
13:29:823 Core/IOS/USB/Bluetooth/WiimoteDevice.cpp:65 I[IOS_WIIMOTE]: Wiimote: #3 Constructed
13:29:823 Core/IOS/USB/Bluetooth/WiimoteDevice.cpp:65 I[IOS_WIIMOTE]: Wiimote: #4 Constructed

then the game boots, as code was running @80003400 which is no longer SM:

13:30:451 Core/IOS/USB/Bluetooth/BTEmu.cpp:1461 I[IOS_WIIMOTE]: Command: HCI_CMD_RESET
13:30:454 Core/IOS/USB/Bluetooth/BTEmu.cpp:1813 I[IOS_WIIMOTE]: Command: HCI_CMD_READ_BUFFER_SIZE:
13:30:455 Core/IOS/USB/Bluetooth/BTEmu.cpp:1644 I[IOS_WIIMOTE]: Command: HCI_CMD_WRITE_UNIT_CLASS:
13:30:455 Core/IOS/USB/Bluetooth/BTEmu.cpp:1583 I[IOS_WIIMOTE]: Command: HCI_CMD_WRITE_LOCAL_NAME:
13:30:456 Core/IOS/USB/Bluetooth/BTEmu.cpp:1502 I[IOS_WIIMOTE]: Command: HCI_CMD_WRITE_PIN_TYPE:
13:30:456 Core/IOS/USB/Bluetooth/BTEmu.cpp:1663 I[IOS_WIIMOTE]: Command: HCI_CMD_HOST_BUFFER_SIZE:
13:30:456 Core/IOS/USB/Bluetooth/BTEmu.cpp:1768 I[IOS_WIIMOTE]: Command: HCI_CMD_READ_LOCAL_VER:
13:30:457 Core/IOS/USB/Bluetooth/BTEmu.cpp:1829 I[IOS_WIIMOTE]: Command: HCI_CMD_READ_BDADDR:
13:30:457 Core/IOS/USB/Bluetooth/BTEmu.cpp:1792 I[IOS_WIIMOTE]: Command: HCI_CMD_READ_LOCAL_FEATURES:
13:30:459 Core/IOS/USB/Bluetooth/BTEmu.cpp:1729 I[IOS_WIIMOTE]: Command: HCI_CMD_WRITE_INQUIRY_MODE:
13:30:460 Core/IOS/USB/Bluetooth/BTEmu.cpp:1751 I[IOS_WIIMOTE]: Command: HCI_CMD_WRITE_PAGE_SCAN_TYPE:
13:30:461 Core/IOS/USB/Bluetooth/BTEmu.cpp:1704 I[IOS_WIIMOTE]: Command: HCI_CMD_WRITE_INQUIRY_SCAN_TYPE:
13:30:858 Core/IOS/USB/Bluetooth/BTEmu.cpp:1644 I[IOS_WIIMOTE]: Command: HCI_CMD_WRITE_UNIT_CLASS:
13:30:859 Core/IOS/USB/Bluetooth/BTEmu.cpp:1600 I[IOS_WIIMOTE]: Command: HCI_CMD_WRITE_PAGE_TIMEOUT:
13:30:870 Core/IOS/USB/Bluetooth/BTEmu.cpp:1526 I[IOS_WIIMOTE]: Command: HCI_CMD_READ_STORED_LINK_KEY:
13:30:888 Core/IOS/USB/Bluetooth/BTEmu.cpp:1850 I[IOS_WIIMOTE]: Command: CommandVendorSpecific_FC4F: (callstack WUDiRemovePatch)
13:30:889 Core/IOS/USB/Bluetooth/BTEmu.cpp:1850 I[IOS_WIIMOTE]: Command: CommandVendorSpecific_FC4F: (callstack WUDiRemovePatch)
13:30:890 Core/IOS/USB/Bluetooth/BTEmu.cpp:1461 I[IOS_WIIMOTE]: Command: HCI_CMD_RESET
13:30:891 Core/IOS/USB/Bluetooth/BTEmu.cpp:1813 I[IOS_WIIMOTE]: Command: HCI_CMD_READ_BUFFER_SIZE:
13:30:902 Core/IOS/USB/Bluetooth/BTEmu.cpp:1644 I[IOS_WIIMOTE]: Command: HCI_CMD_WRITE_UNIT_CLASS:
13:30:903 Core/IOS/USB/Bluetooth/BTEmu.cpp:1583 I[IOS_WIIMOTE]: Command: HCI_CMD_WRITE_LOCAL_NAME:
13:30:903 Core/IOS/USB/Bluetooth/BTEmu.cpp:1502 I[IOS_WIIMOTE]: Command: HCI_CMD_WRITE_PIN_TYPE:
13:30:904 Core/IOS/USB/Bluetooth/BTEmu.cpp:1663 I[IOS_WIIMOTE]: Command: HCI_CMD_HOST_BUFFER_SIZE:
13:30:905 Core/IOS/USB/Bluetooth/BTEmu.cpp:1768 I[IOS_WIIMOTE]: Command: HCI_CMD_READ_LOCAL_VER:
13:30:905 Core/IOS/USB/Bluetooth/BTEmu.cpp:1829 I[IOS_WIIMOTE]: Command: HCI_CMD_READ_BDADDR:
13:30:906 Core/IOS/USB/Bluetooth/BTEmu.cpp:1792 I[IOS_WIIMOTE]: Command: HCI_CMD_READ_LOCAL_FEATURES:
13:30:908 Core/IOS/USB/Bluetooth/BTEmu.cpp:1729 I[IOS_WIIMOTE]: Command: HCI_CMD_WRITE_INQUIRY_MODE:
13:30:910 Core/IOS/USB/Bluetooth/BTEmu.cpp:1751 I[IOS_WIIMOTE]: Command: HCI_CMD_WRITE_PAGE_SCAN_TYPE:
13:30:931 Core/IOS/USB/Bluetooth/BTEmu.cpp:1704 I[IOS_WIIMOTE]: Command: HCI_CMD_WRITE_INQUIRY_SCAN_TYPE:
13:30:951 Core/IOS/USB/Bluetooth/BTEmu.cpp:1644 I[IOS_WIIMOTE]: Command: HCI_CMD_WRITE_UNIT_CLASS:
13:30:956 Core/IOS/USB/Bluetooth/BTEmu.cpp:1600 I[IOS_WIIMOTE]: Command: HCI_CMD_WRITE_PAGE_TIMEOUT:
13:30:961 Core/IOS/USB/Bluetooth/BTEmu.cpp:1583 I[IOS_WIIMOTE]: Command: HCI_CMD_WRITE_LOCAL_NAME:
13:30:964 Core/IOS/USB/Bluetooth/BTEmu.cpp:1255 I[IOS_WIIMOTE]: Command: HCI_CMD_ACCEPT_CON
13:30:964 Core/IOS/USB/Bluetooth/BTEmu.cpp:757 I[IOS_WIIMOTE]: Event: Command Status (Opcode: 0x0409)
13:30:964 Core/HW/WiimoteEmu/EmuSubroutines.cpp:187 I[Wiimote]: Attaching Motion Plus (Wiimote 0 in slot 0)
13:30:964 Core/HW/WiimoteEmu/EmuSubroutines.cpp:213 I[Wiimote]: Switching to Extension 1 (Wiimote 0 in slot 0)
13:30:971 Core/IOS/USB/Bluetooth/BTEmu.cpp:1365 I[IOS_WIIMOTE]: Command: HCI_CMD_REMOTE_NAME_REQ
13:30:971 Core/IOS/USB/Bluetooth/BTEmu.cpp:757 I[IOS_WIIMOTE]: Event: Command Status (Opcode: 0x0419)
13:30:973 Core/IOS/USB/Bluetooth/BTEmu.cpp:1415 I[IOS_WIIMOTE]: Command: HCI_CMD_READ_CLOCK_OFFSET
13:30:973 Core/IOS/USB/Bluetooth/BTEmu.cpp:757 I[IOS_WIIMOTE]: Event: Command Status (Opcode: 0x041f)
13:30:973 Core/IOS/USB/Bluetooth/BTEmu.cpp:1400 I[IOS_WIIMOTE]: Command: HCI_CMD_READ_REMOTE_VER_INFO
13:30:973 Core/IOS/USB/Bluetooth/BTEmu.cpp:757 I[IOS_WIIMOTE]: Event: Command Status (Opcode: 0x041d)
13:30:984 Core/IOS/USB/Bluetooth/BTEmu.cpp:1385 I[IOS_WIIMOTE]: Command: HCI_CMD_READ_REMOTE_FEATURES
13:30:984 Core/IOS/USB/Bluetooth/BTEmu.cpp:757 I[IOS_WIIMOTE]: Event: Command Status (Opcode: 0x041b)
13:30:985 Core/IOS/USB/Bluetooth/BTEmu.cpp:1350 I[IOS_WIIMOTE]: Command: HCI_CMD_AUTH_REQ
13:30:985 Core/IOS/USB/Bluetooth/BTEmu.cpp:757 I[IOS_WIIMOTE]: Event: Command Status (Opcode: 0x0411)
13:30:987 Core/IOS/USB/Bluetooth/BTEmu.cpp:1334 I[IOS_WIIMOTE]: Command: HCI_CMD_CHANGE_CON_PACKET_TYPE
13:30:987 Core/IOS/USB/Bluetooth/BTEmu.cpp:757 I[IOS_WIIMOTE]: Event: Command Status (Opcode: 0x040f)
13:30:989 Core/IOS/USB/Bluetooth/BTEmu.cpp:1449 I[IOS_WIIMOTE]: Command: HCI_CMD_WRITE_LINK_POLICY_SETTINGS
13:30:989 Core/IOS/USB/Bluetooth/BTEmu.cpp:757 I[IOS_WIIMOTE]: Event: Command Status (Opcode: 0x080d)
13:30:990 Core/IOS/USB/Bluetooth/BTEmu.cpp:1681 I[IOS_WIIMOTE]: Command: HCI_CMD_WRITE_LINK_SUPERVISION_TIMEOUT
13:30:991 Core/IOS/USB/Bluetooth/BTEmu.cpp:1430 I[IOS_WIIMOTE]: Command: HCI_CMD_SNIFF_MODE
13:30:991 Core/IOS/USB/Bluetooth/BTEmu.cpp:757 I[IOS_WIIMOTE]: Event: Command Status (Opcode: 0x0803)

this doesn't say much to me, but i suspect it only reset the interface, but not actually disconnect wiimotes.
i say that because in priiloader, i found it sent a HCI_CMD_DISCONNECT command, which i assume is from the WPAD_Disconnect or WPAD_Shutdown (which also sends a disconnect btw).
log :

32:52:620 Core/IOS/USB/Bluetooth/BTEmu.cpp:1230 I[IOS_WIIMOTE]: Command: HCI_CMD_DISCONNECT
32:52:620 Core/IOS/USB/Bluetooth/BTEmu.cpp:757 I[IOS_WIIMOTE]: Event: Command Status (Opcode: 0x0406)
32:52:620 Core/HW/WiimoteEmu/EmuSubroutines.cpp:187 I[Wiimote]: Attaching Motion Plus (Wiimote 0 in slot 0)
32:52:620 Core/HW/WiimoteEmu/EmuSubroutines.cpp:213 I[Wiimote]: Switching to Extension 1 (Wiimote 0 in slot 0)
32:52:620 Core/IOS/USB/Bluetooth/BTEmu.cpp:1461 I[IOS_WIIMOTE]: Command: HCI_CMD_RESET

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 :

27:33:365 Core/IOS/USB/Bluetooth/BTEmu.cpp:1230 I[IOS_WIIMOTE]: Command: HCI_CMD_DISCONNECT
27:33:365 Core/IOS/USB/Bluetooth/BTEmu.cpp:757 I[IOS_WIIMOTE]: Event: Command Status (Opcode: 0x0406)
27:33:365 Core/HW/WiimoteEmu/EmuSubroutines.cpp:187 I[Wiimote]: Attaching Motion Plus (Wiimote 0 in slot 0)
27:33:365 Core/HW/WiimoteEmu/EmuSubroutines.cpp:213 I[Wiimote]: Switching to Extension 1 (Wiimote 0 in slot 0)

@Aeplexi
Copy link

Aeplexi commented Apr 12, 2025

Updates on this?

@DacoTaco
Copy link
Member

DacoTaco commented Apr 12, 2025

Updates on this?

zari was at a con last weekend and has been recovering this week. we haven't forgotten about this aep :)

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.

4 participants