o0Zz / sys-con

Nintendo Switch sysmodule that allows support for third-party controllers (XBox, PSX, PC, ...)
GNU General Public License v3.0
74 stars 6 forks source link

GameCube Controller adapter doesn't work when using sys-con #2

Closed Jayacheal closed 3 months ago

Jayacheal commented 5 months ago

I'm using Mayflash's GameCube adapter and when sys-con is on the controller will not work but if I switch the adapter to PC mode it gets recognized by sys-con, though no buttons are mapped but I should probably be able to map them like any other generic usb controller. is there a way to prevent sys-con from messing with the GameCube adapter or any other adapter made for the Switch? maybe if I could somehow disable the Hardware IDs that I don't want sys-con interfering with.

o0Zz commented 5 months ago

Interresting issue, I will have a look of that, to be honest I didn't test an official remote control with sys-con. I will try that

o0Zz commented 5 months ago

A discovery_mode has been added in the configuration file in order to avoid to detect native switch controller. It will be available in the next release probably this weekend.

o0Zz commented 5 months ago

The latest release is available -> https://github.com/o0Zz/sys-con/releases/tag/1.1.0 You need to install it and edit the config.ini in order to set discovery_mode=1 and reboot the console. I don't have your exact controller so I'm not sure if it will definitively fix your issue, If the issue is still present, do not hesitate to reopen the ticket.

Jayacheal commented 5 months ago

I've updated to 1.1.0 but setting discovery_mode to 1 makes it so that I can't use the generic USB controllers I've added, so it's basically like not having sys-con at all since those are the only two controllers I can use and test. when setting it to 0 they work but with the same problem as before of course.

these are the lines I've added to the config.ini file, again, they work with discovery_mode off so I don't think I'm doing anything wrong (but you never know):

[0079-0006] ;Foyu Controller color_body = #535260FF color_buttons = #393143FF color_leftGrip = #674597FF color_rightGrip = #674597FF B=3 A=2 Y=4 X=1 L=5 R=6 ZL=7 ZR=8 minus=9 plus=10 lstick_click=11 rstick_click=12

[07b5-0213] ;Activbb X6-34U Controller color_body = #301515FF color_buttons = #184843FF color_leftGrip = #191919FF color_rightGrip = #191919FF B=3 A=4 Y=1 X=2 L=6 R=8 minus=5 plus=7

Jayacheal commented 5 months ago

If the issue is still present, do not hesitate to reopen the ticket.

also I can't reopen this issue

o0Zz commented 5 months ago

Yes, this is something I noticed yesterday, because of a limitation on horizon OS, only the 3 first HID will be took into consideration. I will try to improve that. As a workaround, you can move your generic HID to the begining of the config.ini file and it should works.

Typically move

[0079-0006] ;Foyu Controller
color_body = #535260FF
color_buttons = #393143FF
color_leftGrip = #674597FF
color_rightGrip = #674597FF
B=3
A=2
Y=4
X=1
L=5
R=6
ZL=7
ZR=8
minus=9
plus=10
lstick_click=11
rstick_click=12

[07b5-0213] ;Activbb X6-34U Controller
color_body = #301515FF
color_buttons = #184843FF
color_leftGrip = #191919FF
color_rightGrip = #191919FF
B=3
A=4
Y=1
X=2
L=6
R=8
minus=5
plus=7

Just after [default]

Jayacheal commented 5 months ago

it worked, thanks! hope you can circumvent this limitation somehow because this is already pretty close to being perfect.

o0Zz commented 5 months ago

FYI on the latest release I tried to improve this feature. At the end I found no way to bypass the event limitations but I added a way to select which controller your want to discover and you have a way to play with wildcard(*) in order discover all controller for a specific vendor id for example.

Here are the new parameters:

