xboxdrv/TODO
2011-01-28 23:00:13 +01:00

478 lines
15 KiB
Text
Raw Blame History

This file contains invisible Unicode characters

This file contains invisible Unicode characters that are indistinguishable to humans but may be processed differently by a computer. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

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.7.1 ~/projects/xboxdrv/htdocs/xboxdrv-linux-0.7.1.tar.bz2
$ dch -v "0.7.1-1" "xboxdrv 0.7.1 release"
$ git-buildpackage --git-no-create-orig --git-tag --git-builder="debuild -S"
$ sudo pbuilder --build ../xboxdrv_0.7.1-1.dsc
$ dput my-ppa ../xboxdrv_0.7.1-1_source.changes
# Ubuntu 10.04 (LTS)
$ cd ../debian/
$ git checkout master-lts
$ git merge master
$ dch -b -v "0.7.1-1~lucid1" --distribution lucid "xboxdrv 0.7.1 backport"
$ git-buildpackage --git-no-create-orig --git-debian-branch=master-lts --git-tag --git-builder="debuild -S"
$ sudo pbuilder --build ../xboxdrv_0.7.1-1~lucid1.dsc
$ dput my-ppa ../xboxdrv_0.7.1-1~lucid1_source.changes
Stuff to do before 0.7.1 release:
=================================
* implement set_dpad_as_button(), set_dpad_only()
* --name DEVNAME must work with multple controller slots and multiple
devices, also allow a way to rename mouse and keyboard emulation devices
turn --name into --ui-name SLOT=foo
--ui-name 1=MouseEmulation:0500:0500,2=Keyboard,mouse=Mouse
--ui-name 1=MouseEmulation,2=Keyboard,mouse=Mouse
--ui-vendor =
--ui-product
--ui-bcdversion
* document match rules
* improve output in daemon mode, when --quiet is not given print the number of allocated controller slots
* [ERROR] XboxdrvDaemon::process_match(): no free controller slot found, controller will be ignored
- should include info about what controller is ignored
* update debian package description
* need magic to assign controller to a slot:
what: match product/vendor-id, match device name
where: match USB path, match /dev/input/??? path
when: just assign them to the next free slot
--match RULE,... # match any of the given rules
--match-group RULE,... # match all of the given rules
Rules:
======
usbpath=005:003 (implicit vendor/product match)
usbid=045f:028f
evdev=/dev/input/event5
(no rules means it always matches)
1) search for match
2) if no match is found search slots without rules
* matching by usbpath makes very little sense, as the dev argument
gets incremented with each replug, bus alone might be usable
* match again sysname could make sense, seems somewhat constant: "5-2"
Xbox1 controller results in "5-2.1", due to being really two devices
* redesign match rules and only use single argument? would make
match group more logical:
--match-group vendor=045f,product=028f
* fix bugs that pop up
* valgrind before release
* allow named sections in INI files (start numbering at 0 or 1?):
[controller1/modifier]
[controller1/config1/modifier]
[controller2/modifier]
[controller2/modifier]
[controller3/config1/modifier]
[controller3/config2/modifier]
* support for Playstation button names maybe? cross, triangle, circle, square, R3, L3, ...?
* check how daemon reacts on suspend
* remember controllers that couldn't be used when all slots where full
and use them when a slot got free
* figure out a good place to set the LEDs off when Xboxdrv is quit,
just doing it in the destructor causes trouble, as the usbdev might
be no longer usable (when controller got unplugged)
* implement --on-connect and --on-disconnect for the daemon
- maybe have a more general event interface that allows to run stuff
on configuration changes, controller plug-ins, etc. (notifiy area as example)
- also supply useful information as argument
Stuff to do before 0.7.2 release:
=================================
* --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
* extend usbid match rule to bcd device
* cleanup device_id, don't manually do (slot<<16) | devid (only an
issue in force feedback code)
* get rid of all std::cout stuff when using detached daemon, redirect
log output to a file somewhere else:
--silent: stops event output
--quiet: stops all stdout output (automatically used when --detach is given)
--verbose: print info level log output
--debug: print debug level log output
Stuff to do before 0.7.3 release:
=================================
* turn EnumBox into singleton
* allow --modifier help, --ui-buttonmap X2^help
* move XBOX_BTN_UNKNOWN behind XBOX_BTN_MAX, so iteration can start
from 0 instead of 1, also fix incorrect iterations all over the
place -> doesn't work as some code uses XBOX_BTN_UNKNOWN as 'no
button is pressed'
* improve output on which uinput devices are created (even with udev
there doesn't seem to be a bullet proof way to detect what gets
created)
* document significant patches in AUTHORS
2 Added latest version of runxboxdrv from Michael Rans <rans@email.com>
1 Added trigger deadzone patch from Jan Henning Thorsen <git@flodhest.net> with a few changes
1 Applied daniel åkerud <daniel.akerud@gmail.com>'s SIGTERM patch
1 Applied low latency patch from daniel åkerud <daniel.akerud@gmail.com>
1 Author: Aaron Denney <wnoise@ofb.net>
1 hal daemon from Thomas Debouverie <debouverie_thomas@yahoo.fr>
1 Implemented --ui-buttonmap A=BTN_A@{device_id} ??!?!?
* do modifier/filter dump when --verbose is given, make verbose
overall more useful
* need to hide/disable the toggle button from the UIButtonmap
- maybe implement some full post-parsing option verification to
check for conflicts and necessary modifications?
- Options::finish() to do final things?
* print controller type/name in daemon (little tricky as that is only
known after opening the USB connection)
Stuff to do before 0.7.x release:
=================================
* -R, --rumble-test is broken for FirestormDualController (has no analog triggers)
* add ABS support to macros (need to deal with min/max)
* Playstation 3 controller support
- http://www.pabr.org/sixlinux/sixlinux.en.html
- http://www.motioninjoy.com/
- figure out what the remaining unknown bits mean:
data from just pluging the controller in and out a few times
without much pause inbetween:
Dualshock3:
// leaving controller plugged in for a longer time settles to this:
00 00 03 ef 16 00 00 00 00 33 fc 77 01 de
00 00 03 ef 16 00 00 00 00 33 fc 77 01 de
00 00 03 ef 16 00 00 00 00 33 fc 77 01 c0
00 00 02 ee 12 00 00 00 00 12 fc 77 01 de
^^^^^ ^^^^^
00 00 01 ee 12 00 00 00 00 12 fc 77 01 de
00 00 03 ef 16 00 00 00 00 11 fc 77 01 de
00 00 03 ef 16 00 00 00 00 33 fc 77 01 de
00 00 02 ee 12 00 00 00 00 12 fc 77 01 de
wrong ideas: bluetooth master id
00 00 01 ef 16 00 00 00 00 11 fc 77 01 c0
00 00 03 ef 16 00 00 00 00 11 fc 77 01 c0
SIXAXIS:
00 00 06 ee 10 00 00 00 00 06 83 77 01 81
00 00 06 ee 10 00 00 00 00 06 83 77 01
00 00 06 ee 10 00 00 00 00 06 83 77
// taken from: http://www.pabr.org/sixlinux/sixlinux.en.html
00 00 02 ee 10 00 00 00 00 02 b2 77 01 81
random guesses: bluetooth id, serial number, calibration data,
battery status
* add support for pairing the controller to the PC (or zero)
--ps3-pair 00:00:00:00:00:00
--ps3-pair-with-bluetooth
* get rid of set_button()/get_button(), turn the message objects into full classes
* document common problems, such as lack of deadzone handling in games
* 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
* 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
* current deadzone code messes up the diagonals
* 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
* add analog emulation for button (i.e. the longer its pressed, the higher the value)
* 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
* 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
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
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
Stuff to do before 0.7.x release:
=================================
* "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?
* add extra checks to make sure the evdev buttons and axis given exist on the current device
* make dummy joystick axis, mouse button 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
* 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
* 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-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:
===============
* 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
* 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)
* 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
* 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?)
* 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
# EOF #