Davidobot / BetterJoy

Allows the Nintendo Switch Pro Controller, Joycons and SNES controller to be used with CEMU, Citra, Dolphin, Yuzu and as generic XInput
Other
3.91k stars 344 forks source link

Support for Unofficial Controllers #419

Open OkamiTakahashi opened 4 years ago

OkamiTakahashi commented 4 years ago

I have a couple of wired USB Nintendo Switch pro controllers, but no way of using them with Cemu. They can be used by my Steam account, but Cemu doesn't detect them at all, nor does BetterJoy. Well, a previous nightly of BetterJoy did when I tried to add controllers, but nothing happened. Now with the current build I can't even attempt that. The locate feature doesn't even function for these.

I'm sorry if this sounds rude, but is it REALLY too much to ask for PROPER support for these kinds of USB Switch pro controllers? I swear, it says there's USB support ON the page, but judging from my own experience, this is not the case at all; the controllers are very clearly plugged in, but not detected by this program. For the record, my controllers are made by PowerA and PDP- two are typical looking pro controllers with a Zelda motif, and one is a pro controller in the shape of a GCN controller- also with a Zelda motif. I'm attaching images of them at the bottom for reference. As someone continuing their file on BOTW from console and beta-testing a big mod pack in development, I wanted to use a natural-feeling controller rather than the Xbox 360 controller which, while nice and comfortable, didn't sit right with me while using Cemu, and is out of action currently.

6250912_sd

wiredsmashpadpro_20-_203-4_right_link

Davidobot commented 4 years ago

They're not official pro controllers, so yes, it is quite hard for me to add support without having physical access to them.

OkamiTakahashi commented 4 years ago

So, apparently third party officially licensed pro controllers don't count as official pro controllers then? That's a shame, considering the computer recognizes it and other programs on said computer.. Guess I'll just go back to using an Xbox 360 one, once I can procure a new bluetooth receiver for mine.

Davidobot commented 4 years ago

@OkamiTakahashi If you're willing, I can send you a small program that will extract the necessary info I need about the controllers (hardware IDs) and if you're willing to test, then we can get somewhere?

Davidobot commented 4 years ago

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 --
DebornMC commented 4 years ago

I tried the same, but:

''HidGuardian is enabled. -- COPY ME -- -- COPY ME END -- Starting server on 127.0.0.1:26760 All systems go''

DebornMC commented 4 years ago

If you're willing to help me too, that would be very much appreciated.

Davidobot commented 4 years ago

Okay, I'll post an updated version to try things tomorrow.

DebornMC commented 4 years ago

Thank you!

Davidobot commented 4 years ago

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.

DebornMC commented 4 years ago

Thanks, I think it worked! -- COPY ME -- Name: Gaming KB Vendor: 9610 Product: 58 Name: USB Keyboard Vendor: 6785 Product: 8212 Name: G203 Prodigy Gaming Mouse Vendor: 1133 Product: 49284 Name: G203 Prodigy Gaming Mouse Vendor: 1133 Product: 49284 Name: G203 Prodigy Gaming Mouse Vendor: 1133 Product: 49284 Name: G203 Prodigy Gaming Mouse Vendor: 1133 Product: 49284 Name: G203 Prodigy Gaming Mouse Vendor: 1133 Product: 49284 Name: Gaming KB Vendor: 9610 Product: 58 Name: Gaming KB Vendor: 9610 Product: 58 Name: Faceoff Deluxe+ Audio Wired Controller for Nintendo Switch Vendor: 3695 Product: 388 Name: Gaming KB Vendor: 9610 Product: 58 Name: Vendor: 1133 Product: 49713 Name: G203 Prodigy Gaming Mouse Vendor: 1133 Product: 49284 Name: Vendor: 1133 Product: 49714 Name: Gaming KB Vendor: 9610 Product: 58 Name: USB Keyboard Vendor: 6785 Product: 8212 Name: USB Keyboard Vendor: 6785 Product: 8212 Name: USB Keyboard Vendor: 6785 Product: 8212 -- COPY ME END --

DebornMC commented 4 years ago

Name: Faceoff Deluxe+ Audio Wired Controller for Nintendo Switch Vendor: 3695 Product: 388 (its this i think)

zhangbo8418 commented 4 years ago

