DrMcCoy Sep 11, 2013 @ 7:02pm
Problem with Logitech Dual Action
The game doesn't properly work with the Logitech Dual Action (on GNU/Linux).
As soon as you get the focus (slow time) ability, the game is constantly stuck in that mode unless you hold dpad up.

The reason I gather is this: Apparently, the Xbox controller the game is "meant" to be played with puts the left/right trigger buttons on axes. With the Logitech Dual Action however, they are buttons and axes 4 and 5 are the dpad.

Now, with jscal / jstest, whatever, I can freely map the buttons and axes around, so reordering them around is not problem (and was necessary anyway), but I can't map a button to an axis and vice versa.
Showing 1-3 of 3 comments
< >
DrMcCoy Sep 11, 2013 @ 8:20pm 
Okay, xboxdrv actually can map the buttons to an axis.
Still, the axes are ordered wrongly, for some reason. xboxdrv can't reorder them properly (since switching trigger axes have a different range than stick axes). So a combination of of xboxdrv and jstest is in order. And with that, the game is actually playable.

In case anyone else is interested:

xboxdrv --evdev /dev/input/event5 -v --mimic-xpad --evdev-keymap KEY_#289=a,KEY_#290=b,KEY_#288=x,KEY_#291=y,KEY_#294=lt,KEY_#295=rt,KEY_#292=lb,KEY_#293=rb,KEY_#297=back,KEY_#296=start,KEY_#298=tl,KEY_#299=tr --evdev-absmap ABS_#0=x1,ABS_#1=y1,ABS_#2=x2,ABS_#5=y2,ABS_#16=dpad_x,ABS_#17=dpad_y --axismap -Y1=Y1,-Y2=Y2

And then I'm reordering the axes so that
- 0 and 1 are x and y on the left stick
- 2 and 3 are x and y on the right stick
- 4 is the right trigger
- 5 is the left trigger
- 6 and 7 are x and y on the dpad

EDIT: Or using jscal instead of jstest, the reordering would be done with
jscal -u 8,0,1,3,4,5,2,16,17,11,304,305,307,308,310,311,314,315,316,317,318 /dev/input/js1
Last edited by DrMcCoy; Sep 11, 2013 @ 8:34pm
DrMcCoy Sep 11, 2013 @ 9:08pm 
Hmm, still, the dpad doesn't work; I can't switch items.

Devs, how exactly are you querying the dpad in your code? As an axis? As a button? Or something else entirely?
antares.81 Jan 31 @ 9:20pm 
Logitech Logitech Dual Action:
$ sudo evtest /dev/input/event6
Input driver version is 1.0.1
Input device ID: bus 0x3 vendor 0x46d product 0xc216 version 0x110
Input device name: "Logitech Logitech Dual Action"
Supported events:
Event type 0 (EV_SYN)
Event type 1 (EV_KEY)
Event code 288 (BTN_TRIGGER)
Event code 289 (BTN_THUMB)
Event code 290 (BTN_THUMB2)
Event code 291 (BTN_TOP)
Event code 292 (BTN_TOP2)
Event code 293 (BTN_PINKIE)
Event code 294 (BTN_BASE)
Event code 295 (BTN_BASE2)
Event code 296 (BTN_BASE3)
Event code 297 (BTN_BASE4)
Event code 298 (BTN_BASE5)
Event code 299 (BTN_BASE6)
Event type 3 (EV_ABS)
Event code 0 (ABS_X)
Value 128
Min 0
Max 255
Flat 15
Event code 1 (ABS_Y)
Value 128
Min 0
Max 255
Flat 15
Event code 2 (ABS_Z)
Value 129
Min 0
Max 255
Flat 15
Event code 5 (ABS_RZ)
Value 123
Min 0
Max 255
Flat 15
Event code 16 (ABS_HAT0X)
Value 0
Min -1
Max 1
Event code 17 (ABS_HAT0Y)
Value 0
Min -1
Max 1
Event type 4 (EV_MSC)
Event code 4 (MSC_SCAN)

emulated Microsoft X-Box 360 pad:
$ sudo evtest /dev/input/event7
Input driver version is 1.0.1
Input device ID: bus 0x3 vendor 0x45e product 0x28e version 0x110
Input device name: "Microsoft X-Box 360 pad"
Supported events:
Event type 0 (EV_SYN)
Event type 1 (EV_KEY)
Event code 304 (BTN_A)
Event code 305 (BTN_B)
Event code 307 (BTN_X)
Event code 308 (BTN_Y)
Event code 310 (BTN_TL)
Event code 311 (BTN_TR)
Event code 314 (BTN_SELECT)
Event code 315 (BTN_START)
Event code 316 (BTN_MODE)
Event code 317 (BTN_THUMBL)
Event code 318 (BTN_THUMBR)
Event type 3 (EV_ABS)
Event code 0 (ABS_X)
Value 0
Min -32768
Max 32767
Fuzz 16
Flat 128
Event code 1 (ABS_Y)
Value 0
Min -32768
Max 32767
Fuzz 16
Flat 128
Event code 2 (ABS_Z)
Value 0
Min 0
Max 255
Event code 3 (ABS_RX)
Value 0
Min -32768
Max 32767
Fuzz 16
Flat 128
Event code 4 (ABS_RY)
Value 0
Min -32768
Max 32767
Fuzz 16
Flat 128
Event code 5 (ABS_RZ)
Value 0
Min 0
Max 255
Event code 16 (ABS_HAT0X)
Value 0
Min -1
Max 1
Event code 17 (ABS_HAT0Y)
Value 0
Min -1
Max 1
ABS_Z and ABS_RZ == LT and RT , for xbox it's axis
can be switched to buttons w/ --trigger-as-button option , but then:
...
Event code 312 (BTN_TL2)
Event code 313 (BTN_TR2)
...
w/ --dpad-as-button option :
...
Event code 294 (BTN_BASE)
Event code 295 (BTN_BASE2)
Event code 296 (BTN_BASE3)
Event code 297 (BTN_BASE4)
...
Event code 9 (ABS_GAS)
Value 0
Min 0
Max 255
Event code 10 (ABS_BRAKE)
Value 0
Min 0
Max 255
...
ABS_HAT0* become BTN_BASE*
ABS_GAS and ABS_BRAKE == LT and RT for now :)

dpad starts working after some experiments with --trigger-as-button and --dpad-as-button options , but all maping become wrong

so, I deside to simle map keyboard keys 1,2,3,4 to dpad
--ui-buttonmap dl=XK_2,dr=XK_4,du=XK_1,dd=XK_3
full command:
$ sudo xboxdrv --evdev /dev/input/event6 -v --evdev-keymap BTN_THUMB=a,BTN_THUMB2=b,BTN_TRIGGER=x,BTN_TOP=y,BTN_BASE=lt,BTN_BASE2=rt,BTN_TOP2=lb,BTN_PINKIE=rb,BTN_BASE4=start,BTN_BASE3=back,BTN_BASE5=tl,BTN_BASE6=tr --evdev-absmap ABS_X=x1,ABS_Y=y1,ABS_Z=x2,ABS_RZ=y2,ABS_HAT0X=DPad_X,ABS_HAT0Y=DPad_Y --axismap -Y1=Y1,-Y2=Y2 --ui-buttonmap dl=XK_2,dr=XK_4,du=XK_1,dd=XK_3 --silent
Last edited by antares.81; Jan 31 @ 9:21pm
Showing 1-3 of 3 comments
< >
Per page: 15 30 50