;Discovery mode:
;0: Discover All Generic HID + XBOX Controllers (Cause issue with official USB switch controllers)
;1: Discover known VID and/or PID (Maximum 2) + XBOX Controllers (Fix issue with official controllers)
;2: Discover only known VID and/or PID (Maximum 3) (Fix issue with official controllers)
;Note: If you are not sure which mode to use, use 0
discovery_mode=0
;For discovery_mode=1 or discovery_mode=2 you need to specify the VID and/or PID of the controllers you want to discover
;In below example, it will discover all Sony controller (PS) (054c-*) and Hori mini Arcade Stick (0f0d-0088)
;This list is limited to 2 or 3 depending which mode you choose - if you set more than 2 or 3, it will be ignored and only the first 2 or 3 will be used
discovery_vidpid=054c-*,0f0d-0088
texita commented 5 months ago

i know this is closed, but don't want open another issue because i think this is similar. well, i have 2 gc adapters image photo_2024-06-23_12-31-07

both of them are working in pc mode, here is my mapping for them:

[0601-0101] ;GC controller adapter HS-WU025 (pc mode) b=3 a=2 x=1 y=4 l=5 r=6 zr=8 plus=10 dpad_up=13 dpad_right=14

[0079-1846] ;GC controller adapter BX-W201C (pc mode) b=3 a=2 x=1 y=4 l=5 r=6 zr=8 plus=10 dpad_up=13 dpad_right=14

my problem is when i connect them in switch mode, i get this PID/VID, the same on both

[057e-0337] ;GC controller adapter HS-WU025 or BX-W201C (switch mode, not working) b=1 a=2 x=3 y=4 l=5 r=6 zl=7 zr=8 minus=9 plus=10 capture=11 home=12 lstick_click=13 rstick_click=14

i'm essentially using gc controllers with other pads in discovery mode 0 and pc mode. In this way in smash bros these pads are shown as pro controllers, so "problems" with R and ZR and players profiles. My question is, with the old sys-con i was able tu use the same adapter in switch mode, this sys-con is recognizing the PID/VID in switch mode, but can't use pads (similar to what was happening with atomic adapter?) is there a way to enable them?

And for the pc mode an idea: with gc controllers we have only START/+ button, was thinking if the home emulation combination (another great feature) could be pressing plus+R and maybe capture plus+L :D

thanks and sorry for bothering you again!

o0Zz commented 5 months ago

Let's re-open this issue to discuss a bit more about it.

texita commented 5 months ago

here the logs and my config log+config.zip

o0Zz commented 5 months ago

Ok, the HID report descriptor is not common, it doesn't provide a joystick/gamepad profile but provide a "game ctrls". I'm not really sure how to interpret that. Could you try to plug this controller on windows and send me a screenshot of what you see in joy.cpl ? (In switch mode) Thanks

texita commented 5 months ago

this is what i got, empty image

texita commented 5 months ago

for smash bros, if you go to the control settings profile (as you can see in the screen is per player, i already have a workaround, create 2 profiles per player, but was messing up all the statistics XD)

in the first screen i'm using the gc adapter in pc-mode with sys-con, the game show that i'm using a pro controller 2024062314344600-0E7DF678130F4F0FA2C88AE72B47AFDF

settings for the pro controller

2024062314355600-0E7DF678130F4F0FA2C88AE72B47AFDF

this screen show gc adapter in switch mode with old sys-con (or sys-con disabled), the game correctly show that i'm using a gc controller

2024062314353000-0E7DF678130F4F0FA2C88AE72B47AFDF

settings for the gc controller

2024062314354400-0E7DF678130F4F0FA2C88AE72B47AFDF

o0Zz commented 5 months ago

Ok im not surprise windows don't know how to interpret that neither. Thus, in switch mode we will probably have to interpret data like a switch. I will see if we can add a driver=switch in somehow but it will require some times.let the issue open i will check later how to handle that

o0Zz commented 5 months ago

