BetterJoy icon indicating copy to clipboard operation
BetterJoy copied to clipboard

[Suggestion] Add support for PowerA Wireless Controller

Open thefloppydriver opened this issue 4 years ago • 41 comments

Even using the nonOriginal controller option this controller is not recognized.

thefloppydriver avatar Apr 06 '20 16:04 thefloppydriver

Thanks for the comment. I'll leave this issue open, but will close the others in a similar vein because they don't really contribute to discussion.

In the off chance I get one, I'll add support. Otherwise someone else (could be you!) could implement support. The program is open source.

Davidobot avatar Apr 07 '20 07:04 Davidobot

Wireless versions are the only 2 that would benefit from betterjoy as Cemu detects the controllers just fine in wired versions but they don't have gyro functions like the wireless controllers. I own 3 Power A controllers and 2 are wired, 1 standard discontinued model (they released enhanced versions) and 1 gamecube design as well as a wireless enhanced model. All 3 work fine with only the standard having an issue of a sticky L button occasionally but after some wear it got better.

Here's their site: https://www.powera.com/products/?product_type=17&product_platform=141

WhitestWhiteEver avatar May 31 '20 08:05 WhitestWhiteEver

@Davidobot What would adding support look like?

UndarkAido avatar Jun 02 '20 23:06 UndarkAido

Having physical access to the controller. Adding the product id to the known list and seeing everything that goes wrong.

Davidobot avatar Jun 03 '20 06:06 Davidobot

where would one do that? I have the product ID and currently am looking for where I'd add it to BetterJoy. May not have a clue what I'm doing but I can follow instructions. Is there a discord or something that I can join to ask for help? Also attempting to use Steam to see if that helps workaround the issue atm. I've tried before but kinda half assed the attempt so didn't actually look into it that hard. I'm trying to get this to work for both Dolphin and CEMU, both say use your program to get motion controls from a switch pro controller.

WhitestWhiteEver avatar Jun 03 '20 23:06 WhitestWhiteEver

@WhitestWhiteEver you can add me on Discord if you want to chat directly - RinaLovesRobots [Davidobot]#9863

Davidobot avatar Jun 04 '20 08:06 Davidobot

I'd like to help too if I can; I just got a pair of these.

On Thu, Jun 4, 2020, 3:27 AM David Khachaturov [email protected] wrote:

@WhitestWhiteEver https://github.com/WhitestWhiteEver you can add me on Discord if you want to chat directly - RinaLovesRobots [Davidobot]#9863

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/Davidobot/BetterJoy/issues/268#issuecomment-638694766, or unsubscribe https://github.com/notifications/unsubscribe-auth/ABYT6YSLIZQ4K3IRVX43IFDRU5LHHANCNFSM4MCM6B4A .

UndarkAido avatar Jun 04 '20 14:06 UndarkAido

We reached a point where idk what to do and I know I should of said something but I can't honestly have no clue what Davidobot asked me to do. In issue #84, the person suggest stuff but again idk what they are saying.

WhitestWhiteEver avatar Jun 09 '20 21:06 WhitestWhiteEver

For everyone that has a PowerA controller: BetterJoy_Test_Ver.zip Plug in your controllers, run this and send me the block of text from the console that looks like

-- COPY ME --
Vendor: 1406; Product: 8201;
-- COPY ME END --

You might want to just copy the exe over and leave your v6 settings in place

Davidobot avatar Jun 11 '20 08:06 Davidobot

@Davidobot Running the attached BetterJoy test version with my two PowerA controllers (one wired, the other wireless) outputted nothing.

-- COPY ME --
-- COPY ME END --
Starting server on 127.0.0.1:26761
All systems go

jingzbu avatar Jun 11 '20 18:06 jingzbu