I also try. Haha. . . -- COPY ME -- Name: Broadcom Bluetooth Wireless Mouse Vendor: 2652 Product: 1 Name: Broadcom Bluetooth Wireless Mouse Vendor: 2652 Product: 1 Name: Broadcom Bluetooth Wireless Mouse Vendor: 2652 Product: 1 Name: XiaoMi Bluetooth Wireless GameController Vendor: 10007 Product: 12612 Name: Vendor: 1133 Product: 45083 Name: Vendor: 1133 Product: 45083 Name: Vendor: 1133 Product: 45083 -- COPY ME END --

zhangbo8418 commented 4 years ago

Nintendo Wireless Gamepad HID{00001124-0000-1000-8000-00805F9B34FB}_VID&0002057E_PID&2009

GoerTek Corp. XiaoMi Bluetooth Wireless GameController HID{00001124-0000-1000-8000-00805F9B34FB}_VID&00022717_PID&3144

Davidobot commented 4 years ago

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.

DebornMC commented 4 years ago

when i click add controllers: See the end of this message for details on invoking `just-in-time (JIT) debugging instead of this dialog box.

** Exception Text ** System.NullReferenceException: Object reference not set to an instance of an object. at BetterJoyForCemu._3rdPartyControllers.ContainsText(ListBox a, String manu) in C:\Users\Grigor\source\repos\BetterJoy\BetterJoyForCemu\3rdPartyControllers.cs:line 92 at BetterJoyForCemu._3rdPartyControllers.RefreshControllerList() in C:\Users\Grigor\source\repos\BetterJoy\BetterJoyForCemu\3rdPartyControllers.cs:line 106 at BetterJoyForCemu._3rdPartyControllers..ctor() in C:\Users\Grigor\source\repos\BetterJoy\BetterJoyForCemu\3rdPartyControllers.cs:line 78 at BetterJoyForCemu.MainForm.btn_open3rdP_Click(Object sender, EventArgs e) in C:\Users\Grigor\source\repos\BetterJoy\BetterJoyForCemu\MainForm.cs:line 231 at System.Windows.Forms.Control.OnClick(EventArgs e) at System.Windows.Forms.Button.OnClick(EventArgs e) at System.Windows.Forms.Button.OnMouseUp(MouseEventArgs mevent) at System.Windows.Forms.Control.WmMouseUp(Message& m, MouseButtons button, Int32 clicks) at System.Windows.Forms.Control.WndProc(Message& m) at System.Windows.Forms.ButtonBase.WndProc(Message& m) at System.Windows.Forms.Button.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:///C:/Users/kaide/Documents/Desktop/BetterJoy-master/BetterJoyForCemu.exe

System Assembly Version: 4.0.0.0 Win32 Version: 4.8.4001.0 built by: NET48REL1LAST_C 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.3752.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.3752.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.4150.0 built by: NET48REL1LAST_C 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.3752.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.3752.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.3752.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.3752.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:///C:/Users/kaide/Documents/Desktop/BetterJoy-master/WindowsInput.DLL

Nefarius.ViGEm.Client Assembly Version: 1.16.150.0 Win32 Version: 1.16.150 CodeBase: file:///C:/Users/kaide/Documents/Desktop/BetterJoy-master/Nefarius.ViGEm.Client.DLL

** JIT Debugging ** To enable just-in-time (JIT) debugging, the .config file for this application or computer (machine.config) must have the jitDebugging value set in the system.windows.forms section. The application must also be compiled with debugging enabled.

For example:

When JIT debugging is enabled, any unhandled exception will be sent to the JIT debugger registered on the computer rather than be handled by this dialog box.`

Davidobot commented 4 years ago

@DebornMC interesting, you seem to have some funky connected devices then, that don't have a name identifier attached. BetterJoy_3rdP_Test2.zip Try this

DebornMC commented 4 years ago

Thanks a lot! It works but I have to refresh it often to get it to work. Getting this error a lot: `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:///C:/Users/kaide/Documents/Desktop/BetterJoy-master/BetterJoyForCemu.exe

System Assembly Version: 4.0.0.0 Win32 Version: 4.8.4001.0 built by: NET48REL1LAST_C 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.3752.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.3752.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.4150.0 built by: NET48REL1LAST_C 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.3752.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.3752.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.3752.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.3752.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:///C:/Users/kaide/Documents/Desktop/BetterJoy-master/WindowsInput.DLL

Nefarius.ViGEm.Client Assembly Version: 1.16.150.0 Win32 Version: 1.16.150 CodeBase: file:///C:/Users/kaide/Documents/Desktop/BetterJoy-master/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

** JIT Debugging ** To enable just-in-time (JIT) debugging, the .config file for this application or computer (machine.config) must have the jitDebugging value set in the system.windows.forms section. The application must also be compiled with debugging enabled.

For example:

When JIT debugging is enabled, any unhandled exception will be sent to the JIT debugger registered on the computer rather than be handled by this dialog box.`

