Wiki source code of Green Asia Gamepad

Last modified by David De La Harpe Golden on 2020/11/29 23:53

Hide last authors
David De La Harpe Golden 2.1 1 = GreenAsia Inc. USB Gamepads =
David De La Harpe Golden 1.1 2
David De La Harpe Golden 5.1 3 I have a couple of these old generic usb PlayStation 1/2 DualShock style controllers I picked up years ago, still going strong (mostly). USB identifies as [["GreenAsia Inc. MaxFire Blaze 2">>https://www.google.com/search?q="GreenAsia+Inc.+MaxFire+Blaze2"]], but lots of clone controllers use roughly the same internals I think. Unfortunately mine are missing some now-fashionable controller buttons (like menu/guide) and features, but they're alright.
David De La Harpe Golden 1.1 4
David De La Harpe Golden 2.1 5 == xboxdrv remapping ==
6
7 If you want to remap this controller 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, hopefully obviously. You can fine more generic instructions on e.g. the [[Arch Wiki>>https://wiki.archlinux.org/index.php/Gamepad#Mimic_Xbox_360_controller_with_other_controllers]]
8
David De La Harpe Golden 4.1 9 {{code language="bash"}}
10 xboxdrv -c evdev-greenasia.xboxdrv --silent
David De La Harpe Golden 1.1 11 {{/code}}
12
13
14 where evdev-greenasia.xboxdrv is:
15
16 {{code language="ini"}}
17
18 [xboxdrv]
19 evdev = /dev/input/by-id/usb-GreenAsia_Inc._USB_Joystick-event-joystick
20 evdev-debug = false
21 evdev-grab = true
22
23 mimic-xpad = true
24
25 [axismap]
26 # these are inverted relative to xbox, shrug
27 -Y1=Y1
28 -Y2=Y2
29
30 [evdev-absmap]
31 ABS_HAT0X = DPAD_X
32 ABS_HAT0Y = DPAD_Y
33
34 ABS_X = X1
35 ABS_Y = Y1
36
37 ABS_RZ = X2
38 ABS_Z = Y2
39
40 [evdev-keymap]
41 BTN_TRIGGER = X
42 BTN_THUMB = Y
43 BTN_THUMB2 = A
44 BTN_TOP = B
45
46 BTN_TOP2 = LB
47 BTN_PINKIE = LT
48 BTN_BASE = RB
49 BTN_BASE2 = RT
50
51 BTN_BASE3 = BACK
52 BTN_BASE4 = START
53
54 BTN_BASE5 = TL
55 BTN_BASE6 = TR
56
57 # EOF #
58 {{/code}}