828 lines
30 KiB
Text
828 lines
30 KiB
Text
Pre Release Testing:
|
||
=====================
|
||
|
||
* check the version number
|
||
|
||
VERSION="$(cat VERSION)"
|
||
TAG="v${VERSION}"
|
||
git tag -s "${TAG}" -m "xboxdrv ${TAG}"
|
||
|
||
# Normal Source
|
||
git archive --format=tar --prefix="xboxdrv-linux-${VERSION}/" ${TAG} | bzip2 -c > /tmp/xboxdrv-linux-${VERSION}.tar.bz2
|
||
|
||
git push --tags
|
||
|
||
|
||
Ubuntu Package:
|
||
===============
|
||
|
||
add libudev, libusb-1.0 to builddependencies
|
||
|
||
# Ubuntu 10.10
|
||
|
||
$ cd ../debian/
|
||
$ git checkout master
|
||
$ git-import-orig -u 0.6.4 ~/projects/xboxdrv/htdocs/xboxdrv-linux-0.6.4.tar.bz2
|
||
$ dch -v "0.6.4-1" "xboxdrv 0.6.4 release"
|
||
$ git-buildpackage --git-no-create-orig --git-tag --git-builder="debuild -S"
|
||
$ sudo pbuilder --build ../xboxdrv_0.6.4-2.dsc
|
||
$ dput my-ppa ../xboxdrv_0.6.4-2_source.changes
|
||
|
||
# Ubuntu 10.04 (LTS)
|
||
|
||
$ cd ../debian/
|
||
$ git checkout master-lts
|
||
$ git merge master
|
||
$ dch -b -v "0.6.4-1~lucid1" --distribution lucid "xboxdrv 0.6.4 backport"
|
||
$ git-buildpackage --git-no-create-orig --git-debian-branch=master-lts --git-tag --git-builder="debuild -S"
|
||
$ sudo pbuilder --build ../xboxdrv_0.6.4-2~lucid1.dsc
|
||
$ dput my-ppa ../xboxdrv_0.6.4-2~lucid1_source.changes
|
||
|
||
|
||
Stuff to do before 0.6.5 release:
|
||
=================================
|
||
|
||
* fix inconsistent case in output of --list-all
|
||
|
||
* turn EnumBox into singleton
|
||
|
||
* Keysym2Keycode is currently always constructed at startup, even when
|
||
not used, construct it on demand
|
||
|
||
* add --list-keys --list-x11-keys --list-abs --list-rel --list-button --list-axis etc.
|
||
- add pretty printer, to make output look nice
|
||
|
||
* shifted axis without default mapping don't work:
|
||
|
||
./xboxdrv --ui-axismap lb+x1^cal:-64000:0:64000
|
||
|
||
in those cases the default mapping for the unshifted axis should be used
|
||
|
||
* give a warning when the user uses X as axis, instead of X1 (X is the
|
||
xbox1 analog button), maybe rename X button to btn_x or xbtn ybtn
|
||
|
||
* new deadzone code (and probably other) must not use boost::lexical_cast<int> but to_number()
|
||
|
||
* current deadzone code messes up the diagonals
|
||
|
||
* input filter need to have priorities
|
||
|
||
* move set_deadzone, set_deadzone_trigger and other older config
|
||
things to later in the app to get it order independed
|
||
|
||
* might have broken axis and button swapping with recent modifier updates
|
||
|
||
* document patches in AUTHORS
|
||
|
||
* modifier syntax:
|
||
|
||
--stickmap X/Y^rotate:90^square^round
|
||
|
||
--modifier rotate:X:Y:90^square^round
|
||
--modifier rotate=X:Y:90,square,round
|
||
|
||
[modifier]
|
||
rotate:X1:Y1:90
|
||
four-way-restrictor:X1:Y1
|
||
square:X1:Y1
|
||
round:X1:Y1
|
||
|
||
* add:
|
||
|
||
--modifier axis-sensitivity:X1=-1.0,Y1=-1.0
|
||
--modifier axis-sensitivity:X1=-1.0,Y1=-1.0
|
||
--modifier relative-axis:AXIS=NUM^axis-sensitivity:X1=-1.0,Y1=-1.0
|
||
|
||
little ugly, but should be workable. All those modifiers get appened to a modifier stack.
|
||
|
||
old modifier options also still work, but are sorted prior to use, to act the same as in older xboxdrv versions
|
||
|
||
* get rid of uinput.get_uinput(m_code.device_id)->send(EV_ABS, m_code.code, value) turn into:
|
||
|
||
uinput.send(m_code.device_id, EV_ABS, m_code.code, value);
|
||
|
||
or
|
||
|
||
uinput.send_abs(m_code.device_id, m_code.code, value);
|
||
|
||
* add: void Uinput::send(XboxGenericMsg& msg, int controller_slot = 0);
|
||
* have separate UinputConfig's for each controller_slot
|
||
* need magic to assign controller to a slot
|
||
* might need magic to give device-ids in a slot fashion:
|
||
from: 1-ABS_X (second uinput device)
|
||
to: 2.1-ABS_X (third uinput device for the second slot)
|
||
2.mouse-BTN_MIDDLE ?!
|
||
1.-BTN_MIDDLE
|
||
1.auto-BTN_MIDDLE
|
||
auto-BTN_MIDDLE
|
||
|
||
* add analog emulation for button (i.e. the longer its pressed, the higher the value)
|
||
|
||
* uinput must be made threadsafe
|
||
|
||
* write/recycle a proper logging class
|
||
|
||
* improve output on which uinput devices are created
|
||
|
||
* can't parse:
|
||
--ui-axismap x2=2-ABS_X,y2=2-ABS_Y
|
||
|
||
only this works:
|
||
|
||
--ui-axismap x2=abs:2-ABS_X,y2=abs:2-ABS_Y
|
||
|
||
implement better guessing
|
||
|
||
* make chatpad configurable:
|
||
|
||
--ui-chatpad a=KEY_A,green+a=SHIFT_X+KEY_B,...
|
||
|
||
* make sure that XK_??? names work with keys that are
|
||
shifted/mode_switched in the keymap, i.e. send key combination
|
||
|
||
* write UIEvent::from_string()
|
||
|
||
* absolute mouse pointer can be created with:
|
||
|
||
abs:1-ABS_X, abs:1-ABS_Y, key:1-BTN_LEFT
|
||
|
||
document that somewhere, device must not contain REL_X, REL_Y or BTN_A or it won't work in X11
|
||
|
||
* --four-way-restrictor for the dpad?
|
||
|
||
- keep whatever direction is pressed first, don't allow walking over diagonals?
|
||
- always keep last main direction until another main direction got pressed?
|
||
- --disable-dpad-diagonals ur,dl,dl
|
||
|
||
* better resume/suspend handling?
|
||
|
||
usb_interface_read() gets a -ENODEV on suspend/resume, could try to
|
||
open the connection back up after failure
|
||
|
||
* add udev support, to watch new controllers getting plugged in, allow
|
||
multiple controllers directly in xboxdrv
|
||
|
||
XboxdrvDaemon
|
||
=============
|
||
|
||
-a FILENAME, --on-attach=FILENAME
|
||
Launch EXE when a new controller is connected
|
||
-d FILENAME, --on-detach=FILENAME
|
||
Launch EXE when a controller is detached
|
||
|
||
* uinput must be thread safe
|
||
|
||
* use pretty print to print copyright notice
|
||
|
||
|
||
Stuff to do before 0.6.x release:
|
||
=================================
|
||
|
||
* basic Dualstrike mouse emulation with absolute position:
|
||
|
||
./xboxdrv-dualstrike \
|
||
--ui-clear \
|
||
--ui-buttonmap rb=key:1-BTN_LEFT,lb=key:1-BTN_RIGHT \
|
||
--ui-axismap x2^cal:-25000:0:25000=abs:1-ABS_X,y2^cal:-25000:0:25000=abs:1-ABS_Y
|
||
--ui-axismap x1=KEY_LEFT:KEY_RIGHT,y1=KEY_DOWN:KEY_UP -s
|
||
|
||
* limit --four-way-restrictor to a single stick, use a standard
|
||
logical notatino for a single stick that is rusable for other means:
|
||
|
||
--four-way-restrictor X-Y,X1-Y2
|
||
--four-way-restrictor XY,X2:Y2
|
||
--four-way-restrictor X/Y,X2/Y2
|
||
|
||
Chatpad
|
||
=======
|
||
|
||
Figure out a way to load custom keymaps:
|
||
|
||
* http://madduck.net/docs/extending-xkb/
|
||
* http://stackoverflow.com/questions/1557689/keyboard-remapping-with-more-modifiers
|
||
* http://tldp.org/HOWTO/Keyboard-and-Console-HOWTO-15.html
|
||
|
||
* setxkbmap -device ... -I xboxdrv/xorg/
|
||
|
||
xkbprint -label name $DISPLAY - | gv -orientation=seascape -
|
||
http://www.charvolant.org/~doug/xkb/html/xkb.html
|
||
http://pascal.tsu.ru/en/xkb/
|
||
http://wiki.debian.org/XStrikeForce/InputHotplugGuide
|
||
http://git.madduck.net/v/etc/xsession.git?a=blob;f=.xkb/symbols/madduck;hb=refs/heads/xkb
|
||
http://www.x.org/wiki/XKB
|
||
http://sourceforge.net/tracker/download.php?group_id=286545&atid=1214224&file_id=361450&aid=2945171
|
||
|
||
http://www.x.org/docs/XKB/XKBlib.pdf
|
||
|
||
* find a way to bring back --no-extra-devices, saves typing
|
||
|
||
http://www.mp3car.com/vbulletin/input-devices/108554-xbox360-chatpad-awsome-backlit-mini-keyboard-16.html#post1256444
|
||
|
||
* change default axis/button map depending on controller type (tricky as
|
||
type is only really known after the axis/buttonmap as already been
|
||
build):
|
||
|
||
* remove guide button from default mapping when its an Xbox1 controller
|
||
|
||
* guitar handling was changed in a4e1003cba0ff925358ce5ed84d2bf9a728e93d6
|
||
|
||
* REL_ events could need acceleration support, as mouse emulation is currently kind of imprecise
|
||
|
||
* write example ini configs (as documented source for user customization):
|
||
|
||
* default config
|
||
|
||
* two joysticks with one stick
|
||
|
||
* all buttons and axis shifted by LB and RB
|
||
|
||
* evdev joystick to xbox360
|
||
|
||
* dosbox flightstick emulation
|
||
|
||
* high sensitivty
|
||
|
||
* mouse emulation
|
||
|
||
* give some response curve examples:
|
||
|
||
# Low sensitivity on the stick when LB is pressed:
|
||
|
||
--ui-axismap lb+y1^resp:-8000:0:8000=ABS_Y,y1=ABS_Y,lb+x1^resp:-8000:0:8000=ABS_X,x1=ABS_X
|
||
|
||
* Not implementable as they need more then one axis: squareaxis, four-way-restrictor, dpad-rotation
|
||
|
||
* "couldn't convert 'ABS_y' to enum, not a member of EV_ABS"
|
||
|
||
convert all enum names to uppercase? or does that lead to conflicts in the naming?
|
||
|
||
* support for Playstation button names maybe? cross, triangle, circle, square, R3, L3, ...?
|
||
|
||
|
||
Stuff to do before 0.7.0 release:
|
||
=================================
|
||
|
||
* add extra checks to make sure the evdev buttons and axis given exist on the current device
|
||
|
||
* make dummy joystick axis creation optional
|
||
|
||
* --ui-axismap LT=KEY_A:KEY_B:1
|
||
|
||
Here KEY_B is the key you want to send and KEY_A is a random other key
|
||
that you don't need. It's a hack as mapping both to KEY_B seems to
|
||
cause some trouble with automatic key repeat for some reason. Note
|
||
that you must not combine this with --trigger-as-zaxis as that will
|
||
disable LT and RT
|
||
|
||
* invert y axis on --evdev
|
||
|
||
* allow --type to work even when --device-by-id is not given
|
||
|
||
* axis emulation
|
||
|
||
--ui-axisemulation A:B=ABS_X:5
|
||
|
||
* endpoints can be taken directly from the usb configuration, thus
|
||
avoiding issues with nummeric endpoints
|
||
|
||
* bcdDevice (product release version) seem to indicate type (to many
|
||
possible versions, not enough data):
|
||
|
||
new controller with merged endpoints: bcdDevice: 0x0114
|
||
old ones: 1.10
|
||
|
||
better way then to check for endpoints maybe
|
||
|
||
* 045e:028f is the play&charge kit, give an error message when somebody tries to use that
|
||
|
||
* match by protocol not, just vendor/product, from xpad.c:
|
||
|
||
/* Xbox 360 has a vendor-specific class, so we cannot match it with only
|
||
* USB_INTERFACE_INFO (also specifically refused by USB subsystem), so we
|
||
* match against vendor id as well. Wired Xbox 360 devices have protocol 1,
|
||
* wireless controllers have protocol 129. */
|
||
#define XPAD_XBOX360_VENDOR_PROTOCOL(vend,pr) \
|
||
.match_flags = USB_DEVICE_ID_MATCH_VENDOR | USB_DEVICE_ID_MATCH_INT_INFO, \
|
||
.idVendor = (vend), \
|
||
.bInterfaceClass = USB_CLASS_VENDOR_SPEC, \
|
||
.bInterfaceSubClass = 93, \
|
||
.bInterfaceProtocol = (pr)
|
||
#define XPAD_XBOX360_VENDOR(vend) \
|
||
{ XPAD_XBOX360_VENDOR_PROTOCOL(vend,1) }, \
|
||
{ XPAD_XBOX360_VENDOR_PROTOCOL(vend,129) }
|
||
|
||
* --ui-new must reset events to neutral when switching input mapping (done, but a hack)
|
||
|
||
* --ui-axismap doesn't work when same key name is given twice, either give warning or fix the issue:
|
||
|
||
--ui-axismap LT=KEY_A:KEY_A:1
|
||
|
||
* in INI files allow:
|
||
|
||
[xboxdrv]
|
||
ui-buttonmap = A=BTN_A,B=BTN_B,...
|
||
|
||
Feature
|
||
=======
|
||
|
||
* figure out a way to make userspace force feedback driver not become dead processes
|
||
|
||
* better keyboard emulation via analog sticks: axis must not be
|
||
handled separately as this leads to issues with the diagonals (see
|
||
mail from Matthew G <matt@remort.org>) (maybe relative axis can help?)
|
||
|
||
* test TR:Anniversary with max effect 16
|
||
|
||
Stuff to do before 0.6.0 release:
|
||
=================================
|
||
|
||
* add Playstation3 controller config to examples, convert to ini (done)
|
||
needs new config for bluetooth mode
|
||
|
||
./xboxdrv \
|
||
--evdev /dev/input/event6 \
|
||
--evdev-absmap ABS_X=x1,ABS_Y=y1 \
|
||
--evdev-absmap ABS_Z=x2,ABS_RZ=y2 \
|
||
--evdev-absmap ABS_#48=lt,ABS_#49=rt \
|
||
--evdev-keymap BTN_THUMB=tl,BTN_THUMB2=tr \
|
||
--evdev-keymap BTN_BASE5=lb,BTN_BASE6=rb \
|
||
--evdev-keymap KEY_#302=a,KEY_#301=b,BTN_DEAD=x,KEY_#300=y \
|
||
--evdev-keymap BTN_TRIGGER=back,KEY_#720=guide,BTN_TOP=start \
|
||
--evdev-keymap BTN_TOP2=du,BTN_PINKIE=dr,BTN_BASE=dd,BTN_BASE2=dl
|
||
|
||
|
||
fixme:dinput:joy_polldev joystick cannot handle type 21 event (code 0) <- 21 == EV_FF (status report?)
|
||
|
||
http://www.immersion.com/developer/downloads/ImmFundamentals/HTML/
|
||
http://msdn.microsoft.com/en-us/library/bb219655(VS.85).aspx
|
||
|
||
Later versions:
|
||
===============
|
||
|
||
* complex macro programming, i.e. complete evdev sequences, not just key combinations
|
||
|
||
* The World Tour wireless guitar have 5 buttons and a
|
||
slide. Currently, the slide is mapped to the x axis, but I don't
|
||
know if it allows multiple presses at once. I don't have a Xbox, so
|
||
I don't know if it is allowed at all in the console.
|
||
|
||
Colour: Button: Value in X1 (slide):
|
||
Green A -27500
|
||
Red B -12900
|
||
Yellow Y +7000
|
||
Blue X +18500
|
||
Orange LB1 +32767
|
||
(None) (None) -300
|
||
|
||
* get rid of guitar, merge into xbox360
|
||
|
||
* send FF status reports (maybe, is that used by anything?)
|
||
|
||
* figure out the max values of force feedback effects so that stuff is
|
||
mapped more properly (kind of done, could need verification)
|
||
|
||
* add --detach option that detaches any existing driver (needed for
|
||
gamepads that use HID)
|
||
|
||
* figure out which devices xorg/hal handles as keyboard and how to
|
||
make it always happen, seems to require two keyboard keys, devices
|
||
with only one aren't registered
|
||
|
||
* display ui-buttonmap in the configuration overview, tricky since we
|
||
don't differ between default bindings and user created ones, also
|
||
which bindings get used depends on other configuration options
|
||
|
||
* report more precisly what devices got created, include device name (HAL has that information)
|
||
|
||
* add support for LED messages (can this be used by anything?)
|
||
|
||
* add support for analog buttons (not all that useful, but would still be nice to have)
|
||
|
||
* include id/wid in device name (would be cleaner, since it makes the
|
||
device unique, but would make Xorg trouble worse)
|
||
|
||
|
||
http://lists.libsdl.org/pipermail/sdl-libsdl.org/2007-March/060263.html
|
||
|
||
- fix http://userweb.kernel.org/~dtor/eviocgbit-bug.html in evtest
|
||
- cleanup evtest some more, add more features
|
||
- using rumble in scripts doesn't work, since you can't reset rumble back to 0,0
|
||
- thread away on all endpoints
|
||
- read from stdin on the main thread
|
||
- send output to file or so
|
||
usb -d 005:006 -c 5:in,5:out,6:in,7:in,8:out -o /tmp/out, else stdin
|
||
|
||
Daemon Mode:
|
||
SYSFS{idVendor}=="045e", SYSFS{idProduct}=="028e", RUN+="/home/ingo/projects/xboxdrv/trunk/xboxdrv --daemon"
|
||
|
||
Unpluging doesn't work and causes xboxdrv processing running amok
|
||
|
||
Pictures of Xbox360 and controller:
|
||
http://g-prime.net/x360/
|
||
|
||
Add examples to Readme for specific games
|
||
|
||
Use cases:
|
||
==========
|
||
* flightsim:
|
||
expects: X/Y Rudder Throttle
|
||
XBox: Left-Stick LT+RT Right-Stick(rel)
|
||
|
||
* FPS:
|
||
expects: Mouse-X/Y Walk-X/Y Trigger
|
||
XBox: Left-Stick RickStick Trigger(btn)
|
||
|
||
* 2D Jump Run (done)
|
||
needs dpad first
|
||
|
||
|
||
FIX:
|
||
=====
|
||
filter auto known unknown messages
|
||
uinput name should be configurable
|
||
uinput busid/devid shouldn't be hardcoded
|
||
|
||
Battery warning: LEDs 1,4 then 2,3 over and over ~10 times rapidly
|
||
|
||
* a way to send keyboard combination sequences or more general event sequences
|
||
* abs input must be normalized to min/max
|
||
* rel input must be scaleable
|
||
* Cleanup naming conventions
|
||
|
||
sending rumble is slow and delayed, gets buffered up
|
||
|
||
* examples in doc for --dpad as buttons and other options
|
||
|
||
Figure out:
|
||
===========
|
||
Unknown data: bytes: 3 Data: 0x01 0x03 0x0e
|
||
Unknown data: bytes: 3 Data: 0x02 0x03 0x00
|
||
Unknown data: bytes: 3 Data: 0x03 0x03 0x03
|
||
Unknown data: bytes: 3 Data: 0x08 0x03 0x00
|
||
Unknown data: bytes: 3 Data: 0x01 0x03 0x00
|
||
|
||
Different Computer/Pad:
|
||
Unknown data: bytes: 3 Data: 0x01 0x03 0x0e
|
||
Unknown data: bytes: 3 Data: 0x02 0x03 0x00
|
||
Unknown data: bytes: 3 Data: 0x03 0x03 0x03
|
||
Unknown data: bytes: 3 Data: 0x08 0x03 0x00
|
||
Unknown data: bytes: 3 Data: 0x01 0x03 0x00
|
||
|
||
/* Happens with XBox360 Controller sometimes
|
||
Unknown data: bytes: 3 Data: 0x01 0x03 0x0e
|
||
Unknown data: bytes: 3 Data: 0x02 0x03 0x00
|
||
Unknown data: bytes: 3 Data: 0x03 0x03 0x03
|
||
Unknown data: bytes: 3 Data: 0x08 0x03 0x00
|
||
-- different session:
|
||
Unknown data: bytes: 3 Data: 0x01 0x03 0x0e
|
||
Unknown data: bytes: 3 Data: 0x02 0x03 0x00
|
||
Unknown data: bytes: 3 Data: 0x03 0x03 0x03
|
||
Unknown data: bytes: 3 Data: 0x08 0x03 0x00
|
||
Unknown data: bytes: 3 Data: 0x01 0x03 0x06
|
||
|
||
*/
|
||
|
||
-----
|
||
Guitar:
|
||
|
||
Tilt Sensor: is mapped to the second axis of S2, to LT and RT (three parts)
|
||
- Range for 2nd axis of S2 : -32768 when guitar is straight down and 32767 when she is straight up.
|
||
- Range for LT : ~200 not very precise and ~60 at min.
|
||
- Range for RT : ~190 not very precise and ~55 at min.
|
||
|
||
dummy should stay mostly 0, except the position five and six, which
|
||
are the LT/RT trigger. We can either just ignore them or you can try
|
||
to find out if they have any meaning.
|
||
|
||
|
||
They control guitar rotation, hmm hard to explain, it's when I rotate the guitar in front of me, it detects if the guitar is in the correct position.
|
||
-----
|
||
|
||
* Question: Firestorm Dual Power: How to get rumble to work when there is no endpoint to send data to?
|
||
|
||
* Guitar Hero Controller:
|
||
- lsusb -v output looks like a XBox360 controller
|
||
- usbcat looks like an XBox360 controller
|
||
- it doesn't report events
|
||
|
||
http://forums.gentoo.org/viewtopic-p-5061825.html
|
||
http://gentoo-wiki.com/HOWTO_Xbox_360_controller_on_Linux
|
||
http://happypenguin.org/show?xboxdrv
|
||
http://ubuntuforums.org/showthread.php?t=404577&page=16
|
||
http://tattiebogle.net/index.php/ProjectRoot/Xbox360Controller/OsxDriver
|
||
|
||
|
||
WirelessHIDDevice::receivedMessage(IOMemoryDescriptor *data)
|
||
|
||
* wireless reports battery level
|
||
|
||
* disconnecting the pad in use will just let the driver wait forever
|
||
for new data, any way we can catch a disconnect?
|
||
|
||
* a way to configure the deadzone for axis (might be needed for some games)
|
||
|
||
* Add support for dancepad/mats (should just mean cleanup up the
|
||
buttons/axis not provided by the dancepad/mat)
|
||
|
||
New Command Line Options:
|
||
|
||
--button-map BTN
|
||
|
||
BTN is a list of integers, where each integer corresponds to the
|
||
event that gets send
|
||
|
||
A,B,X,Y,LB,RB,SL,SR,LT,RT,Start,Mode,Back,DPAD-UP,DPAD-DOWN,DPAD-LEFT,DPAD-RIGHT
|
||
A,B,X,Y,TL2,TR2,TL,TR,
|
||
|
||
#define BTN_A 0x130
|
||
#define BTN_B 0x131
|
||
#define BTN_C 0x132
|
||
#define BTN_X 0x133
|
||
#define BTN_Y 0x134
|
||
#define BTN_Z 0x135
|
||
#define BTN_TL 0x136
|
||
#define BTN_TR 0x137
|
||
#define BTN_TL2 0x138
|
||
#define BTN_TR2 0x139
|
||
#define BTN_SELECT 0x13a
|
||
#define BTN_START 0x13b
|
||
#define BTN_MODE 0x13c
|
||
#define BTN_THUMBL 0x13d
|
||
#define BTN_THUMBR 0x13e
|
||
|
||
* add support to remap keys
|
||
|
||
* allow mouse emulation
|
||
|
||
* allow swapping of dpad and analog axis, so that dpad is first instead of last
|
||
|
||
* merge this thing with Pingus Input handling to get a very flexible framework?
|
||
|
||
* ...
|
||
|
||
[[ InputDrv ]]
|
||
==============
|
||
|
||
Needed features:
|
||
================
|
||
* stick to mouse
|
||
* relative-axis (throttle doesn't flip back, a stick does, need to handle that)
|
||
* trigger to button
|
||
* dpad to axis
|
||
* dpad to button
|
||
* inversal of axis
|
||
* soft-axis for dpad
|
||
|
||
(controller
|
||
(button (name "BTN_X") ;; X and Y send out BTN_X events
|
||
(device (xbox360-button "Y")
|
||
(xbox360-button "X")))
|
||
(button (name "BTN_A")
|
||
(device (inverse (xbox360-button "Y"))))
|
||
(axis (name "ABS_X")
|
||
...
|
||
)
|
||
|
||
|
||
Controls:
|
||
=========
|
||
* invert button
|
||
* toggle button
|
||
* autofire button
|
||
|
||
* invert axis
|
||
* deadzone axis
|
||
* split axis (gas/break)
|
||
* join axis (trigger -> zaxis)
|
||
* non-linear axis (gamma or so)
|
||
|
||
|
||
[[ Xorg Input Hotplug ]]
|
||
========================
|
||
|
||
Not available in Ubuntu and still rough, would work via Dbus, see:
|
||
|
||
http://www.x.org/wiki/XInputHotplug
|
||
|
||
d-feet is a Dbus debuging/viewing tool.
|
||
|
||
Example Dbus stuff:
|
||
-------------------
|
||
|
||
dbus-send --system --type=method_call --print-reply --dest=org.x.config.display0 /org/x/config/0 org.x.config.input.remove uint32:5
|
||
Error org.freedesktop.DBus.Error.ServiceUnknown: The name org.x.config.display0 was not provi
|
||
|
||
Doing polling seems to lose some events
|
||
|
||
dbus-send --dest=org.gnome.ScreenSaver
|
||
/
|
||
|
||
dbus-send --dest=org.freedesktop.ExampleName \
|
||
/org/freedesktop/sample/object/name
|
||
org.freedesktop.ExampleInterface.ExampleMethod \
|
||
int32:47 string:'hello world' double:65.32 \
|
||
array:string:"1st item","next item","last item" \
|
||
dict:string:int32:"one",1,"two",2,"three",3 \
|
||
variant:int32:-8 \
|
||
objpath:/org/freedesktop/sample/object/name
|
||
|
||
|
||
dbus-send --dest=org.x.config.display0 \
|
||
/org/x/config/0
|
||
org.x.config.input.add
|
||
|
||
|
||
dbus-send --dest=org.x.config.display0 /org/x/config/0 org.x.config.input.remove int32:5
|
||
|
||
dbus-send \
|
||
--dest=org.x.config.display0 \
|
||
org.freedesktop.DBus.Introspectable \
|
||
org.freedesktop.DBus.Introspectable.Introspect \
|
||
|
||
|
||
Wine Force Feedback:
|
||
|
||
|
||
[ingo@duo:~/projects/xboxdrv/trunk/experimental]$ ~/bin/tombraider-anniversary
|
||
ERROR: Module xpad does not exist in /proc/modules
|
||
USB Device: 003:002
|
||
Controller: "Microsoft Xbox 360 Controller" (idVendor: 0x045e, idProduct: 0x028e)
|
||
Controller Type: Xbox360
|
||
Deadzone: 0
|
||
Rumble Debug: off
|
||
Rumble Speed: left: 0 right: 0
|
||
LED Status: auto
|
||
ButtonMap: none
|
||
AxisMap: none
|
||
Square Axis: no
|
||
RelativeAxisMap: none
|
||
AutoFireMap: none
|
||
ForceFeedback: enabled
|
||
Starting with uinput... done
|
||
|
||
Your Xbox/Xbox360 controller should now be available as:
|
||
/dev/input/js1
|
||
/dev/input/event10
|
||
|
||
Press Ctrl-c to quit
|
||
|
||
Unknown: len: 3 data: 0x02 0x03 0x00
|
||
user.reg is not a valid registry file
|
||
fixme:ole:CoInitializeSecurity ((nil),-1,(nil),(nil),0,3,(nil),0,(nil)) - stub!
|
||
err:ole:CoGetClassObject class {9a5ea990-3034-4d6f-9128-01f3c61022bc} not registered
|
||
err:ole:CoGetClassObject class {9a5ea990-3034-4d6f-9128-01f3c61022bc} not registered
|
||
err:ole:create_server class {9a5ea990-3034-4d6f-9128-01f3c61022bc} not registered
|
||
fixme:ole:CoGetClassObject CLSCTX_REMOTE_SERVER not supported
|
||
err:ole:CoGetClassObject no class object {9a5ea990-3034-4d6f-9128-01f3c61022bc} could be created for context 0x17
|
||
fixme:win:EnumDisplayDevicesW ((null),0,0x33ef54,0x00000000), stub!
|
||
fixme:system:SystemParametersInfoW Unimplemented action: 59 (SPI_SETSTICKYKEYS)
|
||
fixme:d3d:IWineD3DDeviceImpl_EvictManagedResources (0x140a78) : stub
|
||
fixme:d3d:IWineD3DDeviceImpl_EvictManagedResources (0x140a78) : stub
|
||
fixme:d3d:IWineD3DDeviceImpl_EvictManagedResources (0x140a78) : stub
|
||
fixme:d3d:IWineD3DDeviceImpl_EvictManagedResources (0x140a78) : stub
|
||
fixme:d3d:IWineD3DDeviceImpl_EvictManagedResources (0x140a78) : stub
|
||
fixme:d3d:IWineD3DDeviceImpl_EvictManagedResources (0x140a78) : stub
|
||
err:ole:CoGetClassObject class {4590f811-1d3a-11d0-891f-00aa004b2e24} not registered
|
||
err:ole:CoGetClassObject no class object {4590f811-1d3a-11d0-891f-00aa004b2e24} could be created for context 0x1
|
||
err:ole:CoGetClassObject class {4590f811-1d3a-11d0-891f-00aa004b2e24} not registered
|
||
err:ole:CoGetClassObject no class object {4590f811-1d3a-11d0-891f-00aa004b2e24} could be created for context 0x1
|
||
err:ole:CoGetClassObject class {4590f811-1d3a-11d0-891f-00aa004b2e24} not registered
|
||
err:ole:CoGetClassObject no class object {4590f811-1d3a-11d0-891f-00aa004b2e24} could be created for context 0x1
|
||
err:ole:CoGetClassObject class {4590f811-1d3a-11d0-891f-00aa004b2e24} not registered
|
||
err:ole:CoGetClassObject no class object {4590f811-1d3a-11d0-891f-00aa004b2e24} could be created for context 0x1
|
||
err:ole:CoGetClassObject class {4590f811-1d3a-11d0-891f-00aa004b2e24} not registered
|
||
err:ole:CoGetClassObject no class object {4590f811-1d3a-11d0-891f-00aa004b2e24} could be created for context 0x1
|
||
err:ole:CoGetClassObject class {4590f811-1d3a-11d0-891f-00aa004b2e24} not registered
|
||
err:ole:CoGetClassObject no class object {4590f811-1d3a-11d0-891f-00aa004b2e24} could be created for context 0x1
|
||
err:ole:CoGetClassObject class {4590f811-1d3a-11d0-891f-00aa004b2e24} not registered
|
||
err:ole:CoGetClassObject no class object {4590f811-1d3a-11d0-891f-00aa004b2e24} could be created for context 0x1
|
||
fixme:dinput:JoystickAImpl_SetProperty DIPROP_AUTOCENTER(0)
|
||
fixme:dinput:LinuxInputEffectImpl_Download Could not upload effect. Assuming a disconnected device.
|
||
err:ole:CoGetClassObject class {4590f811-1d3a-11d0-891f-00aa004b2e24} not registered
|
||
err:ole:CoGetClassObject no class object {4590f811-1d3a-11d0-891f-00aa004b2e24} could be created for context 0x1
|
||
err:ole:CoGetClassObject class {4590f811-1d3a-11d0-891f-00aa004b2e24} not registered
|
||
err:ole:CoGetClassObject no class object {4590f811-1d3a-11d0-891f-00aa004b2e24} could be created for context 0x1
|
||
Headset: nonetype: 257 code: 1 value: 0
|
||
XXX FF_UPLOAD: rumble upload: effect_id: 0 effect_type: 82
|
||
EFFECT: FF_CONSTANT level: 0 envelope: attack_length: 16 attack_level: 32767 fade_length: 16 fade_level: 32767
|
||
--------------------------------
|
||
type: 21 code: 0 value: 1
|
||
EV_FF: playing effect: effect_id = 0 value: 1
|
||
--------------------------------
|
||
type: 257 code: 1 value: 0
|
||
XXX FF_UPLOAD: rumble upload: effect_id: 0 effect_type: 82
|
||
EFFECT: FF_CONSTANT level: 26880 envelope: attack_length: 16 attack_level: 32767 fade_length: 16 fade_level: 32767
|
||
--------------------------------
|
||
fixme:dinput:joy_polldev joystick cannot handle type 21 event (code 0)
|
||
fixme:dinput:joy_polldev joystick cannot handle type 21 event (code 0)
|
||
type: 21 code: 0 value: 1
|
||
EV_FF: playing effect: effect_id = 0 value: 1
|
||
--------------------------------
|
||
type: 257 code: 1 value: 0
|
||
XXX FF_UPLOAD: rumble upload: effect_id: 0 effect_type: 82
|
||
EFFECT: FF_CONSTANT level: 26880 envelope: attack_length: 16 attack_level: 32767 fade_length: 16 fade_level: 32767
|
||
--------------------------------
|
||
fixme:dinput:joy_polldev joystick cannot handle type 21 event (code 0)
|
||
type: 21 code: 0 value: 1
|
||
EV_FF: playing effect: effect_id = 0 value: 1
|
||
--------------------------------
|
||
type: 257 code: 1 value: 0
|
||
XXX FF_UPLOAD: rumble upload: effect_id: 0 effect_type: 82
|
||
EFFECT: FF_CONSTANT level: 26880 envelope: attack_length: 16 attack_level: 32767 fade_length: 16 fade_level: 32767
|
||
--------------------------------
|
||
fixme:dinput:joy_polldev joystick cannot handle type 21 event (code 0)
|
||
type: 21 code: 0 value: 1
|
||
EV_FF: playing effect: effect_id = 0 value: 1
|
||
--------------------------------
|
||
type: 257 code: 1 value: 0
|
||
XXX FF_UPLOAD: rumble upload: effect_id: 0 effect_type: 82
|
||
EFFECT: FF_CONSTANT level: 26880 envelope: attack_length: 16 attack_level: 32767 fade_length: 16 fade_level: 32767
|
||
--------------------------------
|
||
fixme:dinput:joy_polldev joystick cannot handle type 21 event (code 0)
|
||
type: 21 code: 0 value: 1
|
||
EV_FF: playing effect: effect_id = 0 value: 1
|
||
--------------------------------
|
||
type: 257 code: 1 value: 0
|
||
XXX FF_UPLOAD: rumble upload: effect_id: 0 effect_type: 82
|
||
EFFECT: FF_CONSTANT level: 26880 envelope: attack_length: 16 attack_level: 32767 fade_length: 16 fade_level: 32767
|
||
--------------------------------
|
||
fixme:dinput:joy_polldev joystick cannot handle type 21 event (code 0)
|
||
type: 21 code: 0 value: 1
|
||
EV_FF: playing effect: effect_id = 0 value: 1
|
||
--------------------------------
|
||
type: 257 code: 1 value: 0
|
||
XXX FF_UPLOAD: rumble upload: effect_id: 0 effect_type: 82
|
||
EFFECT: FF_CONSTANT level: 26880 envelope: attack_length: 16 attack_level: 32767 fade_length: 16 fade_level: 32767
|
||
--------------------------------
|
||
fixme:dinput:joy_polldev joystick cannot handle type 21 event (code 0)
|
||
type: 21 code: 0 value: 1
|
||
EV_FF: playing effect: effect_id = 0 value: 1
|
||
--------------------------------
|
||
type: 257 code: 1 value: 0
|
||
XXX FF_UPLOAD: rumble upload: effect_id: 0 effect_type: 82
|
||
EFFECT: FF_CONSTANT level: 26880 envelope: attack_length: 16 attack_level: 32767 fade_length: 16 fade_level: 32767
|
||
--------------------------------
|
||
fixme:dinput:joy_polldev joystick cannot handle type 21 event (code 0)
|
||
type: 21 code: 0 value: 1
|
||
EV_FF: playing effect: effect_id = 0 value: 1
|
||
--------------------------------
|
||
type: 257 code: 1 value: 0
|
||
XXX FF_UPLOAD: rumble upload: effect_id: 0 effect_type: 82
|
||
EFFECT: FF_CONSTANT level: 26880 envelope: attack_length: 16 attack_level: 32767 fade_length: 16 fade_level: 32767
|
||
--------------------------------
|
||
fixme:dinput:joy_polldev joystick cannot handle type 21 event (code 0)
|
||
fixme:dinput:joy_polldev joystick cannot handle type 21 event (code 0)
|
||
type: 21 code: 0 value: 1
|
||
EV_FF: playing effect: effect_id = 0 value: 1
|
||
--------------------------------
|
||
type: 21 code: 0 value: 0
|
||
EV_FF: playing effect: effect_id = 0 value: 0
|
||
--------------------------------
|
||
type: 21 code: 0 value: 0
|
||
EV_FF: playing effect: effect_id = 0 value: 0
|
||
--------------------------------
|
||
type: 257 code: 2 value: 0
|
||
FF_ERASE: rumble erase: effect_id = 0
|
||
--------------------------------
|
||
|
||
|
||
fixme:dinput:LinuxInputEffectImpl_Download Could not upload effect. Assuming a disconnected device.
|
||
fixme:dinput:joy_polldev joystick cannot handle type 21 event (code 0)
|
||
fixme:dinput:LinuxInputEffectImpl_Download Could not upload effect. Assuming a disconnected device.
|
||
fixme:dinput:LinuxInputEffectImpl_Download Could not upload effect. Assuming a disconnected device.
|
||
fixme:dinput:LinuxInputEffectImpl_Download Could not upload effect. Assuming a disconnected device.
|
||
fixme:dinput:joy_polldev joystick cannot handle type 21 event (code 0)
|
||
fixme:dinput:LinuxInputEffectImpl_Download Could not upload effect. Assuming a disconnected device.
|
||
fixme:dinput:joy_polldev joystick cannot handle type 21 event (code 0)
|
||
fixme:dinput:LinuxInputEffectImpl_Download Could not upload effect. Assuming a disconnected device.
|
||
fixme:dinput:LinuxInputEffectImpl_Download Could not upload effect. Assuming a disconnected device.
|
||
fixme:dinput:LinuxInputEffectImpl_Download Could not upload effect. Assuming a disconnected device.
|
||
fixme:dinput:joy_polldev joystick cannot handle type 21 event (code 0)
|
||
wine: Unhandled page fault on read access to 0x35545844 at address 0x35545844 (thread 0009), starting debugger...
|
||
Unhandled exception: page fault on read access to 0x35545844 in 32-bit code (0x35545844).
|
||
Register dump:
|
||
CS:0073 SS:007b DS:007b ES:007b FS:0033 GS:003b
|
||
EIP:35545844 ESP:0033f2f8 EBP:0033f324 EFLAGS:00210206( - 00 - RIP1)
|
||
EAX:12b895d0 EBX:7c08fff4 ECX:116fe938 EDX:1294b6e8
|
||
ESI:12c59178 EDI:116fe920
|
||
Stack dump:
|
||
0x0033f2f8: 7c07d52a 12b895d0 b7ed0094 116fe938
|
||
0x0033f308: 0033f344 0033f344 b7ed0189 7c07d45b
|
||
0x0033f318: 7c08fff4 116fe920 00000000 0033f344
|
||
0x0033f328: 7c06f45f 116fe920 00000001 12b895d0
|
||
0x0033f338: 00000011 03a23650 039fbac0 03a2369c
|
||
0x0033f348: 00412e8a 116fe920 039fbbb0 03a23650
|
||
Backtrace:
|
||
=>1 0x35545844 (0x0033f324)
|
||
2 0x7c06f45f IDirectInputDevice2AImpl_Release+0x4f() in dinput (0x0033f344)
|
||
3 0x00412e8a in tra (+0x12e8a) (0x03a2369c)
|
||
4 0x00000000 (0x00000000)
|
||
0x35545844: addb %al,0x0(%eax)
|
||
Modules:
|
||
Module Address Debug info Name (88 modules)
|
||
PE 400000- c5b000 Export tra
|
||
PE 18000000-18033000 Deferred binkw32
|
||
ELF 7b800000-7b93d000 Deferred kernel32<elf>
|
||
|
||
|
||
# EOF #
|