Hacking Wii U Gamecube Adapter Reverse Engineering Cont.

koalaboy13

Member
OP
Newcomer
Joined
Jun 23, 2014
Messages
6
Trophies
0
XP
71
Country
United States
First a little history (skip this if you know about the Linux driver)...
So back in 2014, when the adapter first came out, ToadKing managed to sniff the communication between SSB4 and the adapter using a dev board (likely BeagleBone?). From this he (or she) deduced that by sending the byte 0x13 to USB endpoint 0x81, the adapter began spewing back packets containing the data from the controller. AFAICT, ToadKing assumed (claimed?) that the 0x13 was a 'secret knock' so to speak. By the same sniffing method, 0x11 was discovered to be the rumble command. From this, he (she) made Linux drivers that got ported to Windows and OS X.

But... We're not done yet. Poking around at the adapter, it appears that 0x13 is not a 'secret' but rather one of several commands, 0x11 for rumble being another. By basically fuzzing the adapter, I've started to work out some of the other commands. The goal of this thread is to document what we know, and allow others to contribute new findings.

So, without further ado, what I found:

VID = 0x057E PID = 0x0337
The adapter exposes two USB endpoints, one in, one out, which we already knew. Commands are written to the in endpoint (0x81) and responses, if any are read from 0x02.

Commands:

0x11 - Rumble​
Send: 5 bytes [0x11, R1, R2, R3, R4]​
Receive: none​
To turn on rumble, set the corresponding R to 0x01, or to 0x00 to turn off​
0x12 - Rest positions​
Send: 1 byte [0x12]​
Receive: 25 bytes, 1 cmd (0x22) followed by 4 sets of [JoyX, JoyY, CstickX, CstickY, Ltrigger, Rtrigger]​
Gets resting or base positions for the analog parts of the controller (joysticks, analog triggers)​
If polling has not been started will return all zeros except for byte 0, status?​
0x13 - Begin Polling​
Send: 1 byte [0x13]​
Receive: 37 bytes, 1 cmd byte (0x21) plus 4 sets of 9 bytes:​
[status, BtnStateH, BtnStateL, JoyX, JoyY, CX, CY, LTrigger, RTrigger]​
The 'knock', will make the adapter begin sending updates to endpoint 0x02 every time it is read.​
Required before rumble and rest positions will work?​
0x14 - Suspend Polling​
Send: 1 byte [0x14]​
Receive: 2 bytes [0x24, WasPolling] 1 cmd byte (0x24) plus 0x01 if we were just polling, 0x00 if not​
Stops the updates that 0x13 sends, useful if you just need a break, or are no longer interested in data​
0x15 - Kill?​
Send: 1 byte [0x15]​
Receive: ERROR​
After sending 0x15 and trying to use the device, libUSB gives an IO error, leading me to believe that 0x15​
turns off the adapter and requires it to be unplugged and reconnected to begin working again​
0x16 - ???​
Send: ??? [0x16, ...]​
Receive: ???​
Definitely a valid command, but no idea what it does​
0x17 - ???​
Send: ??? [0x17, ...]​
Receive: ???​
Definitely a valid command, but no idea what it does​
0x16 and 0x17 stall the polling data, just like an incomplete 0x11 packet, while 0x10, 0x18, 0x19, etc appear ignored. This makes me think 0x16 and 0x17 are other commands that require multi-byte packets. Fingers crossed for JOYBUS...​
Some more about the status bytes and button masks is known and implemented in the drivers and in Dolphin. I will update this after I read through those and figure out the status bytes for 0x12 and 0x14. Many of the things I initially labeled 'status' appear to actually be the command bytes for the packets the adapter sends back.​
Right now I just wanted to get the new info out there and seek any more info people have. I ran through all bytes from 0x00 to 0xFF and these were the only ones that I saw responses to, but there could still be others that don't return or require multi-byte packets. Originally I had hoped that there might be a general purpose JOYBUS mode lurking in there, but the chance of that seems slim (unless it's 0x16 and 0x17). The adapter gives no indication that a GBA link cable was inserted while polling via 0x13 either. In other words, controllers yes, GBA link no. Chime in with any more info you may have and I'll add it above.​
 

Mr. Mysterio

