SDL icon indicating copy to clipboard operation
SDL copied to clipboard

Add mapping for Nvidia controller (2019)

Open Arias800 opened this issue 1 year ago • 2 comments

0500b30c550900001472000001000000 is the ID when the controller is connected via Bluetooth and 0300b30c550900001472000011010000 is for USB mode.

Tested by setting "SDL_GAMECONTROLLERCONFIG" in some games.

Arias800 avatar Jul 22 '24 16:07 Arias800

The new entry has an identical GUID to the existing one, but uses a completely different mapping: old:

    "03000000550900001472000011010000,NVIDIA Controller v01.04,a:b0,b:b1,back:b14,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b17,leftshoulder:b4,leftstick:b7,lefttrigger:a3,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b8,righttrigger:a4,rightx:a2,righty:a5,start:b6,x:b2,y:b3,",

new (without CRC):

    "03000000550900001472000011010000,NVIDIA Controller v01.04,a:b0,b:b1,back:b7,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b4,leftshoulder:b5,leftstick:b10,lefttrigger:a3,leftx:a0,lefty:a1,misc1:b8,rightshoulder:b6,rightstick:b11,righttrigger:a4,rightx:a2,righty:a5,start:b9,x:b2,y:b3,",

slouken avatar Jul 28 '24 00:07 slouken

I didn't know that you had to replace the "b30c" part of the string with "0". Homewer, the old mapping don't work on my side. For example, the right trigger is mapped to the start button. I did the mapping using the testcontroller from SDL 3. image

Arias800 avatar Aug 01 '24 07:08 Arias800

I forgot to update the commit. I deleted the duplicate entry.

Arias800 avatar Sep 10 '24 08:09 Arias800

I confirmed that the existing mapping was mostly correct for my NVIDIA Shield Controller v1.04, and added an entry for Bluetooth mode. This mapping works for both v1.25 and v1.35 firmware versions.

Can you take a picture of the back of your controller? I suspect we have different models. Here's mine: IMG_3883

slouken avatar Dec 27 '24 20:12 slouken

If we have the same model, maybe it's our Linux kernel that's different? What is the output of cat /etc/os-release; uname -a?

slouken avatar Dec 27 '24 23:12 slouken

I can't take a better photo, but I hope it's readable. If not, I can type it out for you. IMG_0086

Result of cat /etc/os-release; uname -a :

NAME="CachyOS Linux"
PRETTY_NAME="CachyOS"
ID=cachyos
ID_LIKE=arch
BUILD_ID=rolling
ANSI_COLOR="38;2;23;147;209"
HOME_URL="https://cachyos.org/"
DOCUMENTATION_URL="https://wiki.cachyos.org/"
SUPPORT_URL="https://discuss.cachyos.org/"
BUG_REPORT_URL="https://github.com/cachyos"
PRIVACY_POLICY_URL="https://terms.archlinux.org/docs/privacy-policy/"
LOGO=cachyos
Linux pc 6.13.6-2-cachyos #1 SMP PREEMPT_DYNAMIC Sat, 08 Mar 2025 02:32:13 +0000 x86_64 GNU/Linux

Arias800 avatar Mar 09 '25 09:03 Arias800