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

filipe_m

Well-Known Member
Newcomer
Joined
Jul 20, 2014
Messages
77
Trophies
0
Age
46
XP
1,032
Country
Portugal
NO GAME at all.
The library is added to the homebrew, NOT to the game.

same for PS3 controller library, it's only added to the homebrew. You can't patch the games to allow controllers not intended for the game at development time.


it's useful if you want to launch another homebrew with the same controller support (for example Nintendont).
You use the ClassicPro controller in USBLoaderGX to launch nintendont, and when in Nintendont you continue using the same controller.
It's the only benefit from using a controller that games can't use.



Now I understand

Thanks for the help and the explanation !!
 

xoleras20099

Well-Known Member
Newcomer
Joined
Sep 19, 2014
Messages
53
Trophies
0
Age
32
XP
131
Country
United States
What an amazing breath of fresh air this thread has already injected into many quality apps for the Wii and vWii modding scenes, and I can only imagine more are on the way.

For someone who knows what they are doing, here are the latest sources for:

Genplusgx: http://code.google.com/p/genplus-gx/source/browse/
WiiSX: http://code.google.com/p/pcsxgc/downloads/detail?name=wiiSX-beta2.1-src.zip&can=2&q=

For Not64 I can not find its source code for the life of me. I'm sure the source for Wii64 is out there, but Not64 had considerably better compatibility.
I'd love to see these too! Last ones I need and my Wii U is set!

Made an account just to thank you for your work BTW Fix! Thanks!
 

airline38

Well-Known Member
Member
Joined
Mar 28, 2010
Messages
741
Trophies
1
XP
807
Country
Taiwan
I'm getting this error and I don't know why:
Code:
c:/devkitpro/devkitppc/bin/../lib/gcc/powerpc-eabi/4.8.2/../../../../powerpc-eabi/bin/ld.exe: cannot find -lwupc
I have libwupc saved in
Code:
C:\devkitPro\portlibs\lib\libwupc.a
This is my makefile.

You have to add something like
PORTLIBS= C:\devkitPro\portlibs\

or just simply add libwupc.a to the same folder as other libxxx.a (\devkitPro\libogc\lib\wii)
and add wupc.h to \devkitPro\libogc\include\wupc
 

JoostinOnline

Certified Crash Test Dummy
Member
Joined
Apr 2, 2011
Messages
11,005
Trophies
1
Location
The Twilight Zone
Website
www.hacksden.com
XP
4,339
Country
United States
You have to add something like
PORTLIBS= C:\devkitPro\portlibs\

or just simply add libwupc.a to the same folder as other libxxx.a (\devkitPro\libogc\lib\wii)
and add wupc.h to \devkitPro\libogc\include\wupc
If I hadn't done that, nothing else that uses the portlibs directory would work.

I also tried using the libogc folder.

Edit: Well I messed around with it and now it's working. I did a restart, moved -lwupc to AFTER -lwiiuse, and left the library in the libogc directory. If I mess with either of the latter two it doesn't work.
 

Hakaisha

Well-Known Member
Member
Joined
Sep 17, 2014
Messages
236
Trophies
0
XP
1,456
Country
United States
I cant see any source in there, maybe I fail to see a correct link?



If you check out my usage.txt you might notice the battery level only goes from 0 to 4, its nowhere near the accuracy of a wiimote.



I've already added it to wiiflow, just grab yourself the latest beta version.
https://code.google.com/p/open-wiiflow-mod/



Thank you so much for this. It works perfectly!

I've noticed something odd, however, when I load the newly modified versions of FCEUGX and SNES9XGX from this WiiFlow.

I boot to WiiFlow through Priiloader, powering on the Wii with the Wii U Pro controller. I can navigate WiiFlow just fine with the controller. If I load a game for FCEUGX or SNES9XGX through a WiiFlow plugin, the game refuses to acknowledge the Wii U Pro controller. =/

The apps by themselves work great with the Wii U Pro controller if I load them in the HBC, however.

Perhaps it has something to do with the plugins? Does anyone else run into this problem?
 

GorTesK

Mad Hatter
Member
Joined
Jan 29, 2013
Messages
1,099
Trophies
0
Age
35
Location
Down The Rabbit Hole
XP
611
Country
Gambia, The
With this, is it possible to play Classic Controller games like Xenoblade Chronicles etc. with the Wii U Pro Controller?

no, you can use the controller with wiiflow, but not with the games loaded by it... or rather, you could with some extra work, I will quote FIX94 on this:

So, you guys want to know why wii games cant be controlled that easly with a wiiu pro controller?
Every game on itself has a bluetooth library built in, so in order to support the pro controller you would need to add code to every game you have. Now that is of course possible with alot of reverse engineering and creating general patch patterns, the bluetooth library is from the sdk which only few versions are there. If you got those patches you could add code into 0x80001800 which gives you a few kb of free memory which is used right now for cheats, so basically you could give up cheats and instead use patches for the pro controller. Now if anyone wants to go through that, I dont know.
 

ShadowOne333

QVID PRO QVO
Editorial Team
Joined
Jan 17, 2013
Messages
12,200
Trophies
2
XP
33,916
Country
Mexico
Is there a way to remap buttons? I'd like to map B to A, Y to B, etc for the purpose of nintendont button layout matching the GC controller a bit better.

