d3xMachina / BetterJoy

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

[ENHANCEMENT] - Add some way to use 3rd party unsupported joycons, example Nyxi Hyperion or Linyuvo KS42-2 #7

Closed Heeervas closed 7 months ago

Heeervas commented 10 months ago

Is your feature request related to a problem? Please describe. Unable to use these joycons, since they appear in horizontal mode and when changing it apps crashes.

Describe the solution you'd like Make them available somehow...

franklx commented 7 months ago

I got a NYXI Hyperion Pro controller and as previously reported it doesn't work with BetterJoy (it doesn't work even with joycon-driver and XJoy.

As stated here the controller doesn't seem to support standard mode but it can't be because in simple HID analog sticks work are set in digital mode.

I did many tests and I discovered that the Hyperion ignores any subcommand sent and always responds with 0x3F (simple HID) packets; I tried all documented commands and none is working (even tried resetting and re-pairing controllers many times).

A weird thing happens at controllers power on: the init phase with rolling leds seem emulated (rolling leds stops after a few seconds even if no init command is sent).

Obviously the Hyperion works perfectly when connected to the Nintendo Switch even with wireless pairing.

d3xMachina commented 7 months ago

I'm working on the support for the simple HID reports for the Pro controller and the Joycons (mostly done). Hopefully it will also work with the Nyxi Hyperion controller.

I don't know how to add motion support thought since I don't see how to get the motion datas without a standard full report... So maybe :

franklx commented 7 months ago

The simple HID mode works but is quite useless with the NYXI because in that mode it doesn't output analog sticks values. Passing some "random" rumble data as part of sub-commands triggers controller vibrations: I guess commands are ignored deliberately or because of some obscure bug. I tried setting different lengths in hid_write calls but the hidapi library always writes 49 bytes (return value of the call is always 49 no matter the real length of data). According to hidapi source code length is fixed by report.

franklx commented 7 months ago

I did many tests and I finally managed to make the Hyperion Pro work with Steam on PC. The solution is the dumbest thing you can think about: device name. It's sufficient to set Nintendo Switch as bluetooth name and everything works perfectly.

d3xMachina commented 7 months ago

Good job finding that out! It's really weird they added this limitation.

Here are the instructions to change the bluetooth device name in case anyone else have the same issue.

Heeervas commented 5 months ago

Hi! Do you change the device in one or the two parts? I sold this device but if I remember correctly it was recognising it as 2.

Also, does this fix extends to other devices?

Thanks!