Hacking libwupc - A WiiU Pro Controller Library for Wii Homebrew Applications

[Truth]

Well-Known Member
Member
Joined
Mar 21, 2006
Messages
1,059
Trophies
1
Location
Mushroom Kingdom
XP
2,388
Country
Germany

N7Kopper

Lest we forget... what Nazi stood for.
Member
Joined
Aug 24, 2014
Messages
977
Trophies
0
Age
30
XP
1,302
Country
United Kingdom
OK, I've been seeing a lot of the same kind of "lel can i use teh pro controller in official wii software and teh system menuz?" and I'm gonna clear things up in layman's terms to the best of my ability.

This bit of code is a standardised homebrew addition to the bluetooth drivers for Wii U Pro Controller compatibility, with both the Wii and Wii U. Devolution uses a different stack, but the principle is the same. These stacks work because they're hardcoded into the application itself. Nintendont and Devolution have the advantage of running Gamecube games on a system with a superior CPU and more than twice the RAM, so that they can run these games in an overlay that intercepts and overrides the game's own function calls - enabling things like Bluetooth and USB controller support, as well as emulated memory cards, the use of Wi-Fi in place of the intended accessory for networking, and all this without so much as a cIOS. Contrast DIOS MIOS and QuadForce, which are themselves cIOS that run in Gamecube mode, so they can't use unintended controllers. (It did have a somewhat unreliable memory card emulation system, however) Wii homebrew in general is built with these standardised stacks, so swapping them out isn't difficult, provided you have the source code.

Wii applications, on the other hand, are designed to use all that the system has. This makes hotpatching significantly more difficult. You have to play by the game's rules. You have to alter it's own Bluetooth stack to support Pro Controllers. There is more than one different stack that the program might use. You have to use a cIOS to make the game play from a USB disc as opposed to a DVD - disabling AHBPROT won't cut it, like with Devolution or Nintendont, as the game is coded to run through the IOS. So, yes. It is possible. It's just very difficult.

The GamePad, however, is right out. An absolute no. Only Nintendo could make the Wii U's native OS overlay on the vWii and trap the controller's inputs and give them to vWii as a Classic Controller. (Unless we homebrewed the Wii U - but who wants to get banned? And even if you stay offline - just use Wii U homebrew at that point rather than tinkering with vWii too much) Why? It doesn't use Bluetooth. It uses Wi-Fi, and a different kind of Wi-Fi than the Wii is compatible with. A kind of Wi-Fi that the Wii U only uses for Nintendo's official GamePad use in vWii.

Granted, Nintendo could also do the same thing for Pro Controllers, and the GCN Adapter. But developing that homebrew would still give a solution for the Wii. So it'd still be useful.

...Whew. I hope I didn't miss any details.
 

Cyan

GBATemp's lurking knight
Former Staff
Joined
Oct 27, 2002
Messages
23,749
Trophies
4
Age
46
Location
Engine room, learning
XP
15,662
Country
France
Could you reupload the file?
Thanks
http://filetrip.net/dl?zNSVpQtA7a