Hi, a quick update:

  1. Here is an update that allow you to set the button combinaison you want to simulate Home or Capture. You need to add something like that:

    simulate_home=plus+dpad_up
    simulate_capture=plus+dpad_down
  2. Regarding your smash bros issue, I think we can workaround it. In this version I also added a way to configure the controller_type. In other word you will be able to simulate a GC controller In the configuration you need to add:

    controller_type=gamecube

    I'm not sure if it will work, because on my side, the switch interface display a pro controller and not a "gamecube" when I set it, So, I don't know if it's expected.

  3. Regarding difference between old sys-con and this new one. What you mention is correct, if you want to have the exact same behavior than previous sys-con you have to set discovery_mode to 1 and it will not try to take control on your GC controller. However, you will also not benefit from all controllers, you will only be able to select/filter few of them by vid and/or pid - Unfortunatly, that's a limitation of the Horizon OS and I have not way to by pass it.

sys-con-1.2.1+8-ATMOSPHERE-1.7.x.zip

texita commented 5 months ago

Perfect! Everything is working with controller_type=gamecube. In smash i can see that i'm using a gc controller :) Note: In gamecube mode the buttons combination for capture and home is not working, but thats ok, that type of controllers can't have those buttons/function in any case. Only a display issue, now all the pads are shown with the battery icon in the sync menu.

o0Zz commented 5 months ago

I will have a check for buttons combination because they are suppose to work whatever the controller. Could you share the configuration you used for the simulate_capture simulate_home ? thanks

texita commented 5 months ago

Indeed is working in every controller, but if you put this parameter controller_type=gamecube in that controller, home and capture are not working. I've tried only removing controller_type=gamecube from the controller config and capture and home start working again

o0Zz commented 5 months ago

Ok got it. its probably a switch limitation. The switch probably detect that this controller dont have home button and thus dont accept home from this controller (even if sys con send it)

o0Zz commented 5 months ago

I close this issue for now, a new release is available https://github.com/o0Zz/sys-con/releases/tag/1.2.2. It should address all issues/improvments mentionned in this ticket. Thank you @texita

Feel free to re-open it if something is missing

texita commented 5 months ago

Only a display issue, now all the pads are shown with the battery icon in the sync menu.

only to advise you without open a new issue (because is not a real issue, and don't reopen this one pls XD) this still persist.

texita commented 3 months ago

I'm here again for testing pourpose and some updates on gc adapters in switch mode or official ones.

So, i've tried sys-con 1.3.0 with discovery_mode=1 thinking to have the same behavior of old sys-con, but nothing worked. i'm uploading my config and logs to see if i'm doing something wrong. config+log.zip

Going further, i noticed that all these adapters, shares the same VID/PID 057e-0337, and they are called WUP-028 Here the official ones (without PC mode) https://www.amazon.com/Gamecube-Controller-Connection-Tap-Wii-U/dp/B00O9GPB00/ https://www.amazon.com/Nintendo-GameCube-Controller-Adapter-without-English/dp/B07HC15QNZ

So i started looking around, and i see that is possible to use them on the pc, and is pretty easy. image https://it.dolphin-emu.org/docs/guides/how-use-official-gc-controller-adapter-wii-u/#Windows

In this dolphin guide they say to use Zadig https://github.com/pbatard/libwdi

What i've found that use Zadig and (as the one for the pro controller, ViGEmBus https://github.com/nefarius/ViGEmBus) Is Delfinovin https://github.com/Struggleton/Delfinovin In this way i can use the gc adapters in switch mode on the pc

Here the video that's is working on the pc with Delfinovin

https://github.com/user-attachments/assets/187480d1-9c35-4db8-a6e4-9a6c3b8ff656

Moreover, i haven't tried this on the pc, but maybe can be useful, some links to Vjoy

o0Zz commented 3 months ago

Could you try to remove in your config.ini this:

discovery_vidpid=057e-0337

in fact you explicitly ask sys-con to not detect HID/switch device and at the same time you ask it to discover this controller. That the reason why sys-con discover it and that's why it don't work like the original sys-con. To have the same behavior as the original syscon you need to set:

discovery_mode=1
discovery_vidpid=

let me know if its better

texita commented 3 months ago

Working! So you can put in tested controllers WUP-028 and all gc adapters in wiiU/switch mode are working in discovery_mode=1 Thanks again

o0Zz commented 3 months ago

Perfect, good news. Thanks