Super Genius
Member
Joined
Sep 16, 2014
Messages
661
Trophies
0
Age
24
Location
Rosalina's Comet Observatory
XP
1,124
Country
United States
First a little history (skip this if you know about the Linux driver)...
So back in 2014, when the adapter first came out, ToadKing managed to sniff the communication between SSB4 and the adapter using a dev board (likely BeagleBone?). From this he (or she) deduced that by sending the byte 0x13 to USB endpoint 0x81, the adapter began spewing back packets containing the data from the controller. AFAICT, ToadKing assumed (claimed?) that the 0x13 was a 'secret knock' so to speak. By the same sniffing method, 0x11 was discovered to be the rumble command. From this, he (she) made Linux drivers that got ported to Windows and OS X.

But... We're not done yet. Poking around at the adapter, it appears that 0x13 is not a 'secret' but rather one of several commands, 0x11 for rumble being another. By basically fuzzing the adapter, I've started to work out some of the other commands. The goal of this thread is to document what we know, and allow others to contribute new findings.

So, without further ado, what I found:

VID = 0x057E PID = 0x0337
The adapter exposes two USB endpoints, one in, one out, which we already knew. Commands are written to the in endpoint (0x81) and responses, if any are read from 0x02.

Commands:

0x11 - Rumble​
Send: 5 bytes [0x11, R1, R2, R3, R4]​
Receive: none​
To turn on rumble, set the corresponding R to 0x01, or to 0x00 to turn off​
0x12 - Rest positions​
Send: 1 byte [0x12]​
Receive: 25 bytes, 1 status? followed by 4 sets of [JoyX, JoyY, CstickX, CstickY, Ltrigger, Rtrigger]​
Gets resting or base positions for the analog parts of the controller (joysticks, analog triggers)​
If polling has not been started will return all zeros except for byte 0, status?​
0x13 - Begin Polling​
Send: 1 byte [0x13]​
Receive: 37 bytes, 1 global status byte plus 4 sets of 9 bytes:​
[status, BtnStateH, BtnStateL, JoyX, JoyY, CX, CY, LTrigger, RTrigger]​
The 'knock', will make the adapter begin sending updates to endpoint 0x02 every time it is read.​
Required before rumble and rest positions will work?​
0x14 - Suspend Polling​
Send: 1 byte [0x14]​
Receive: 2 bytes [???, ???] first one could be status, and the second may be if polling was on​
Stops the updates that 0x13 sends, useful if you just need a break, or are no longer interested in data​
0x15 - Kill?​
Send: 1 byte [0x15]​
Receive: ERROR​
After sending 0x15 and trying to use the device, libUSB gives an IO error, leading me to believe that 0x15​
turns off the adapter and requires it to be unplugged and reconnected to begin working again​
Some more about the status bytes and button masks is known and implemented in the drivers and in Dolphin. I will update this after I read through those and figure out the status bytes for 0x12 and 0x14.​
Right now I just wanted to get the new info out there and seek any more info people have. I ran through all bytes from 0x00 to 0xFF and these were the only ones that I saw responses to, but there could still be others that don't return or require multi-byte packets. Originally I had hoped that there might be a general purpose JOYBUS mode lurking in there, but the chance of that seems slim. In other words, controllers yes, GBA link no. Chime in with any more info you may have and I'll add it above.​

I wonder if support for this adapter could be added to Dolphin? That would be awesome!
 
  • Like
Reactions: Margen67

Xuman

Well-Known Member
Member
Joined
Jan 26, 2012
Messages
407
Trophies
0
XP
980
Country
United States
This will never work and there is nothing anyone can do about it.
Is it bad that hearing that made me shed a small tear? Lol ah well. Unless Nintendo makes it possible (Doubt. Max Doubt. Unless, Iunno, they release GBA on 3DS and GC on Wii U and then say that you can wireless GBA link somehow. But again, one can only hope. Doubt settings on Max output)
 
  • Like
Reactions: TotalInsanity4

koalaboy13

Member
OP
Newcomer
Joined
Jun 23, 2014
Messages
6
Trophies
0
XP
71
Country
United States
Added info about two new commands I found. 0x16 and 0x17 look like multi-byte commands b/c they stall IO, like 0x11 and unlike most other 'junk' bytes. Still have no clue what they do. Anyone else got ANY good info on these?
 

Site & Scene News

Popular threads in this forum

General chit-chat
Help Users
    BakerMan @ BakerMan: well then show them how to scratch it (this is a verbalase joke)