Davidobot commented 4 years ago

@DebornMC What kind of devices to your PC? You seem to have some odd ones in there.

Bear with me guys, it's really hard to develop for hardware you don't have access to, so I need people to test a bunch of versions.

BetterJoy_3rdP_Test3.zip Here's another one that should solve the memory overflow you experienced and should allow for USB.

DebornMC commented 4 years ago

Thanks I'll try right now

DebornMC commented 4 years ago

Same error, but it doesn't work anymore, no inputs

Davidobot commented 4 years ago

Can you please think what kind of dodgy USB things you have connected? This sort of behaviour isn't normal.

Do you use HIDGuardian? If you do, disable it for now. (clearing the affected devices)

DebornMC commented 4 years ago

Only a drive, keyboard, mouse and controller.

DebornMC commented 4 years ago

I do use HIDGuardian yes

Davidobot commented 4 years ago

Could you take a screenshot of your "Add Controllers" window?

DebornMC commented 4 years ago

Alright, also i uninstalled HIDGuardian for now

DebornMC commented 4 years ago

image

DebornMC commented 4 years ago

I have 1 controller connected.

Davidobot commented 4 years ago

https://github.com/Davidobot/BetterJoy/issues/268#issuecomment-643442638

DebornMC commented 4 years ago

Still nothing, unfortunately. But no duplicate controller now.

DebornMC commented 4 years ago

image

DebornMC commented 4 years ago

I found a different program which works: XOutput

DebornMC commented 4 years ago

Wow nevermind, that program sucked

DebornMC commented 4 years ago

Wow nevermind, that program sucked

Every time I disconnect the controller I have to insert all keybinds again n

luizjr860 commented 4 years ago

Friends, did you make it work? Mine doesn't just recognize the right joystick.

Davidobot commented 4 years ago

BetterJoy_3rdP_Test4.zip I noticed there was a bug with some boolean. Anyone with a 3rd party controller - do try this please! Instructions higher up in this thread.

helpmehelp-you commented 4 years ago

One of the controllers I'm trying is this one: https://www.amazon.com/IINE-Cartoon-Wireless-Controller-Nintendo/dp/B083DNW3P9

Hi, I've tried running the Test4 version and it crashes as well. Steps

  1. Add Controllers -> select "Controller (XBOX 360 for Windows")
  2. Set to Type "Pro Controller"
  3. Hit Apply/Close

The Controller is found, and the icon for it appears, however the program immediately crashes.

HID Guardian shows the following IDs:

HID\VID_045E&PID_028E&IG_00 HID\VID_057E&PID_2009

I get the same results with this controller: https://www.amazon.com/Controller-Nintendo-BEBONCOOL-Wireless-Controllers/dp/B07S4B9HSS

It actually gives the same two IDs as the above controller.

Thanks for taking a look!

nacho1191 commented 4 years ago

Hello my pro controller doesn't work too, hope you can add the compatibility. HID{00001124-0000-1000-8000-00805F9B34FB}_VID&0002057E_PID&2009 HID\VID_057E&PID_2009

thanks a lot!

Tony162 commented 4 years ago

Hello, Having similar issue trying to connect 3rd party controller over BT... My controller pairs up to my PC, no problem there. But it is doesn't show in the list when I click "add controllers". When connected via USB, it does show as "XBOX 360", and I can move it to the right of the dialog box using the arrow, and it then also shows up under "connected controllers" in the previous window. The program then shuts down 2-3 seconds later. This screenshot was taken right before it crashed. image

I am running the BetterJoy_3rdP_Test4.zip version you issued 2 weeks ago. Any help would be really appreciated !


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.4220.0 built by: NET48REL1LAST_C 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:///C:/Users/lepag/Downloads/BetterJoy_3rdP_Test4/BetterJoyForCemu.exe

System Assembly Version: 4.0.0.0 Win32 Version: 4.8.4200.0 built by: NET48REL1LAST_C 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.3752.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.4220.0 built by: NET48REL1LAST_C 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.4190.0 built by: NET48REL1LAST_B 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.4200.0 built by: NET48REL1LAST_C 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.3752.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.3752.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.3752.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