(I named it mod06, I have a mod05 but not sure what it's based on... not always using latest mod to create new ones, so it's a little confused. I'll have to check what's really different and I'll upload them properly to filetrip and wiki page)
 

Qwertystop

Member
Newcomer
Joined
Nov 17, 2012
Messages
7
Trophies
1
XP
155
Country
United States
FYI I tried the Snes9x GX with Wii U Pro Controller support here: http://www.mediafire.com/fix94#cnwd2mo2ovbpi
Final Fantasy III US hangs/crashes at the first battle.
Same issue with Chrono Trigger.... At this point I'm considering an android box for emulation and xbmc.

I can confirm that this also happens with Chrono Trigger in the following situations:
Entering a battle causes a black screen followed by returning to the HBC in the version of the emulator contained in "Emulators/wiiuprocontroller/snes9xgx 4.3.2 r721 libwupc.7z" in the above-linked directory

Battles work smoothly in the version of the emulator contained in "Emulators/snes9xgx 4.3.2 r721.7z" in the above-linked directory.

In both cases, I did nothing to the contents beyond placing them in separate subfolders of the apps folder on my SDHC card and changing the file named "snes9xgx-wii.dol" to "boot.dol", so the former still includes the "libwupc.patch" file and the latter still includes the "source" folder.

This occurs consistently on repeated runs, irrelevant of which battle it is (in case it was something about a specific scripted battle) - one crashes and the other doesn't in the dialog-triggered Gato battle, the scripted battle after the first Gate, and the ordinary ones in Guardia Forest.

Gameplay before that point appears to work normally - the antipiracy measure in the first Gate, for example, does not trigger.

Just giving all the data I know how to get, as I don't know what would matter.

EDIT: I've done one more test: Using the Pro Controller-compatible version, but not using a Pro Controller. In that case, it crashes as before.
 
Last edited by Qwertystop,

Cyan

GBATemp's lurking knight
Former Staff
Joined
Oct 27, 2002
Messages
23,749
Trophies
4
Age
46
Location
Engine room, learning
XP
15,662
Country
France
if you don't have portlibs folder, you can create it into your DevkitPro folder.
c:\DevkitPro\portlibs\ppc\bin\
c:\DevkitPro\portlibs\ppc\lib\

Inside this folders there are usual libraries used by Wii homebrew which were initially released for another plateform (zip library, png library, etc.) ported to the Wii.


Just to be sure that you understand, you can add WiiU controller pro support inside homebrew, but not inside games.
a lot of users think this magically allow the use of the controller inside games, but it's a homebrew library.

JoostinOnline and me made some changes to the library.
Joostin made the file "install" to libogc instead of portlib (it's not a ported library from an existing function, it's a library for Wii from the start so it goes to libogc)
I added L3 R3 and battery checking.

You can checkout svn here to get latest version:
http://usbloader-gui.googlecode.com/svn/branches/libs/libwupc/
the patches are included in case you want to apply them on the original version yourself.

once you have the files on your computer, open a command prompt to that folder and type : make install
it will build and copy the files to libogc folder.
then follow the readme.txt from step2 to add it to your homebrew project.
 
  • Like
Reactions: jammybudga777

KingBlank

King of Nothing
Member
Joined
Sep 17, 2008
Messages
702
Trophies
1
Age
28
Location
New Zealand
XP
1,726
Country
New Zealand
Hello, I've got a third party Pro controller that I would like to use on my PC, this particular controller does not show up on my PC however even with the Toshiba Bluetooth stack.

Are there any homebrew applications with Pro controller support for sending input to PC via wireless?
 

endoverend

AKA zooksman
Member
Joined
Jun 6, 2013
Messages
2,846
Trophies
0
Website
zooksman.com
XP
2,917
Country
United States
Hello, I've got a third party Pro controller that I would like to use on my PC, this particular controller does not show up on my PC however even with the Toshiba Bluetooth stack.

Are there any homebrew applications with Pro controller support for sending input to PC via wireless?
No, because the input lag would be fairly extreme.
 

endoverend

AKA zooksman
Member
Joined
Jun 6, 2013
Messages
2,846
Trophies
0
Website
zooksman.com
XP
2,917
Country
United States
Ah that's a shame, Is the Wii wireless really that slow?

I imagine you could get better results by having the wii itself spoof a Bluetooth controller... I can imagine that being extremely complicated also...
Regardless of how slow the Wireless is, any setup like that will cause lag one way or another. Too many forms of wireless connection will always be laggy.

And yeah, either of those setups would be extremely complicated to setup. I doubt the Wii could even send and transmit a bluetooth signal at the same time.
 
  • Like
Reactions: KingBlank

Cyan

GBATemp's lurking knight
Former Staff
Joined
Oct 27, 2002
Messages
23,749
Trophies
4
Age
46
Location
Engine room, learning
XP
15,662
Country
France
it's not related to libwupc, but there's a Wii homebrew to use Gamecube controller and DS homebrew to send buttons over wifi (or ethernet) to act as a PC controller.
It doesn't lag at all.

I used it a lot on my old PC (winXP), unfortunately the driver is not signed and Win7x64 require signed drivers :(
but it's not slow, doesn't lag, and worked great.
you can find the homebrew in the wii homebrew section > Padsend.

The author never came back and never provided the sources. but it would be possible to do the same with any controller used on Wii or WiiU.
His thread has information to send data to the server. I wish ppjoy would be signed...
 
  • Like
Reactions: jammybudga777

jammybudga777

Well-Known Member
Member
Joined
Aug 23, 2013
Messages
2,284
Trophies
1
Age
37
XP
2,193
Country
it's not related to libwupc, but there's a Wii homebrew to use Gamecube controller and DS homebrew to send buttons over wifi (or ethernet) to act as a PC controller.
It doesn't lag at all.

I used it a lot on my old PC (winXP), unfortunately the driver is not signed and Win7x64 require signed drivers :(
but it's not slow, doesn't lag, and worked great.
you can find the homebrew in the wii homebrew section > Padsend.

The author never came back and never provided the sources. but it would be possible to do the same with any controller used on Wii or WiiU.
His thread has information to send data to the server. I wish ppjoy would be signed...
So in the long run we could use the wii u gamepad buttons doing this? :) :)
 

Cyan

GBATemp's lurking knight
Former Staff
Joined
Oct 27, 2002
Messages
23,749
Trophies
4
Age
46
Location
Engine room, learning
XP
15,662
Country
France
I've read that reverting to normal mode uninstalled the driver and you required to reinstall ppjoy again in test mode next time you want to use it. You need to be in test mode to use it, not only for install.
Or keep test mode enabled and never set it back. Like, never again.
I see there's a way to hide the overlay text for testmode, so I'll probably do it.

So in the long run we could use the wii u gamepad buttons doing this?
We could, but a new homebrew need to be written.
It will have to emulate gamecube controller (as the current server is compatible only with GC and DS). Or contact the author and ask for sources.
 
  • Like
Reactions: jammybudga777

realg123

Well-Known Member
Member
Joined
Aug 9, 2010
Messages
239
Trophies
1
XP
467
Country
Canada
Sorry to bother you guys. But I'm a little confused on how to use this. Let's say I wanted to use the Pro Controller on the SNES emulator. Is it as simple as running the modified SNES emulator that supports the Pro Controller?
 

Site & Scene News

Popular threads in this forum

General chit-chat
Help Users
  • realtimesave @ realtimesave:
    @SylverReZ that guy seriously spent over 2 grand on that hot wheels pc?
    +1
  • RedColoredStars @ RedColoredStars:
    LTT is a noob
  • RedColoredStars @ RedColoredStars:
    Guy doesnt know wtf hes talking about half the time
  • realtimesave @ realtimesave:
    @SylverReZ that reminds me that my friend sells CRTs he gets cheap or free for hundreds of dollars. people are dumb
    +1
  • RedColoredStars @ RedColoredStars:
    And is incredibly annoying.
  • realtimesave @ realtimesave:
    man I just washed my shoes and they look exactly the same as before I washed them :|
  • realtimesave @ realtimesave:
    luckily they didn't fall apart
  • RedColoredStars @ RedColoredStars:
    Some CRTs are very much worth the price
  • RedColoredStars @ RedColoredStars:
    i used to go out to the recycling center every couple weeks and look at the crts and other electronics people would drop off. Usually screens were broken or severely scratched from being tossed around. Did find a good one here and there, but never anything like a 1080i widescreen crt.
  • RedColoredStars @ RedColoredStars:
    Or a good contition 40" Sony Trini that weighs 300 lbs. lol
  • RedColoredStars @ RedColoredStars:
    Literally 300 lbs. lolol
  • BigOnYa @ BigOnYa:
    I have a few of those boat anchors in my basement I tried giving away but no one wanted them, So anyone close to Columbus, Ohio area that wants them, (26", 2x 19") please come get, for free.
  • RedColoredStars @ RedColoredStars:
    Dont know anyone wants those smaller ones. Most are after larger sizes and the kinda top of the line models
  • RedColoredStars @ RedColoredStars:
    Motion handling and input lag on those things destroy plasmas, led, oled
  • realtimesave @ realtimesave:
    I had some really nice CRTs I should've kept
  • realtimesave @ realtimesave:
    now I have all lcd
  • realtimesave @ realtimesave:
    one in particular I regret getting rid of oh well :|
  • realtimesave @ realtimesave:
    the Sonys and stuff I don't care about
  • realtimesave @ realtimesave:
    and used LCD are hard to sell I can imagine.. not worth much
  • realtimesave @ realtimesave:
    @SylverReZ where do u lurk
  • a_username_that_isnt_cool @ a_username_that_isnt_cool:
    Is it piracy if it was released for free? Not in my opinion, but I also think it's not piracy if buying it isn't owning it, and it's not piracy if you can't buy it from the original creators anymore.
  • K3Nv2 @ K3Nv2:
    Free release can have loopholes where they still make money through ads
    Xdqwerty @ Xdqwerty: :sad: