FIX94 / Nintendont

A Wii Homebrew Project to play GC Games on Wii and vWii on Wii U
1.9k stars 323 forks source link

Request: Add support for Hyperkin ProCube pro controller #199

Open skmpowdjy opened 8 years ago

skmpowdjy commented 8 years ago

Link to product: http://hyperkinlab.com/procube/

On the Wii U menu, the controller is recognized as a standard pro controller, but it is not picked up by Nintendont. Let me know if there's some data I can gather with the controller to help.

FIX94 commented 8 years ago

so it is neither regonized by the loader nor ingame? Both use different code.

skmpowdjy commented 8 years ago

Just double checked, and no it's not recognized in game or in the loader.

GerbilSoft commented 8 years ago

Can you get the Bluetooth device name/ID when it's connected to a computer? Official Wii U Pro controllers show up as "Nintendo RVL-CNT-01-UC"; the "-UC" is how both libwupc (loader) and the kernel's BT.c identify a Pro controller.

skmpowdjy commented 8 years ago

Unfortunately there doesn't seem to be a device name that it spits out. I'm in an apartment complex so there's a lot of Bluetooth devices floating around, but I'm not sure it even shows up in the list of devices at all. Let me know if there's something else I can try. It does connect to the Mayflash Wireless USB adapter.

GerbilSoft commented 8 years ago

Make sure you press the Sync button on the controller before searching for BT devices. Otherwise, it won't show up as "discoverable".

skmpowdjy commented 8 years ago

I was, but I can try again after work. I'm using "hcitool info" to try and get data, but for all the unnamed Bluetooth addresses I tried, I kept getting an I/O error. The real pro controller showed up immediately and running hcitool on it worked just fine.

GerbilSoft commented 8 years ago

Try using "hcitool scan" instead to scan for devices. Before doing this, press the Sync button on the controller to put it into discoverable mode.

skmpowdjy commented 8 years ago

So, I tried for a while and it's not showing up at all on the list of Bluetooth devices. I can see my phone and the Wii U Pro Controller just fine. I am pressing "sync" before scanning.

carnage702 commented 8 years ago

it probably works like those fake wiimotes that dont work on most of the homebrew stuff, they send a signal so tiny and so fast that if it isnt picked on the like 1 second it sends they disconect, thats why most 3rd partys/fake controllers dont work on homebrew apps they dont send signal enough time to be picked up by nintendont or by most other apps, they basicaly make them just barely enough to be picked by the wii/wiiu games codding and anything else gets shafted due to extremely fast signal that most homebrew apps cant return back in time.

skmpowdjy commented 8 years ago

I'd believe that. It connects to the Wii U no problem, but connecting to the Mayflash adapter is a little finicky and, again, it doesn't show up on regular Bluetooth scans. That's unfortunate.

As a workaround, I could sync it to the Mayflash adapter and then plug the adapter into the Wii U. I'm seeing the Wii U Pro adapter listed under Nintendont's supported controller configs-- is that referring to this product: http://www.mayflash.com/products/nintendowiiu/w009.html ? I assume I also need a Y-cable since plugging into a single USB port did not give it power.

carnage702 commented 8 years ago

well everything that needs the normal power from a usb port needs a y cable on vwii, you know that nintendo made a huge mistake designing the wiiu for no reason at all.

skmpowdjy commented 8 years ago

Alright. I finally got a Y-cable to try the Mayflash Wii U Pro Controller wireless adapter. The controller now works in the loader/in-game (at least, the A button, control stick, and R button do), but after like 60-90 seconds the game crashes and boots me back to the Homebrew Channel. I am testing with Super Mario Sunshine. Any ideas?

Edit: Using the real pro controller via the adapter works fine |:

Edit 2: If I boot the game with the real pro controller connected to the adapter, then disconnect that and re-sync with the Hyperkin mid-game it doesn't crash (at least, not within a few minutes of playing). I found that B/Y are switched, and Start and L both aren't recognized (on both the Hyperkin and the real controllers). Is there any info I can give to get the buttons working?

ubergeek77 commented 6 years ago

It's been a really long time since this issue was last updated, but it's still an issue. I just got this controller, and I was really disappointed to find out it doesn't work with Nintendon't.

What can be done from the software side of things to fix this without needing a Y-cable and an additional adapter? I'd like to help resolve this issue.

da-code-a commented 6 years ago

From what I can tell, the closed source Diivolution loader works with this controller. However, my Metroid Prime and my Sunshine disks are unreadable, so that option is a no go for those games for me. I can get this controller to work in Diivolution using my Luigi's Mansion disk, so it is possible for homebrew to pick it up. What could be the difference here?

Raflos10 commented 5 years ago

Using "hcitool inq --iac=liac" the controller shows up with MAC address "00:3C:C8:00:02:A9"

Raflos10 commented 5 years ago

Here's everything I've been able to find about this controller. https://github.com/dvdhrm/xwiimote/issues/66 Someone in this issue thread has managed to connect it to PC. Apparently it has the same name as a standard WUPC, including the "-UC" at the end.

In addition to this, other homebrew like USB Loader GX connect to this controller and keep it connected. The latest USB Loader GX uses the latest libogc. It connects but it doesn't respond to any inputs other than the home button and power button, and the cursor immediately moves to the bottom-left. But it at least stays connected. If someone else has this controller, can you please test it in USB Loader GX to see if you get the same result?

I noticed that Nintendont is currently using old versions of DevKitPPC and libogc. Maybe integrating support for the latest libogc would allow this controller to connect. Libogc now recognizes both Wii U Pro Controllers and Wii Classic Controllers (the wiimote extension) as the same thing (after calibrating them properly). So for us that means we could simplify the input code to just support the wii remote + extensions, and the WUPC is supported automatically.

smackanoodle commented 5 years ago

Same issue here I think raflos 10 is right. I can get the controller to connect in the homebrew channel on the vwii as the first controller. I can not use it as an input device though only a placeholder. And since wii controller connections are reloaded when launching a game or software the controller disconnects and will not reconnect. It's a shame because there isn't really any other wireless gamecube options for my situation. I have been using my original controller with and adapter but I still want to get rid of those pesky wires

Raflos10 commented 5 years ago

Here's what needs to happen before this controller will work in any wii homebrew.

  1. Libogc update with a fix for this specific controller's inputs It already connects so as long as there is a way to recognize it specifically as a "Hyperkin Procube" controller, it shouldn't be too difficult to make the inputs work.
  2. Each homebrew then needs to update libogc

There have been major changes with the latest DevKitPro tools recently and Nintendont is still on the old versions. Honestly not sure how difficult it would be to update Nintendont to the latest tools, but I doubt it's easy. Lots of arguing going on about updating vs staying on old versions. https://gbatemp.net/threads/collection-of-old-devkitpro-versions.526377/

Either way they will probably update eventually, so we just need to be sure the latest libogc supports this controller when that happens or it could be years before it works.

snowfrz commented 5 years ago

Any news on this issue? I'm still unable to connect my Hyperkin ProCube to Nintendont

Raflos10 commented 5 years ago

Here is a comparison between the controllers handshake data: Top: Official WUPC Bottom: Hyperkin Controller IMG_20190813_121744 - Copy

Immediately after the handshake ends, you can see it sends out 0xFEFF which means it thinks that all buttons are down at the same time. It sends out this message regardless of how many buttons I'm pressing, then it doesn't respond to any button changes except Home, which sends out a normal 0x0800.

Raflos10 commented 5 years ago

Also the joysticks are outputting 0x120000700000 no matter what position

milo1924 commented 5 years ago

Wow that's a great work Raflos10, can i get the code of this handshake app? i have a similar issue with a fake pro controller and i want to know if at least my controller can be recognized by this hombrew. (I'm a noob on the vwii/wiiu Scene and also english is not my first language so sorry if mispelled something).

Raflos10 commented 5 years ago

Sure thing, do you want the code or a dol file? To get the handshake data I had to actually edit the libogc code, so if you want I can just point you to where it is

milo1924 commented 5 years ago

That would be nice! thanks man. i want the code to learn a little bit how does the handshake works and in a far far away future help adding support to other BT controllers on nintendont.

Raflos10 commented 4 years ago

The Wii U has been seriously lacking homebrew support since the switch came out, so I'm glad to hear that you want to help in the future. So for this handshake app, I started with the template example app that you get from devkitpro, which just calls WPAD_ScanPads in the main loop. If your goal is just to see if the controller will be recognized, you can just have the app print out when more than one controller is connected, or print when the buttons are down. If you want to get to the handshake data though, you'll have to edit the libogc files. The files you want to be looking through are libogc/wiiuse/wpad.c and libogc/lwbt/bte.c. bte.c seems to be the lowest level code I could find that handles bluetooth. Hope this helps!

milo1924 commented 4 years ago

Well, i took your advice and tried the template code when buttons are down. Result: my controller is not being recognized, can even connect with the app. I also tried this fbzx app that uses the new library and the results were the same. https://gbatemp.net/threads/fbzx-wii-wii-u-pro-controller-support.455944/

Summary: vWii Menu: Controller being recognized as wiimote (home, plus and minus buttons work as normal, the rest of the buttons doesn't do anything) In-Game (wiiFlow) : Behaves the same as in vWii Menu. Homebrew Channel: Controller can't connect Any homebrew at the moment: Controller can't connect

So, what should i try now?

Raflos10 commented 4 years ago

We've both hit the same brick wall. The wii u, vwii, and homebrew all use different bt drivers, even if the hardware is the same. It's frustrating because all it takes is the right information about how the wii u bt driver connects to/reads inputs from these controllers, and it could be made to work. I think the best way to go about it from this point on would be to try reverse-engineering the controllers themselves. Or more specifically, reverse-engineer the proper way of connecting and recognizing inputs from the controllers. There is some software on Linux that can help with this, like hcitool and bluetoothctl. And you can learn about how official controllers work on wiibrew (https://wiibrew.org/wiki/Wiimote). Keep in mind that the Wii U Pro controller works like a Wiimote with an extension plugged in.

mrfixit2001 commented 3 years ago

Just for visibility in case it helps someone. https://github.com/dvdhrm/xwiimote/issues/66#issuecomment-775176154

AngelisDania commented 2 years ago

Just wondering if there are any plans to work on this issue. I’ve picked up a pair of these controllers, and I think they’re the only truly wireless option for a GameCube style controller on the vWii, so it would be great if they could be supported. Thanks.

pankostain commented 1 year ago

almost 2023 and still no support for the controller, hope we'll get like some kind of solution soon

carnage702 commented 1 year ago

almost 2023 and still no support for the controller, hope we'll get like some kind of solution soon

and never will be unless you find someone that knows how to code bt and wants to mess with nintendont bt stack which is custom to get it working.

XStationSwitch commented 9 months ago

Nearing the end of 2023... any solutions/workarounds yet? It seems I've foolishly picked up this controller assuming it would work, but was sadly mistaken :')