Same as above. Messed with the config turning things on and off and nothing. And same as Jingzbu on the controller options. I found a Hash Id but no hex like you asked for. Now my controller is giving driver errors. It maybe due to I need to reinstall windows but haven't felt like doing that yet. PSO2 was involved, tried system restore, factory reset and everything else Microsoft support suggested to fix the fact that the Windows Store deleted itself.

WhitestWhiteEver avatar Jun 11 '20 23:06 WhitestWhiteEver

BetterJoy_Test_Ver.zip Here's another version to try. This will list all your connected devices.

If you've used HidGuardian before, go to http://localhost:26762/ and clear out device, then restart your PC. Plug in your controller and then run the test version, pasting the results of the COPY ME here.

Davidobot avatar Jun 12 '20 08:06 Davidobot

BetterJoy_3rdP_Test.zip Cool, here's an experimental version. Basically, plug in your controllers. Click the "Add Controllers" button. Then from "All Devices" select your controller and click the -> button. Then click on the controller in the "Switch Controllers" menu and set its type. Click apply. Tell me what happens.

Davidobot avatar Jun 12 '20 15:06 Davidobot

Using BetterJoy_3rdP_Test, the wired controller could be found (i.e., it is listed in the "All Devices"). I set the "Settings Type" to be "Pro Controller", and then click "Apply", but nothing happened; no controller shown in the four "Locate" slots.

The wireless one could also be found, and even be connected (shown in one of the four "Locate" slots), but only for a very short period of time, and then got "dropped". See below.

HidGuardian is enabled.
Starting server on 127.0.0.1:26761
All systems go
Pro controller connected.
Using factory stick calibration data.
Using factory stick calibration data.
Starting poll thread.
Dropped.
Removed dropped controller. Can be reconnected.

jingzbu avatar Jun 12 '20 18:06 jingzbu

@jingzbu Thanks for testing! https://github.com/Davidobot/BetterJoy/issues/419#issuecomment-643420372 < try this

Davidobot avatar Jun 12 '20 18:06 Davidobot

Here is a testing message from the older version:

Starting server on 127.0.0.1:26761
-- COPY ME --
Name: 2.4G Wireless Mouse      Vendor: 14648 Product: 4471
Name: CORSAIR Lighting Node CORE Vendor: 6940 Product: 3098
Name: 2.4G Wireless Mouse      Vendor: 14648 Product: 4471
Name: NSW wired controller Vendor: 8406 Product: 42771
Name: USB Receiver Vendor: 1133 Product: 50484
Name: USB Receiver Vendor: 1133 Product: 50484
Name: USB Receiver Vendor: 1133 Product: 50484
Name: 2.4G Wireless Mouse      Vendor: 14648 Product: 4471
Name: USB Receiver Vendor: 1133 Product: 50484
Name: USB Receiver Vendor: 1133 Product: 50484
Name: USB Receiver Vendor: 1133 Product: 50484
Name: 2.4G Wireless Mouse      Vendor: 14648 Product: 4471
Name: Wireless Gamepad Vendor: 0 Product: 0
Name: AURA MOTHERBOARD Vendor: 2821 Product: 6307
-- COPY ME END --
All systems go

jingzbu avatar Jun 12 '20 18:06 jingzbu

@jingzbu Thanks for testing! #419 (comment) < try this

Using BetterJoy_3rdP_Test3, the wired controller got connected. Thanks for the good work! I will test the wireless one and keep you updated.

Updates:

Not sure whether this would be useful, but just FYI:

Nintendo Wireless Gamepad
HID\{00001124-0000-1000-8000-00805F9B34FB}_VID&00020000_PID&0000

BDA NSW wired controller
HID\VID_20D6&PID_A713

The wired controller got connected stably but dropped after about 30 seconds. The wireless one could not be connected stably.

