Wiki source code of GreenAsiaGamepad
Version 1.1 by David De La Harpe Golden on 2020/11/29 21:57
Show last authors
| author | version | line-number | content |
|---|---|---|---|
| 1 | Remapping with xboxdrv | ||
| 2 | |||
| 3 | I have a couple of these old generic usb PlayStation 1/2 DualShock style controllers I picked up years ago, quite robust and still going strong. Unfortunately missing some modern controller buttons (like menu/guide) and features, but if you want to remap it with [[xboxdrv>>https://xboxdrv.gitlab.io/]] to pseudo-xbox360 for compatibility with certain games on Linux, well the following works nicely for me. Other controllers may need different mappings, obviously. | ||
| 4 | |||
| 5 | {{code language="sh"}} | ||
| 6 | xboxdrv -c evdev-greenasia.xboxdrv | ||
| 7 | {{/code}} | ||
| 8 | |||
| 9 | |||
| 10 | where evdev-greenasia.xboxdrv is: | ||
| 11 | |||
| 12 | {{code language="ini"}} | ||
| 13 | |||
| 14 | [xboxdrv] | ||
| 15 | evdev = /dev/input/by-id/usb-GreenAsia_Inc._USB_Joystick-event-joystick | ||
| 16 | evdev-debug = false | ||
| 17 | evdev-grab = true | ||
| 18 | |||
| 19 | mimic-xpad = true | ||
| 20 | |||
| 21 | [axismap] | ||
| 22 | # these are inverted relative to xbox, shrug | ||
| 23 | -Y1=Y1 | ||
| 24 | -Y2=Y2 | ||
| 25 | |||
| 26 | [evdev-absmap] | ||
| 27 | ABS_HAT0X = DPAD_X | ||
| 28 | ABS_HAT0Y = DPAD_Y | ||
| 29 | |||
| 30 | ABS_X = X1 | ||
| 31 | ABS_Y = Y1 | ||
| 32 | |||
| 33 | ABS_RZ = X2 | ||
| 34 | ABS_Z = Y2 | ||
| 35 | |||
| 36 | [evdev-keymap] | ||
| 37 | BTN_TRIGGER = X | ||
| 38 | BTN_THUMB = Y | ||
| 39 | BTN_THUMB2 = A | ||
| 40 | BTN_TOP = B | ||
| 41 | |||
| 42 | BTN_TOP2 = LB | ||
| 43 | BTN_PINKIE = LT | ||
| 44 | BTN_BASE = RB | ||
| 45 | BTN_BASE2 = RT | ||
| 46 | |||
| 47 | BTN_BASE3 = BACK | ||
| 48 | BTN_BASE4 = START | ||
| 49 | |||
| 50 | BTN_BASE5 = TL | ||
| 51 | BTN_BASE6 = TR | ||
| 52 | |||
| 53 | # EOF # | ||
| 54 | {{/code}} |