Press select (Minus) when using the Wii U Pro controller to switch the button layout.
Otherwise, try my MOD, it has the buttons switched by default.
 
  • Like
Reactions: AdventureLad

daxtsu

Well-Known Member
Member
Joined
Jun 9, 2007
Messages
5,627
Trophies
2
XP
5,194
Country
Antarctica
Awesome, awesome stuff!

Would there be a way to get the Pro Controller to work in the Homebrew Channel menu?

Unfortunately, not at this point in time, because the Homebrew Channel is closed source (meaning we can't realistically edit it, to put it simply). There are alternatives out there though. If Priiloader ever becomes a realistic option for the Wii U (currently it's not AFAIK), one could merely have it autoboot to a USB loader or a homebrew loader like postLoader, which by that time should/would support the WUPC.
 

daxtsu

Well-Known Member
Member
Joined
Jun 9, 2007
Messages
5,627
Trophies
2
XP
5,194
Country
Antarctica
It works fine for me if I have it in either place, though I ended up settling on putting it in $(DevKitPro)/libogc/lib and (same path, sans lib)/include. I don't have any particularly specific setup of devKitPro though (i.e. I'm not using multiple versions of libogc or anything fancy like that). That's just my personal experience, though.
 

JoostinOnline

Certified Crash Test Dummy
Member
Joined
Apr 2, 2011
Messages
11,005
Trophies
1
Location
The Twilight Zone
Website
www.hacksden.com
XP
4,339
Country
United States
FIX94 If you apply this patch it will let you install it via CLI and fixed the library order in usage.txt. The line endings are also compatible with Windows now.
http://www.mediafire.com/download/dgj9399denc2nsd/libwupc-read-only.patch

Edit: Unless yourelease a new version, I'll have to include a modified one with PowerCheck to show accurate battery values. What was the reason behind only giving 4 instead of a percent like Wiiuse?
 

daxtsu

Well-Known Member
Member
Joined
Jun 9, 2007
Messages
5,627
Trophies
2
XP
5,194
Country
Antarctica
I'll see what I can do about adding libwupc to WiiSX and maybe Not64 (if I can convince Extrems to release the source to it..I kind of doubt it though). I had to do a lot of digging to find a decent base to modify for WiiSX. Ended up grabbing the "mod05" source. I think this is the latest source, not the one from GoogleCode.

Edit: Phase 1 is complete for WiiSX. I can navigate its menus now. Now I need to figure out why it won't respond in games.
Edit 2: WUPC shows up to WiiSX as a Classic Controller on the status screen's icons (intentional) now.
Edit 3: Just need to get analog sticks working and we're good to go.
Edit 4: The analog sticks work beautifully, at least with my controller. Rumble works too in Metal Gear Solid. Seems like WiiSX is complete (except for edit 5). I'll investigate Not64 soon.
Edit 5: The only thing I'm lacking is a nice looking Wii U Pro Controller icon. Oh well, the Classic Controller icon built into WiiSX is nice enough I suppose.
 

ShadowOne333

QVID PRO QVO
Editorial Team
Joined
Jan 17, 2013
Messages
12,200
Trophies
2
XP
33,916
Country
Mexico
I'll see what I can do about adding libwupc to WiiSX and maybe Not64 (if I can convince Extrems to release the source to it..I kind of doubt it though). I had to do a lot of digging to find a decent base to modify for WiiSX. Ended up grabbing the "mod05" source. I think this is the latest source, not the one from GoogleCode.

Edit: Phase 1 is complete for WiiSX. I can navigate its menus now. Now I need to figure out why it won't respond in games.
Edit 2: WUPC shows up to WiiSX as a Classic Controller on the status screen's icons (intentional) now.
Edit 3: Just need to get analog sticks working and we're good to go.
Edit 4: The only thing I'm lacking is a nice looking Wii U Pro Controller icon. Oh well, the Classic Controller icon built into WiiSX is nice enough I suppose.
Woa did you manage to compile WiiSX with Wii U Pro working on it?!
Any luck about Not64?
 

daxtsu

Well-Known Member
Member
Joined
Jun 9, 2007
Messages
5,627
Trophies
2
XP
5,194
Country
Antarctica
I'm working on the analog stick code still (Snake won't run in the directions I command him to in MGS, so it still needs work; my geometry is a bit rusty right now), but yeah, all of the rest of the buttons work.

It'll probably be several days before I hear back from Extrems. It is a weekday now, after all.
 

ShadowOne333

QVID PRO QVO
Editorial Team
Joined
Jan 17, 2013
Messages
12,200
Trophies
2
XP
33,916
Country
Mexico
I'm working on the analog stick code still (Snake won't run in the directions I command him to in MGS, so it still needs work; my geometry is a bit rusty right now), but yeah, all of the rest of the buttons work.

It'll probably be several days before I hear back from Extrems. It is a weekday now, after all.
It might take longer than that, I mentioned him a few posts back yet there is still no response from him.
Also, good luck with the Analogs!
 

daxtsu

Well-Known Member
Member
Joined
Jun 9, 2007
Messages
5,627
Trophies
2
XP
5,194
Country
Antarctica
Actually, he just got back to me. I didn't know he included the source code in his Not64 releases in the form of patch files. That bodes well.
 
  • Like
Reactions: darkvam

Site & Scene News

Popular threads in this forum

General chit-chat
Help Users
    Xdqwerty @ Xdqwerty: @CameronCataclysm...