Nefarius.ViGEm.Client Assembly Version: 1.16.150.0 Win32 Version: 1.16.150 CodeBase: file:///C:/Users/lepag/Downloads/BetterJoy_3rdP_Test4/Nefarius.ViGEm.Client.DLL

System.Numerics Assembly Version: 4.0.0.0 Win32 Version: 4.8.3752.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.0.0 Win32 Version: 6.1.0.0 CodeBase: file:///C:/Users/lepag/Downloads/BetterJoy_3rdP_Test4/WindowsInput.DLL

WindowsBase Assembly Version: 4.0.0.0 Win32 Version: 4.8.4220.0 built by: NET48REL1LAST_C CodeBase: file:///C:/windows/Microsoft.Net/assembly/GAC_MSIL/WindowsBase/v4.0_4.0.0.0__31bf3856ad364e35/WindowsBase.dll

Accessibility Assembly Version: 4.0.0.0 Win32 Version: 4.8.3752.0 built by: NET48REL1 CodeBase: file:///C:/windows/Microsoft.Net/assembly/GAC_MSIL/Accessibility/v4.0_4.0.0.0__b03f5f7f11d50a3a/Accessibility.dll

** JIT Debugging ** To enable just-in-time (JIT) debugging, the .config file for this application or computer (machine.config) must have the jitDebugging value set in the system.windows.forms section. The application must also be compiled with debugging enabled.

For example:

When JIT debugging is enabled, any unhandled exception will be sent to the JIT debugger registered on the computer rather than be handled by this dialog box.

SJDuffy commented 4 years ago

So uh, I’ve got a third party controller that doesn’t seem to work. It’s called the data frog g1 GameCube controller. Anything I can do to make it work?

SJDuffy commented 4 years ago

CBD56C61-2A15-45E5-84D7-C3C26E6F6A91 Here’s a picture of the controller

mgheith commented 4 years ago

Darn, it appears Im just boned here. I have a PowerA wireless Gamecube controller (should be officially supported by Nintendo), and I've been unable to get it to connect to BetterJoy. I followed the prompt to a T, but nothing seems to do it. Im guessing that unless it is the original Switch Pro Controller, it just doesn't work?

SJDuffy commented 4 years ago

Seems like only Joy-cons and the Pro Controller work properly

calum12 commented 3 years ago

Darn, it appears Im just boned here. I have a PowerA wireless Gamecube controller (should be officially supported by Nintendo), and I've been unable to get it to connect to BetterJoy. I followed the prompt to a T, but nothing seems to do it. Im guessing that unless it is the original Switch Pro Controller, it just doesn't work?

Any third party controller that communicates over BT or USB in the same way as Nintendo SHOULD work fine, but I know that PowerA for example communicate over BT in a different way, the Product and Vendor ID's are different as an example of something that is different between them.

genesis-mata commented 3 years ago

Hi all,

I hope this is useful for you in adding support for the Power A Controllers. I have a Power A Mario Controller (https://www.powera.com/product/powera-enhanced-wired-controller-for-nintendo-switch-mario/) and tested this. I have the following from BetterJoy UI: Starting poll thread. This is a stacktrace that may be useful: System.ArgumentException HResult=0x80070057 Message=received undefined report. This is probably a bug Source=BetterJoyForCemu StackTrace: at BetterJoyForCemu.Joycon.ProcessButtonsAndStick(Byte[] report_buf) in C:\Users\Grigor\source\repos\BetterJoy\BetterJoyForCemu\Joycon.cs:line 763 at BetterJoyForCemu.Joycon.ReceiveRaw() in C:\Users\Grigor\source\repos\BetterJoy\BetterJoyForCemu\Joycon.cs:line 506 at BetterJoyForCemu.Joycon.Poll() in C:\Users\Grigor\source\repos\BetterJoy\BetterJoyForCemu\Joycon.cs:line 734 at System.Threading.ExecutionContext.RunInternal(ExecutionContext executionContext, ContextCallback callback, Object state, Boolean preserveSyncCtx) at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state, Boolean preserveSyncCtx) at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state) at System.Threading.ThreadHelper.ThreadStart()

Hope this can be added soon so I can get to play using this type of controllers. Any required testing, let me know and I can test.

Nytroxela commented 3 years ago

One of the controllers I'm trying is this one: https://www.amazon.com/IINE-Cartoon-Wireless-Controller-Nintendo/dp/B083DNW3P9

Hi, I've tried running the Test4 version and it crashes as well. Steps

  1. Add Controllers -> select "Controller (XBOX 360 for Windows")
  2. Set to Type "Pro Controller"
  3. Hit Apply/Close

