HID controller mapping #282
-
Looking over documentation and code I am a bit perplexed as to where details on expected input or controller mappings is located. In my case I am building a wireless controller from scratch so it's not an existing off-shelf item. I already have the controller connecting and sending input successfully for some buttons however a few are escaping me so any pointers here would be appreciated. Contextually I am hoping to find something similar to this if it exists: |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments
-
Its going to use the HID descriptor and try to fingerprint it to an existing one, if that fail it will use the most common pattern for the buttons bitfield. Honestly as I tell everyone making controller just use the Xbox X|S HID descriptor as is. And just populate unused field with neutral value for axes. See descriptor here: We really don't need yet another custom descriptor. You can use the "BlueRetro_pad_test.bin" firmware to display most buttons state to the serial console. Also make sure to to config your terminal properly to make it readable: |
Beta Was this translation helpful? Give feedback.
-
Thanks, this is exactly what I was looking for to emulate a "known working" controller in HID. Appreciate the help! |
Beta Was this translation helpful? Give feedback.
Its going to use the HID descriptor and try to fingerprint it to an existing one, if that fail it will use the most common pattern for the buttons bitfield.
Honestly as I tell everyone making controller just use the Xbox X|S HID descriptor as is. And just populate unused field with neutral value for axes.
See descriptor here:
https://github.com/darthcloud/bt_traces/blob/master/hid_descriptors/xb_series_xs.txt
We really don't need yet another custom descriptor.
You can use the "BlueRetro_pad_test.bin" firmware to display most buttons state to the serial console.
Also make sure to to config your terminal properly to make it readable:
https://github.com/darthcloud/BlueRetro/wiki/Getting-Blue…