Hacking Gamecube to Classic Controller Converter 2 questions

qwertymodo

Well-Known Member
Member
Joined
Feb 1, 2010
Messages
827
Trophies
0
Age
34
Website
qwertymodo.com
XP
520
Country
United States
Found some good documentation on the protocol here. Relevant to the re-init process: "With no controller attached, the gamecube probes for a controller by sending the sequence 000000001 about every 12ms." Looks like we want something along the lines of what I have above, except instead of if(!timeouted()), else..., make it while(timeouted()) {init() then wait 12ms}
 

qwertymodo

Well-Known Member
Member
Joined
Feb 1, 2010
Messages
827
Trophies
0
Age
34
Website
qwertymodo.com
XP
520
Country
United States
This is a little better (again, this is without my previous changes to GCPad.cpp, ignore those completely)

Code:
    for(;;) {
        if(GCPad_disconnected())
        {
            WMExtension::set_default_button_data();
           
            while(!GCPad_init(true, true))
            {
                delayMicroseconds(10000);
            }
        }
       
        button_data = GCPad_data();

. . .etc

WMExtension::set_default_button_data() is a function I added to WMExtension.cpp, it's just the default call to WMExtension::set_button_data() pulled from WMExtension::init() (the really long line of code near the bottom of the function) thrown into its own function. However, it doesn't quite seem to work. The way it *should* work is that upon disconnect, all buttons should be released and sticks centered, then it should sit in a wait loop until the controller is reconnected, but that's not the case, and I don't understand why...
 

bootsector

Well-Known Member
Member
Joined
Oct 2, 2008
Messages
198
Trophies
0
XP
275
Country
Brazil

Maxternal

Peanut Gallery Spokesman
Member
Joined
Nov 15, 2011
Messages
5,210
Trophies
0
Age
40
Location
Deep in GBAtemp addiction
Website
gbadev.googlecode.com
XP
1,709
Country
Your latest code snipped gets closer to what I've tried already, with no success either! :(

Anyways, did you see this?

https://gist.github.com/anonymous/4370758

Are you able to change the last ID bytes to 0x0120 and see if it's recognized like a WiiU Pro Controller? If it doesn't work it's probably because of a different BT pincode of the WiiI Pro Controller:

http://wiiubrew.org/wiki/Wii_U_Pro_Controller
^ I'm not sure if the Wii U Pro controller has much to do with this since it connects directly by BT while this connects to the Wiimote by cable (unless I'm mistaken)

Anyway, this was just recently released
http://gbatemp.net/threads/wii-u-pro-controller-to-pc-program-release.343159/
and the download contains a good amount of documentation, far more than you can find on WiiUBrew at the moment, anyway.
(not sure if it's more or less info than the first link you mentioned there, though)
 

bootsector

Well-Known Member
Member
Joined
Oct 2, 2008
Messages
198
Trophies
0
XP
275
Country
Brazil
^ I'm not sure if the Wii U Pro controller has much to do with this since it connects directly by BT while this connects to the Wiimote by cable (unless I'm mistaken)