HidGuardian is enabled.
Starting server on 127.0.0.1:26761
All systems go
Pro controller connected.
Pro controller connected.
Pro controller connected.
Pro controller connected.
Pro controller connected.
Pro controller connected.
Using factory stick calibration data.
Using factory stick calibration data.
Using factory stick calibration data.
Using factory stick calibration data.
Using factory stick calibration data.
Removed dropped controller. Can be reconnected.
Using factory stick calibration data.
Using factory stick calibration data.
Using user stick calibration data.
Starting poll thread.
Starting poll thread.
Starting poll thread.
Starting poll thread.
Using user stick calibration data.
Using user stick calibration data.
Starting poll thread.
Dropped.
Dropped.
Dropped.
Dropped.
Using user stick calibration data.
Using user stick calibration data.
Poll cannot start.
Dropped.
Removed dropped controller. Can be reconnected.
Removed dropped controller. Can be reconnected.
Removed dropped controller. Can be reconnected.
Removed dropped controller. Can be reconnected.
Removed dropped controller. Can be reconnected.

jingzbu avatar Jun 12 '20 18:06 jingzbu

A bit worrying that it displays that 6 pro controllers were found. Can you screenshot what your "Add device" window looks like?

Davidobot avatar Jun 12 '20 18:06 Davidobot

A bit worrying that it displays that 6 pro controllers were found. Can you screenshot what your "Add device" window looks like? Capture

Only two of the listed devices are controllers.

jingzbu avatar Jun 12 '20 19:06 jingzbu

What happens if you add only the wired/wireless controller and apply it as a pro?

Davidobot avatar Jun 12 '20 19:06 Davidobot

What happens if you add only the wired/wireless controller and apply it as a pro?

Capture

The wired controller could be connected, but after about 30 secs, the BetterJoy crashed.

The wireless one could not be stably connected; got dropped so fast that it even did not allow me to capture the crashing process.

jingzbu avatar Jun 12 '20 19:06 jingzbu

BetterJoy_3rdP_Test4.zip Okay, last test for tonight.

Davidobot avatar Jun 12 '20 19:06 Davidobot

BetterJoy_3rdP_Test4.zip Okay, last test for tonight.

Done. The same issues as the Test3 version.

jingzbu avatar Jun 12 '20 19:06 jingzbu

Using that latest test, clicking Add Controllers throws an exception that crashes the whole program

See the end of this message for details on invoking 
just-in-time (JIT) debugging instead of this dialog box.

************** Exception Text **************
System.OutOfMemoryException: List box contains too many items.
   at System.Windows.Forms.ListBox.NativeAdd(Object item)
   at System.Windows.Forms.ListBox.OnHandleCreated(EventArgs e)
   at System.Windows.Forms.Control.WmCreate(Message& m)
   at System.Windows.Forms.Control.WndProc(Message& m)
   at System.Windows.Forms.ListBox.WndProc(Message& m)
   at System.Windows.Forms.NativeWindow.Callback(IntPtr hWnd, Int32 msg, IntPtr wparam, IntPtr lparam)


************** Loaded Assemblies **************
mscorlib
    Assembly Version: 4.0.0.0
    Win32 Version: 4.8.4180.0 built by: NET48REL1LAST_B
    CodeBase: file:///C:/Windows/Microsoft.NET/Framework64/v4.0.30319/mscorlib.dll
----------------------------------------
BetterJoyForCemu
    Assembly Version: 1.0.0.0
    Win32 Version: 1.0.0.0
    CodeBase: file:///D:/Downloads/BetterJoy_3rdP_Test4/BetterJoyForCemu.exe
----------------------------------------
System
    Assembly Version: 4.0.0.0
    Win32 Version: 4.8.4161.0 built by: NET48REL1
    CodeBase: file:///C:/WINDOWS/Microsoft.Net/assembly/GAC_MSIL/System/v4.0_4.0.0.0__b77a5c561934e089/System.dll
----------------------------------------
System.Net.Http
    Assembly Version: 4.0.0.0
    Win32 Version: 4.8.4161.0 built by: NET48REL1
    CodeBase: file:///C:/WINDOWS/Microsoft.Net/assembly/GAC_MSIL/System.Net.Http/v4.0_4.0.0.0__b03f5f7f11d50a3a/System.Net.Http.dll
