BetterJoy icon indicating copy to clipboard operation
BetterJoy copied to clipboard

[ENHANCEMENT] Support for SENZE SZ-912B (Wireless Switch Pro Controller)

Open JMVS opened this issue 4 years ago • 11 comments

I would like to know if it is possible to add support to the SENZE SZ-912B Wireless Switch Pro Controller.

I actually see it appearing on the main window, but doesn't seem to respond. Only a few times the controller icon shown green and if I pressed the Locate "button" the controller rumbled but that's it. This was tested with version 6.3 with both ViGEm drivers only and with HIDGuardian.

This is the main screen with default options with ViGEm drivers only 2020-06-13 (2) I don't know what's the proper behavior of the Conected Controllers icon, but only sometimes shows as green. In this gray state, the "Locate" button does nothing. When I lunch Yuzu to assing buttons it sometimes shows up green: 2020-06-13 (3) The "Locate" button works but I cannot assing buttons to the controller options in Yuzu.

Reading other issues I saw a way to help you add new controllers. This is what I've done so far:

I've dowloaded this to get this data:

-- COPY ME -- Name: USB OPTICAL MOUSE Vendor: 2362 Product: 9505 Name: Back-UPS XS 1100CI FW:920.T2 .I USB FW:T3 Vendor: 1309 Product: 2 Name: SAGE AirMouse Vendor: 16396 Product: 4218 Name: Natural® Ergonomic Keyboard 4000 Vendor: 1118 Product: 219 Name: Controller (XBOX 360 For Windows) Vendor: 1118 Product: 654 Name: SAGE AirMouse Vendor: 16396 Product: 4218 Name: SAGE AirMouse Vendor: 16396 Product: 4218 Name: SAGE AirMouse Vendor: 16396 Product: 4218 Name: SAGE AirMouse Vendor: 16396 Product: 4218 Name: SAGE AirMouse Vendor: 16396 Product: 4218 Name: Wireless Gamepad Vendor: 1406 Product: 8201 Name: Natural® Ergonomic Keyboard 4000 Vendor: 1118 Product: 219 -- COPY ME END --

And tried the controller with this test version. BetterJoy_3rdP_Test4: 2020-06-13 With the default options and with ViGEm only I get the same results as 6.3 stable version.

I went on to add the controller in "Add controller" and setting the NonOriginalController parameter to true: 2020-06-13 (1) Clicked Apply and even restarted BetterJoy. Same results.

Is there anything else I can try?