Anyway, this was just recently released
http://gbatemp.net/threads/wii-u-pro-controller-to-pc-program-release.343159/
and the download contains a good amount of documentation, far more than you can find on WiiUBrew at the moment, anyway.
(not sure if it's more or less info than the first link you mentioned there, though)
My question to qwertymodo was completely unrelated to the issues we were talking about. I was just curious to see how that would behave on the WiiU, since I don't have the console here for testing.
 
  • Like
Reactions: Maxternal

qwertymodo

Well-Known Member
Member
Joined
Feb 1, 2010
Messages
827
Trophies
0
Age
34
Website
qwertymodo.com
XP
520
Country
United States
F-Zero is currently 30 cents in the eShop and is compatible with the Pro Controller

(1:37:03 AM) tueidj: qwertymod: wiiu pro controller isn't just a different extension, it doesn't work with official wii software at all
(1:37:46 AM) tueidj: that guy on gbafail saying it only works "on the wiimote setting" must have one of the knock-off wii/wiiu combination pads
(1:39:02 AM) tueidj: and since it can't be synched with official software and homebrew doesn't support manual synching...
(2:28:43 AM) qwertymod: tueidj, I don't have a pro controller, so I had no idea. I'm guessing this probably won't work then either: http://gbatemp.net/threads/gamecube...erter-2-questions.339085/page-14#post-4558896

(2:38:36 AM) tueidj: it will just be recognized as a regular wiimote without any extension
 

bezem

Well-Known Member
Member
Joined
Dec 15, 2012
Messages
211
Trophies
0
Age
41
XP
344
Country
United States
If I'm reading that correctly, it sounds like backporting the Wii U Controller to the Wii isn't likely to happen, so that's a bummer. This doesn't have much affect on the overall project though, right? It just would have been nice to explore this route for a GC to Wii U Pro Controller type adapter.
 

qwertymodo

Well-Known Member
Member
Joined
Feb 1, 2010
Messages
827
Trophies
0
Age
34
Website
qwertymodo.com
XP
520
Country
United States
Well, if they manage to RE the syncing process sufficiently, they could add support within the Wii homebrew libs, it's just a matter of whether or not the right people have the motivation and access to the hardware to do it...
 
  • Like
Reactions: bezem

evanescent_hero

Member
Newcomer
Joined
Mar 26, 2013
Messages
8
Trophies
0
Age
30
XP
52
Country
United States
Hey, I've been lurking and reading this thread for a long time, and I was just wondering if the adapters are ready? I'd really love to purchase one.
 

Enigma Hall

Well-Known Member
Member
Joined
Feb 6, 2013
Messages
723
Trophies
1
Age
44
XP
563
Country
Brazil
Maybe it can sound idiot because i dont know anything about hacking or programation. But and about the new libxisaxis? can be use with devolution to play Gc Backups?
 

Maxternal

Peanut Gallery Spokesman
Member
Joined
Nov 15, 2011
Messages
5,210
Trophies
0
Age
40
Location
Deep in GBAtemp addiction
Website
gbadev.googlecode.com
XP
1,709
Country
Maybe it can sound idiot because i dont know anything about hacking or programation. But and about the new libxisaxis? can be use with devolution to play Gc Backups?
Theoretically, yes.
tueidj, who wrote Devolution, would have to add it in himself, though, and that's up to him.

EDIT : although he had mentioned a couple weeks ago on his youtube channel that he alread had PS3 controllers working with it so the answer's probably "yes" (although probably did it on his own without using libsicksaxis.)
 

qwertymodo

Well-Known Member
Member
Joined
Feb 1, 2010
Messages
827
Trophies
0
Age
34
Website
qwertymodo.com
XP
520
Country
United States
Sorry I kind of fell off the face of the earth here. Life has a way of getting crazy all at once, I really haven't had a chance to work out that GC disconnect bug. That's still the only hold up. The hardware is ready to ship.
 

qwertymodo

Well-Known Member
Member
Joined
Feb 1, 2010
Messages
827
Trophies
0
Age
34
Website
qwertymodo.com
XP
520
Country
United States
I'm thinking that I may completely throw the current GC code out entirely in favor of the code used in these USB adapters but the hardware there is designed for a 12MHz clock, and some of the code is written in assembly, so it may take some tweaking to work with the 8MHz clock that we have to work with... otherwise, the code looks a lot more robust (though I'll have to actually build one to see how it handles the disconnect/reconnect use case that's giving us trouble with the wra).
 

winmaster

Weird Kid Who Still Plays Pokemon
Newcomer
Joined
Jul 7, 2011
Messages
44
Trophies
0
Location
Here
Website
nintenpc.tripod.com
XP
69
Country
United States
I'm thinking that I may completely throw the current GC code out entirely in favor of the code used in these USB adapters but the hardware there is designed for a 12MHz clock, and some of the code is written in assembly, so it may take some tweaking to work with the 8MHz clock that we have to work with... otherwise, the code looks a lot more robust (though I'll have to actually build one to see how it handles the disconnect/reconnect use case that's giving us trouble with the wra).

It looks like they have ready to go Wiimote adapters too: http://www.raphnet.net/electronique/extenmote/index_en.php
 

qwertymodo

Well-Known Member
Member
Joined
Feb 1, 2010
Messages
827
Trophies
0
Age
34
Website
qwertymodo.com
XP
520
Country
United States
Yeah, I know he sells adapters, but I like the wra hardware better. He uses external crystals for everything (specifically 12MHz, because of all of his USB projects), which isn't really a huge deal or anything, but I like working with minimalistic designs whenever possible (the wra only uses 1 resistor and 1 capacitor).
 

Hyperstar96

Well-Known Member
Member
Joined
Nov 1, 2009
Messages
158
Trophies
0
XP
251
Country
United States
Just out of curiosity, will your adapters support analog L and R or just digital? Would analog even be possible if you're mapping everything to a Classic Controller?
 

Maxternal

Peanut Gallery Spokesman
Member
Joined
Nov 15, 2011
Messages
5,210
Trophies
0
Age
40
Location
Deep in GBAtemp addiction
Website
gbadev.googlecode.com
XP
1,709
Country
Well, I understand the first classic controller sends both an analog and digital signal when poshing the sholder buttons while the classic controller pro only sends the digital signal. Obviously the analog signal is all on or all off bit I understand there IS an analog signal to send ... I can only assume that signal would be passed through.
 

Site & Scene News

Popular threads in this forum

General chit-chat
Help Users
    NinStar @ NinStar: what's up woke boy