----------------------------------------
System.Core
    Assembly Version: 4.0.0.0
    Win32 Version: 4.8.4180.0 built by: NET48REL1LAST_B
    CodeBase: file:///C:/WINDOWS/Microsoft.Net/assembly/GAC_MSIL/System.Core/v4.0_4.0.0.0__b77a5c561934e089/System.Core.dll
----------------------------------------
System.Configuration
    Assembly Version: 4.0.0.0
    Win32 Version: 4.8.4161.0 built by: NET48REL1
    CodeBase: file:///C:/WINDOWS/Microsoft.Net/assembly/GAC_MSIL/System.Configuration/v4.0_4.0.0.0__b03f5f7f11d50a3a/System.Configuration.dll
----------------------------------------
System.Windows.Forms
    Assembly Version: 4.0.0.0
    Win32 Version: 4.8.4161.0 built by: NET48REL1
    CodeBase: file:///C:/WINDOWS/Microsoft.Net/assembly/GAC_MSIL/System.Windows.Forms/v4.0_4.0.0.0__b77a5c561934e089/System.Windows.Forms.dll
----------------------------------------
System.Drawing
    Assembly Version: 4.0.0.0
    Win32 Version: 4.8.4161.0 built by: NET48REL1
    CodeBase: file:///C:/WINDOWS/Microsoft.Net/assembly/GAC_MSIL/System.Drawing/v4.0_4.0.0.0__b03f5f7f11d50a3a/System.Drawing.dll
----------------------------------------
System.Xml
    Assembly Version: 4.0.0.0
    Win32 Version: 4.8.4161.0 built by: NET48REL1
    CodeBase: file:///C:/WINDOWS/Microsoft.Net/assembly/GAC_MSIL/System.Xml/v4.0_4.0.0.0__b77a5c561934e089/System.Xml.dll
----------------------------------------
System.ServiceProcess
    Assembly Version: 4.0.0.0
    Win32 Version: 4.8.4161.0 built by: NET48REL1
    CodeBase: file:///C:/WINDOWS/Microsoft.Net/assembly/GAC_MSIL/System.ServiceProcess/v4.0_4.0.0.0__b03f5f7f11d50a3a/System.ServiceProcess.dll
----------------------------------------
System.Numerics
    Assembly Version: 4.0.0.0
    Win32 Version: 4.8.4161.0 built by: NET48REL1
    CodeBase: file:///C:/WINDOWS/Microsoft.Net/assembly/GAC_MSIL/System.Numerics/v4.0_4.0.0.0__b77a5c561934e089/System.Numerics.dll
----------------------------------------
WindowsInput
    Assembly Version: 6.1.1.0
    Win32 Version: 6.1.1.0
    CodeBase: file:///D:/Downloads/BetterJoy_3rdP_Test4/WindowsInput.DLL
----------------------------------------
Nefarius.ViGEm.Client
    Assembly Version: 1.16.150.0
    Win32 Version: 1.16.150
    CodeBase: file:///D:/Downloads/BetterJoy_3rdP_Test4/Nefarius.ViGEm.Client.DLL
----------------------------------------
WindowsBase
    Assembly Version: 4.0.0.0
    Win32 Version: 4.8.4180.0 built by: NET48REL1LAST_B
    CodeBase: file:///C:/WINDOWS/Microsoft.Net/assembly/GAC_MSIL/WindowsBase/v4.0_4.0.0.0__31bf3856ad364e35/WindowsBase.dll
----------------------------------------

bgiesing avatar Jun 13 '20 08:06 bgiesing

Is this thread still active? I am trying to connect a power A controller to dolphin emulator and I need to use betterjoy. After joining the dolphin server they said to look here. It doesn't seem like you have a full, working, version yet so I am willing to help test and such. I have a wireless power A gamecube controller.