Some notes:

  1. The controller supports several modes:
  • Switch Controller (this is the one I'm using)
  • Android Gamepad (in the PC is like a Keyboard/Mouse thing)
  • PS3 Gamepad (tried with ScpToolkit with no luck as wireless)
  • Wired USB (this method works right out of the box)
  1. In Wired USB mode I don't need any external programs and I can assing buttons to Yuzu and play with no problems. Obviously the idea is to use it wireless.
  2. When I try the "Calibrate" button in any of the BetterJoy version tested I get and OutOfRange Exception: 2020-06-13 (4) 2020-06-13 (5)
************** Texto de la excepción **************
System.ArgumentOutOfRangeException: El índice estaba fuera del intervalo. Debe ser un valor no negativo e inferior al tamaño de la colección.
Nombre del parámetro: index
   en System.ThrowHelper.ThrowArgumentOutOfRangeException(ExceptionArgument argument, ExceptionResource resource)
   en System.Collections.Generic.List`1.get_Item(Int32 index)
   en BetterJoyForCemu.MainForm.quickselect(List`1 l, Int32 k, Func`2 pivot_fn) en C:\Users\Grigor\source\repos\BetterJoy\BetterJoyForCemu\MainForm.cs:línea 402
   en BetterJoyForCemu.MainForm.quickselect_median(List`1 l, Func`2 pivot_fn) en C:\Users\Grigor\source\repos\BetterJoy\BetterJoyForCemu\MainForm.cs:línea 394
   en BetterJoyForCemu.MainForm.CalcData(Object sender, EventArgs e) en C:\Users\Grigor\source\repos\BetterJoy\BetterJoyForCemu\MainForm.cs:línea 374
   en System.Windows.Forms.Timer.OnTick(EventArgs e)
   en System.Windows.Forms.Timer.TimerNativeWindow.WndProc(Message& m)
   en System.Windows.Forms.NativeWindow.Callback(IntPtr hWnd, Int32 msg, IntPtr wparam, IntPtr lparam)


************** Ensamblados cargados **************
mscorlib
    Versión del ensamblado: 4.0.0.0
    Versión Win32: 4.8.4180.0 built by: NET48REL1LAST_B
    Código base: file:///C:/Windows/Microsoft.NET/Framework64/v4.0.30319/mscorlib.dll
----------------------------------------
BetterJoyForCemu
    Versión del ensamblado: 1.0.0.0
    Versión Win32: 1.0.0.0
    Código base: file:///D:/U/JMVS/OneDrive/Documents/Software/Emulaci%C3%B3n/BetterJoy_3rdP_Test4/BetterJoyForCemu.exe
----------------------------------------
System
    Versión del ensamblado: 4.0.0.0
    Versión Win32: 4.8.4084.0 built by: NET48REL1
    Código base: file:///C:/WINDOWS/Microsoft.Net/assembly/GAC_MSIL/System/v4.0_4.0.0.0__b77a5c561934e089/System.dll
----------------------------------------
System.Net.Http
    Versión del ensamblado: 4.0.0.0
    Versión Win32: 4.8.4084.0 built by: NET48REL1
    Código base: file:///C:/WINDOWS/Microsoft.Net/assembly/GAC_MSIL/System.Net.Http/v4.0_4.0.0.0__b03f5f7f11d50a3a/System.Net.Http.dll
----------------------------------------
System.Core
    Versión del ensamblado: 4.0.0.0
    Versión Win32: 4.8.4180.0 built by: NET48REL1LAST_B
    Código base: file:///C:/WINDOWS/Microsoft.Net/assembly/GAC_MSIL/System.Core/v4.0_4.0.0.0__b77a5c561934e089/System.Core.dll
----------------------------------------
System.Configuration
    Versión del ensamblado: 4.0.0.0
    Versión Win32: 4.8.4084.0 built by: NET48REL1
    Código base: file:///C:/WINDOWS/Microsoft.Net/assembly/GAC_MSIL/System.Configuration/v4.0_4.0.0.0__b03f5f7f11d50a3a/System.Configuration.dll
----------------------------------------
System.Windows.Forms
    Versión del ensamblado: 4.0.0.0
    Versión Win32: 4.8.4084.0 built by: NET48REL1
    Código base: file:///C:/WINDOWS/Microsoft.Net/assembly/GAC_MSIL/System.Windows.Forms/v4.0_4.0.0.0__b77a5c561934e089/System.Windows.Forms.dll
----------------------------------------
System.Drawing
    Versión del ensamblado: 4.0.0.0
    Versión Win32: 4.8.4084.0 built by: NET48REL1
    Código base: file:///C:/WINDOWS/Microsoft.Net/assembly/GAC_MSIL/System.Drawing/v4.0_4.0.0.0__b03f5f7f11d50a3a/System.Drawing.dll
----------------------------------------
System.Xml
    Versión del ensamblado: 4.0.0.0
    Versión Win32: 4.8.4084.0 built by: NET48REL1
    Código base: file:///C:/WINDOWS/Microsoft.Net/assembly/GAC_MSIL/System.Xml/v4.0_4.0.0.0__b77a5c561934e089/System.Xml.dll
----------------------------------------
System.ServiceProcess
    Versión del ensamblado: 4.0.0.0
    Versión Win32: 4.8.4084.0 built by: NET48REL1
    Código base: file:///C:/WINDOWS/Microsoft.Net/assembly/GAC_MSIL/System.ServiceProcess/v4.0_4.0.0.0__b03f5f7f11d50a3a/System.ServiceProcess.dll
----------------------------------------
System.Numerics
    Versión del ensamblado: 4.0.0.0
    Versión Win32: 4.8.4084.0 built by: NET48REL1
    Código base: file:///C:/WINDOWS/Microsoft.Net/assembly/GAC_MSIL/System.Numerics/v4.0_4.0.0.0__b77a5c561934e089/System.Numerics.dll
----------------------------------------
WindowsInput
    Versión del ensamblado: 6.1.1.0
    Versión Win32: 6.1.1.0
    Código base: file:///D:/U/JMVS/OneDrive/Documents/Software/Emulaci%C3%B3n/BetterJoy_3rdP_Test4/WindowsInput.DLL
----------------------------------------
Nefarius.ViGEm.Client
    Versión del ensamblado: 1.16.150.0
    Versión Win32: 1.16.150
    Código base: file:///D:/U/JMVS/OneDrive/Documents/Software/Emulaci%C3%B3n/BetterJoy_3rdP_Test4/Nefarius.ViGEm.Client.DLL
----------------------------------------
WindowsBase
    Versión del ensamblado: 4.0.0.0
    Versión Win32: 4.8.4180.0 built by: NET48REL1LAST_B
    Código base: file:///C:/WINDOWS/Microsoft.Net/assembly/GAC_MSIL/WindowsBase/v4.0_4.0.0.0__31bf3856ad364e35/WindowsBase.dll
----------------------------------------
Crc32.NET
    Versión del ensamblado: 1.0.0.0
    Versión Win32: 1.2.0.5
    Código base: file:///D:/U/JMVS/OneDrive/Documents/Software/Emulaci%C3%B3n/BetterJoy_3rdP_Test4/Crc32.NET.DLL
----------------------------------------
mscorlib.resources
    Versión del ensamblado: 4.0.0.0
    Versión Win32: 4.8.4084.0 built by: NET48REL1
    Código base: file:///C:/WINDOWS/Microsoft.Net/assembly/GAC_MSIL/mscorlib.resources/v4.0_4.0.0.0_es_b77a5c561934e089/mscorlib.resources.dll
----------------------------------------
System.Windows.Forms.resources
    Versión del ensamblado: 4.0.0.0
    Versión Win32: 4.8.4084.0 built by: NET48REL1
    Código base: file:///C:/WINDOWS/Microsoft.Net/assembly/GAC_MSIL/System.Windows.Forms.resources/v4.0_4.0.0.0_es_b77a5c561934e089/System.Windows.Forms.resources.dll
----------------------------------------

JMVS avatar Jun 13 '20 15:06 JMVS

Wow, that's a detailed write-up!

So the fact that the controller is seen without using the new "Add Controllers" button means that it should work with older BetterJoy version. There have been quite a few changes to the way controllers are handled and connections are maintained, which seem to be tailored specifically to the official controllers.

Older versions of BetterJoy were laggy for some people, but seem to maintain a more solid connection. So try the v6 nightly here - https://drive.google.com/open?id=1x3jxWG9DQMkpMGu864nn0gYNZZR80sjX or v5 from the releases tab!

Davidobot avatar Jun 13 '20 15:06 Davidobot

Thanks for the prompt reply! I've tried with both versions and it produces the same results! :(

6.0 nightly / With default options: 2020-06-13 (6)

6.0 nightly / With HIDGuard disabled and Yuzu started: 2020-06-13 (7)

5.0 / With HIDGuard disabled (crashed with default options): 2020-06-13 (8)

The "Locate" button didn't seem to work in any of the cases.

Any other suggestions?

JMVS avatar Jun 13 '20 16:06 JMVS

I've managed to control Yuzu with the control as Keyboard/Mouse combo, not ideal, but works. No rumble, no analog sticks nor gyroscope.

Any ideas on how I can proceed further? Thanks

JMVS avatar Jun 18 '20 20:06 JMVS

Hi there, I'm having the exact same issue but with a diferent third-party controller (CHEREEKI CG-KN3).

If it helps at all, the reason for the OutOfRangeException when calibrating is that when selecting the pivot element in the quickselect method in MainForm.cs the lists xA, xG, yA, yG, zA and zG are all empty, so trying to access an element in them causes the exception.

malinoal avatar Jun 30 '20 15:06 malinoal

I wasn't able to advance any further with this. I guess is up to @Davidobot if he wants to dig further into this. I'm sure he's probably busy with other things and obviously not having the actual controller itself makes it difficult to diagnose.

As I mentioned eirler, in my case I connect as keyboard/mouse combo to the PC. At least I get basic functionallity out of it.

@malinoal Please update if you find any solution for this.

JMVS avatar Jun 30 '20 18:06 JMVS

If it helps at all, the reason for the OutOfRangeException when calibrating is that when selecting the pivot element in the quickselect method in MainForm.cs the lists xA, xG, yA, yG, zA and zG are all empty, so trying to access an element in them causes the exception.

I don't use the quick select method. Do turn off the nonOriginalControllersetting if you have it on. That's a separate older implementation.

I wasn't able to advance any further with this. I guess is up to @Davidobot if he wants to dig further into this. I'm sure he's probably busy with other things and obviously not having the actual controller itself makes it difficult to diagnose.

Yeah, I'm quite busy these days. Started my summer internship and that's been eating away at most of my time (plus rowing training). Sorry! I'll get back to this ASAP.

Davidobot avatar Jun 30 '20 20:06 Davidobot

@Davidobot Sorry to bother you again. Is there any new options or betas that I could try? Thanks

JMVS avatar Sep 05 '20 14:09 JMVS

@JMVS Nope, none so far - sorry! Been a bit busy with work and later rowing. Will maybe get back into this soon. Dissertations don't write themselves haha ^^;

Davidobot avatar Sep 05 '20 15:09 Davidobot

Hi @Davidobot, just checking in to say that I've tried with Version 6.4β with ViGEmBus drivers 1.17.333 and I get the same results. I'm trying in the different computer now, but shows the same behavior as previously stated. I'm running Windows 10 x64, so I installed ViGEmBus x64. I'm assuming this is correct. Can you confirm? Thanks

JMVS avatar Feb 18 '21 00:02 JMVS

@JMVS try https://github.com/Davidobot/BetterJoy/pull/663#issuecomment-759652125

Davidobot avatar Feb 18 '21 07:02 Davidobot

Hi @JMVS, were you able to make the Senze joystick work with BetterJoy? Let me tell you that I have 4 of these same joysticks and I make them work at the same time in Android mode (Home + Y) via bluetooth in Windows 10. But of course the Gyroscope does not work and neither does the Rumble, in that mode that is not the Switch mode. I am also from Argentina. If you want more comfort to answer me, you can send me an audio 260 4565610 I'm from San Rafael. Mendoza. I await your response. From already thank you very much!

Hola @JMVS, pudiste hacer funcionar el joystick Senze con BetterJoy?? Te comento que tengo 4 de estos joysticks iguales y los hago funcionar al mismo tiempo en modo Android (Home + Y) por bluetooth en Windows 10. Pero claro no funciona el Giroscopio y tampoco el Rumble, en ese modo que No es el modo Switch. También soy de argentina. Si querés más comodidad para responderme, podés mandarme un audio 260 4565610 soy de San Rafael. Mendoza. Aguardo tu respuesta. Desde ya muchas gracias!

David M.

DemArgentina avatar Apr 27 '22 15:04 DemArgentina