FIX94 / Nintendont

A Wii Homebrew Project to play GC Games on Wii and vWii on Wii U
1.95k stars 326 forks source link

Fix for issue 643 - Support multiple HID controllers. #1088

Closed gilesep closed 1 year ago

gilesep commented 1 year ago

Hi Nintendont team,

Thank you so much for developing Nintendont.

Please could you consider merging this PR? What it does is to fix issue 643 (related issue 213) and allow us to use splitters like this one (https://m.media-amazon.com/images/W/IMAGERENDERING_521856-T1/images/I/71HtURmbXOL._AC_SX522_.jpg) so we can have multiple gamepads working at the same time.

The splitters can be configured via the ini controller configuration files using a new mode "MultiIn=4". An example ini file called "controller_psx_ps2_splitter.ini" has been added, which works for the PSX/PS2 splitter I have at home.

I decided to introduce a new "MultiIn=4" mode, instead of just changing the code for the existing "MultiIn=2" mode, in case anyone was relying on the existing behavior and because I am using the MultiInValue differently (to represent the number of controllers supported instead of the index of the first controller).

If you need a binary to approve the PR, I have made one at https://github.com/gilesep/Nintendont-gi/releases/tag/v1.0.0.

I am not very familiar with GitHub or contributing to open source projects, so I hope this PR is ok.

Best wishes, Gi

carnage702 commented 1 year ago

if you ever figure out how to work with the rumble values in hid test let us know, fix94 made the single example and no one knows how it works tough.

gilesep commented 1 year ago

Hi @carnage702,

Thank you very much for reviewing and merging these changes. It was a positive first experience of GitHub and open source community coding for me. :)

Unfortunately, I don't know much about the rumble values and probably can't help with this, but I will let you know if do I figure anything out in the future. I think the particular blue splitter I used to test my two analogue PS1 controllers doesn't support rumble. I do have a PS4 controller at home that does support rumble, but despite looking at the code a little today, I do not understand how to get the rumble to work with Nintendont.

Best wishes, Gi

stanwebber commented 1 month ago

i can confirm this fix works on 0810:0001 & 0e8f:3013 adapters (with working rumble). the distributed 0810_0001.ini should be updated to multiin=4, multiinvalue=2. there is no controller.ini for 0e8f:3013, but it works with 0810_0001.ini after updating the vid:pid. great work!