dyactivestudios avatar Aug 01 '20 19:08 dyactivestudios

I'm still very interested in this as well

UndarkAido avatar Aug 11 '20 00:08 UndarkAido

Is there any chance you'll revisit this topic? it would be nice to be able to use my wireless gamecube controller with emulators and such, I'm open to helping test and all that if needed lol

maxtinion avatar Sep 21 '20 00:09 maxtinion

No idea if this issue's being monitored at all, but I'll toss in my two cents.

You've probably figured it out already, but the reason no one's been able to provide the product and vendor ID is because this device doesn't have any, at least not in the traditional PCI/USB format. The controller connects exclusively via Bluetooth and runs on AA batteries - there's zero USB interfacing at all. Windows' device manager shows a hardware ID of BTHENUM\Dev_0A1B2C3D4E5F, where the last chunk of the string is the device's unique address, stripped of colons. There's also Bluetooth product IDs and Bluetooth vendor IDs listed, but they're each set to 0000. If your code requires VID/PID in a standard format, you're gonna have a bad time.

The controller does seem to be recognized as a Switch Pro Controller by Steam, gyroscope and all. Hard to tell how it's handled in Windows, but the udev rules in Valve's Linux input repository work around the lack of proper IDs (the only supported gamepad not to have them, that I can see) by looking for the name the device provides (Lic Pro Controller) over Bluetooth, which seems to be unique.

With the third-party controller finder in Version 6.4β, the controller shows up as 'Wireless Gamepad' when connected; you can move it to the Switch Controllers window and assign it as a Pro Controller, but after applying it things go south. A few seconds after the output window shows 'Starting poll thread.', the Bluetooth connection is terminated, and the controller doesn't attempt to reconnect itself; the output window doesn't give any more useful information than simply saying 'Dropped.'. I haven't dug through the code, and I don't see any debug output, so unfortunately I can't really speak to what it's doing to throw things off the rails. I might do a deeper dive later in the week, but I can't really promise much.

thojohns avatar Dec 07 '20 07:12 thojohns

I've just found this program which works amazingly with my PowerA Wireless Gamecube Controller: https://github.com/csutorasa/XOutput

ElXando avatar Jan 10 '21 13:01 ElXando

I decided to mess around a little and found that commenting out


                        try {
                            jc.Attach(leds_: jc.LED);
                        } catch (Exception e) {
                            jc.state = Joycon.state_.DROPPED;
                            continue;
                        }

                        jc.SetHomeLight(on);

in Program.cs at around line 300 then the controller doesnt drop and instead VIGEm gives an error about the controller already being connected, I tried to make it only connect once and it didn't drop the controller and had a dummy x360 controller showing in my usb control panel but no inputs were registered. Just thought it might be worth posting here.

I also found this https://github.com/CTCaer/jc_toolkit/pull/51/commits/488eb7d1c13d8cbcf994e3cd90a93c154abf2d9b which checks by name for potential third party controllers, seems to work well and I think Steam is doing something similar for their support

calum12 avatar Feb 01 '21 16:02 calum12

Considering that code is required to properly use the controller, it would make sense why commenting it out breaks things ;)

If I was to develop 3rd party support further, I would make more use of the "Add Controllers" menu. Anyways, check out this build https://github.com/Davidobot/BetterJoy/pull/663#issuecomment-759652125

Davidobot avatar Feb 01 '21 16:02 Davidobot

Ooh I already tried that build but for some reason I never got a notification of your reply and forgot to check back. I'll try what you suggested in that thread, seems on par with what I was thinking removing those lines did in the first place (stop the LEDs being used lol)

calum12 avatar Feb 01 '21 16:02 calum12

Hey, I wanted to ask if any progress has been made with this? :)

palex00 avatar Feb 17 '21 21:02 palex00

Hey, I wanted to ask if any progress has been made with this? :)

