Change NSO N64 Controller mappings from hid-nx-dkms to upstream hid-nintendo#848
Change NSO N64 Controller mappings from hid-nx-dkms to upstream hid-nintendo#848offalynne merged 1 commit intomdqinc:masterfrom 0B001C:nso_hid-nx_hid_nintendo
Conversation
from hid-nx-dkms to upstream hid-nintendo
Thanks, this is always our preference. I will test with the SFC Online pad, as well. |
|
|
static const struct joycon_ctlr_button_mapping snescon_button_mappings[] = {
{ BTN_EAST, JC_BTN_A, },
{ BTN_SOUTH, JC_BTN_B, },
{ BTN_NORTH, JC_BTN_X, },
{ BTN_WEST, JC_BTN_Y, },
{ BTN_TL, JC_BTN_L, },
{ BTN_TR, JC_BTN_R, },
{ BTN_TL2, JC_BTN_ZL, },
{ BTN_TR2, JC_BTN_ZR, },
{ BTN_SELECT, JC_BTN_MINUS, },
{ BTN_START, JC_BTN_PLUS, },
{ /* sentinel */ },
};vs. static const struct nx_con_button_mapping snescon_button_mappings[] = {
{ BTN_SOUTH, NX_CON_BTN_A, },
{ BTN_EAST, NX_CON_BTN_B, },
{ BTN_NORTH, NX_CON_BTN_X, },
{ BTN_WEST, NX_CON_BTN_Y, },
{ BTN_TL, NX_CON_BTN_L, },
{ BTN_TR, NX_CON_BTN_R, },
{ BTN_TL2, NX_CON_BTN_ZL, },
{ BTN_TR2, NX_CON_BTN_ZR, },
{ BTN_SELECT, NX_CON_BTN_MINUS, },
{ BTN_START, NX_CON_BTN_PLUS, },
{ /* sentinel */ },
};hid-nx-dkms maps the face buttons to “Xbox-layout” according to their labels (effectively swapping A↔B and X↔Y) while hid-nintendo maps them according to their position. So at least one of the two existing bluetooth-mappings should have it's buttons swapped the wrong way. (The one with the I btw. tried to keep the N64 mapping as it was before (mapping |
|
A>A, B>B is correct for N64, thanks for following the format |
|
As I understand it this is the generic GUID and mapping seen through HID without a driver and thus should not use the updated driver mapping Edit: I am unable to get the |
|
Ah, sorry you are right, that id shouldn't have been modified in the commit.
That's correct, there's even a comment explaining the reasoning for patching the hardware version wrt. SDL mapping compatibility: |
The original mappings for the NSO N64 controller were created for hid-nx-dkms, an out-of-tree fork of the mainline hid-nintendo driver.
hid-nintendo has since gained support for the NSO controllers in Linux 6.8 while hid-nx-dkms was last updated for 6.1 and seems unmaintained. This open PR suggests that it doesn't even build against kernels >= 6.12 anymore.
Unfortunately the way the buttons are mapped to evdev events is different between these two drivers, requiring an update to the SDL mappings.
As I understand it this results in a breaking change since the GUIDs are the same. This change therefor trades of support for a legacy out-of-tree DKMS module against proper out-of-the-box mappings on modern kernels.
This PR only addresses the N64 controller. The NSO SFC / SNES and Mega Drive / Genesis Controllers are also affected but I don't have access to the hardware to verify any new mappings. The NSO Famicom / NES Controllers should be fine as-is.