ndeadly / MissionControl

Use controllers from other consoles natively on your Nintendo Switch via Bluetooth. No dongles or other external hardware neccessary.
GNU General Public License v2.0
2.48k stars 137 forks source link

[Feature Request]: Nvidia Shield Controller - add rumble support. #846

Open mrdude2478 opened 1 month ago

mrdude2478 commented 1 month ago

Feature Description

Currently Nvidia shield controller (0x0955, 0x7214) is supported for button presses, but there's no code for the rumble motors to work. This controller has 2 motors.

Rationale

Rumble support is good in games and adds to the game experience

Additional Details

I have a couple of these controllers and can test code mods/compile the source for minor changes and to help with testing. If you can point out to a capture program to log the motor commands I can let you know what readings I get if that information would be helpfull.

ndeadly commented 1 month ago

You can capture packets on a PC using Wireshark. You can capture either USB or Bluetooth traffic, but you will need to make sure you install the optional USB capture driver during the initial setup (yes, for Bluetooth too). It might also be enough to grab the hid report descriptor, but this can probably be seen in the packet capture too.

mrdude2478 commented 1 month ago

Thanks for the fast reply, also in nvidia_shield_controller.cpp, you have A B mixed and Y X mixed - correct code:

m_buttons.A = src->input0x01.buttons.A;
m_buttons.B = src->input0x01.buttons.B;
m_buttons.X = src->input0x01.buttons.X;
m_buttons.Y = src->input0x01.buttons.Y;

There was no need to remap those, just changing the above fixes so the correct buttons are used.

I also have an Nvidia Shield TV, it might be faster just using an Android app to capture the hex values for the buttons as I think there's an app for that already made, I'll try wireshark though as I've not used it before.

ndeadly commented 1 month ago

The mapping is intentional. It's supposed to mirror the relative location of the buttons on a Pro Controller, not what's printed on them.

mrdude2478 commented 1 month ago

OK, thanks - I actually prefer them to be what's printed on the buttons. Just a personal choice though so no worries.