Unfortunately - no. I would notify the community in such an event. I like your Professor Layton profile image!

Davidobot avatar Feb 18 '21 07:02 Davidobot

I too have one of these powera controllers. Specifically mine is the PowerA enhanced wireless switch controller (https://www.powera.com/product/enhanced-wireless-controller-for-nintendo-switch-black/).

I have recently gotten into emulation as I travel alot and its great being able to have a game of mario kart in a hotel without having to carry a different device, just a laptop and a controller!

I noticed today the following;
This specific controller seems to "just work" with Cemu and Yuzu.

  • In Cemu the controller works as a direct input and all buttons are mapable. No other applications open. Obviously though, no motion despite it being part of the controller! Interestingly though it is never assigned as a player. Just keeps sweeping the lights back and forth, but it worked fine for a mario kart GP.

  • In YUZU it also works as a direct input, however again no motion. In YUZU as soon as you open the controls section it identifys as player 1. Again worked fine in mario kart.

The issue then with this controller appears to be that the motion is not natively supported in YUZU or Cemu and a third party interface is required which is what BetterJoy provides through the CEMUHook UDP server.

Addressing David directly here: I have added you on Discord as AnUrbanPenguin. I have reasonably good computer knowledge if you would like me to have play with some test versions to try and finally get this monkey off your back.

Further Update: The controller works perfectly in steam and is detected in steam as switch pro controller. The motion works perfectly in steam too.

AnUrbanPenguin avatar Mar 15 '21 22:03 AnUrbanPenguin

I have been looking into this issue a little more and it appears that the problem stems from both the VID and PID of this particular controller being listed as 0x0000 making life difficult.

I have attached a screenshot from HIDNinja which does have a little more information but not much. There does appear to be a hardware ID shown which could be something to work with. It would be great if someone else with one of these controllers would be able to run HIDNinja and check what their ID shows as? If its the same as this one we could be onto something?

I have also checked steam forums etc and they do support these controllers as per the following links; however it is not shown on their officially support controllers page (possibly its just out of date?). https://steamcommunity.com/app/353370/discussions/1/1752358461531576359/ https://steamcommunity.com/groups/SteamClientBeta/announcements/detail/1705073202075628993

HID Ninja

AnUrbanPenguin avatar Mar 17 '21 22:03 AnUrbanPenguin

I have noticed the above comment from June 2020 (https://github.com/Davidobot/BetterJoy/issues/268#issuecomment-643425989)

Interestingly my controller and jingzbu's controller both have identifcal hardware ID's as per the screenshot above.

Nintendo Wireless Gamepad HID{00001124-0000-1000-8000-00805F9B34FB}_VID&00020000_PID&0000)

Could this be the way forward for identifying these controllers? Is that how steam is making it work? Hopefully something to go on. I have passed this information onto the DS4Windows team who also support Switch Pro controllers in their application.

AnUrbanPenguin avatar Mar 18 '21 15:03 AnUrbanPenguin

Anyone? These Power A Enhanced Wireless Controllers are a pain in the ass. My PC detects it as a controller in the device manager and is named “NSW Game Controller” but I go into Controller Settings then there’s 0 controllers to choose from which is confusing. Steam recognizes as a “NSW” controller but unable to bind anything. In windows game controller settings, when trying to test any type of input, there’s none.

MrRobotjs avatar Jul 29 '21 23:07 MrRobotjs

Anyone got this to work? I have been unable to connect even with unofficial controller enabled. Controller connects to Bluetooth fine but can't connect to betterjoy at all

Bigmoney5335 avatar Oct 20 '21 13:10 Bigmoney5335

Hey ! Are there some news about these power A controllers ?

Fyn-fyn avatar Jan 30 '22 10:01 Fyn-fyn

Version 7 works with them, at-least my ones. There are also test builds in one of the other issues. Not 100% if they are outdated compared to the release build now though.

calum12 avatar Apr 14 '22 12:04 calum12