You are not logged in.

#1 2014-09-28 02:13:37

2Karl
Member
From: Daventry, UK
Registered: 2012-03-26
Posts: 62
Website

CH Pro Throttle and MS Force Feedback 2 in X3: Terran Conflict.

Hi all, I posted over in the X3: Reunion Linux thread on the official X Universe boards, but this is probably relevant to some of you here:

I have managed to get the my CH Products Pro Throttle and Microsoft Sidewinder Force Feedback 2 to work together perfectly in X3: Terran conflict. It was a pain in the backside to do, but here's how:

First I grabbed the source code to joy-map, the linux userspace joystick mapping program. This allows you to remap axes and buttons on existing devices and assign them to a new virtual device. By default, joy-map sets all the evdev abs_max values to 32767 and all the evdev abs_min values to -32767 for all axes. When I was running it out of the box, this caused the virtual stick to barely register movement, as the raw output from the USB devices was in the region of -256 to 256 for the throttle and -512 to 512 for the sidewinder.... and then the stick twist was -32 to 32, and the hats were -1 to 1. As X3 doesn't let you recalibrate in game, and any joydev calibration with jscal is ignored, this was not much use.

So I used evtest to find out what the maximum and minimum reported raw values were for each and every axis I was remapping. I then edited devices.c, one of the joy-map source files. Line 127 is the start of the loop which sets up the abs_max and abs_min values for all of the axes, so I commented out the loop and hard-coded the values for each axis in. After that was done, I compiled the mapper, and wrote a map file which combined all of the axes and buttons I needed.

Finally, I copied the compiled loadmap executable and my joystick map config to my X3:TC directory and modified the last line of testandlaunch to read

./loadmap CH-sidewinder.map & ./$1
killall loadmap

It's not as straighforward as the CH Products Control Manager software in Windows, and if I change my stick setup (as I plan on doing next payday when I intend to get a CH Fighter Stick and CH Pro Pedals) then I'll have to edit the joy-map source and recompile, but it works, and I can play X3:TC in Linux with mt HOTAS setup.

If anyone is interested in the hacked joy-map source or the config map file, I can provide them. There's probably a way to get joy-map to set abs_max and abs_min values based on the values supplied by the devices themselves, but that's something I'll work on when I have more time.

This may be of use to people whose joysticks do not work without calibration, as well as anyone looking to combine multiple stick setups to play X3:TC

Last edited by 2Karl (2014-09-28 02:17:16)


It's affine day for a new sig:
13XQLTXH?R%20GLVHDVB!1046210467104640201045B104731046F02010458104731045902
010450104681045B1046910462104681046F02E0201045A104731045102010458104750201
04780201046F1046A104510201046902010461104671045B1047202010458104671045102E

Offline

Board footer

Powered by FluxBB