The Controller is found, and the icon for it appears, however the program immediately crashes.

HID Guardian shows the following IDs:

HID\VID_045E&PID_028E&IG_00 HID\VID_057E&PID_2009

I get the same results with this controller: https://www.amazon.com/Controller-Nintendo-BEBONCOOL-Wireless-Controllers/dp/B07S4B9HSS

It actually gives the same two IDs as the above controller.

Thanks for taking a look!

i get the same result with this controller https://www.amazon.com/Surge-Switchpad-Wireless-Controller-Nintendo-Switch/dp/B07L44K4RK/?th=1

micoene commented 3 years ago

Hi, Im' having a similar problem with my 3th party Switch pro controller on windows 10. I'm using the master branch code and afther tinkering around a bit it seems the controller is properly connected and the application is able to "locate" the controller and send a rumble command to it. The player light commands do also work.

However when the application tries to send subcommands the controller responds with a x21 reply (which it should) However the most significant bit of the 14th byte of the reply is set to 0, so it seems to be responding with a NACK. And thus the controller also doesnt start sending status reports about the buttons.

I'm not sure how to solve this, so maybe you have an idea :)

Thanks for taking a look !

jku1995 commented 3 years ago

From PowerA Controller. -- COPY ME -- Name: HIDI2C Device Vendor: 1267 Product: 12641 Name: Vendor: 32903 Product: 2590 Name: HIDI2C Device Vendor: 1267 Product: 12641 Name: HIDI2C Device Vendor: 1267 Product: 12641 Name: HIDI2C Device Vendor: 1267 Product: 12641 Name: Wireless Gamepad Vendor: 0 Product: 0 -- COPY ME END --

KeepGood2016 commented 3 years ago

3rd party support would be nice. I have the PowerA BOTW controller pictured at the top of this thread. PowerA seem to have managed to get a license from Nintendo, Sony and Microsoft, their pads are everywhere.

Using the BetterJoyForCemu in the BetterJoy_Test_Ver.zip doesn't seem to report the correct ID's. All of my USB devices are listed with the wrong VID/PID's.

The PowerA controller in the picture at the top of the threads USB ID's are:

VID = 206D PID = A711

This is the wired version, not the wireless version. I'm having a poke around in the source now, see if I can get my head around how it works.

EDIT: Scratch the ID's being wrong, it lists them in decimal instead of hex. EDIT2: After having a look inside the controller and finding no gyro I did a bit of raking online and it turns out there is indeed no gyro support on these pad's so making any changes to BetterJoy for these controllers is pointless. They are standard hid devices so will run with emulators etc fine as they are.

Bindernews commented 3 years ago

I've got a PowerA wireless controller (as seen below), and my problem is that the device is detected and connects (once I enable it as a 3rd party controller) but times out. It works fine when using it normally in Cemu via DirectInput.

After some debugging with the current source code it seems that HIDapi.hid_read_timeout() in Joycon.ReceiveRaw() is always returning -1. I used HIDapi.hid_error() and the error it gives is "The device is not connected". I'm guessing that something in the initialization is causing the device to disconnect. @Davidobot If you want to hop on a Discord call or something maybe we can figure out what's happening

Image

Davidobot commented 3 years ago

@Bindernews I don't have time for an in-depth call right now. The timing-out issue could maybe be solved if you comment out the if statement here: https://github.com/Davidobot/BetterJoy/blob/master/BetterJoyForCemu/Joycon.cs#L811 ie make it send the rumble all the time.

Also see if you remove the thirdParty flag here: https://github.com/Davidobot/BetterJoy/blob/8d5fd675bd3199b6dfa2ad2aae2ef71c6319cce3/BetterJoyForCemu/Joycon.cs#L1122

Maybe the SPI data read is needed to get the controller properly connected. Also maybe try printing the output of https://github.com/Davidobot/BetterJoy/blob/8d5fd675bd3199b6dfa2ad2aae2ef71c6319cce3/BetterJoyForCemu/Joycon.cs#L427

or even remove this if statement and make it pretend that the BT controller is actually connected via USB: https://github.com/Davidobot/BetterJoy/blob/8d5fd675bd3199b6dfa2ad2aae2ef71c6319cce3/BetterJoyForCemu/Joycon.cs#L376