xboxdrv/TODO
2011-02-16 18:54:07 +01:00

466 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.2 ~/projects/xboxdrv/htdocs/xboxdrv-linux-0.7.2.tar.bz2
$ dch -v "0.7.2-1" "xboxdrv 0.7.2 release"
$ git-buildpackage --git-no-create-orig --git-tag --git-builder="debuild -S"
$ sudo pbuilder --build --basetgz /var/cache/pbuilder/base-maverick.tgz ../xboxdrv_0.7.2-1.dsc
$ dput my-ppa ../xboxdrv_0.7.2-1_source.changes
# Ubuntu 10.04 (LTS)
$ cd ../debian/
$ git checkout master-lts
$ git merge master
$ dch -b -v "0.7.2-1~lucid1" --distribution lucid "xboxdrv 0.7.2 backport"
$ git-buildpackage --git-no-create-orig --git-debian-branch=master-lts --git-tag --git-builder="debuild -S"
$ sudo pbuilder --build --basetgz /var/cache/pbuilder/base-lucid.tgz ../xboxdrv_0.7.2-1~lucid1.dsc
$ dput my-ppa ../xboxdrv_0.7.2-1~lucid1_source.changes
Stuff to do before 0.7.2 release:
=================================
* daemon on regular xboxdrv have different controller orderings
* swap controller slots via dbus
* look at Joy2key for better mouse support (mouse acceleration)
* reenable USBThread, maybe add a way to cancel stuff to it if possible?
* add a fun modifier that counts button presses and other useless stuff
- count button presses (done)
- count time a button is held down, both in min:sec and percent
- count distance an axis travels
* give proper exit code when no controller is found
* add FIFO/Socket or Dbus to send commands to xboxdrv (FIFO is
easiest, but least flexible, dbus is new and cool, but an extra
dependency)
dbus-send --session --type=method_call \
--print-reply \
--dest=org.gnome.Rhythmbox \
/org/gnome/Rhythmbox/Player \
org.freedesktop.DBus.Introspectable.Introspect
* add --ui-buttonmap A=KEY_A:KEY_B:1000:1
the last 0/1 parameter tells if it should do:
- 0: send on release
- 1: always send when pressed
different games might require different behaviours, so it should be an user option
* add double shift buttons: L+R+start
* add execv: that takes arguments in ARG0:ARG1,... style
* add system: that takes arguments "ARG0 ARG1 ..." style
* factory must create four wireless controllers for each wireless USB device
* add match rule for wireless id
* add --exclued, --exclude-group as ControllerMatchRules
* XboxdrvThread or XboxGenericController must hold information on
their: bus:dev, vendor:product and other potentially useful
information, match rule must match against controller, not
udev_device
-> doesn't work, as we don't have a controller at that point
-> match against abstract ControllerInfo object?
-> get_busnum()
-> get_devnum()
-> figure out potential matches early and save the valid slots?
-> ugly but could work
* turn ControllerSlot into ControllerSlotPtr (careful with loop in the refcount)
* allow setting a --default-name from which all other controller names
are derived
* add [controller0/config0] support for ControllerOptions
* add [controller0] support for ControllerSlotOptions
* sort options a bit more between global ones, slot local ones and
config local ones
* BTN_A@joystick.1 doesn't work for a single joystick, why?
* write relaxation modifier/filter
* make extra-event creation a bit more clever, i.e. only create BTN_A
when needed, not when another button is present that can be used to
identify the device as joystick, also document exactly which
buttons/axis combinations are valid.
* allow something like:
void = BTN_A
to create empty events on uinput
Daemon
======
* improve output in daemon mode, when --quiet is not given print the
number of allocated controller slots
* how exactly does daemon interact with wireless pads?!
-> it doesn't, only used the first gamepad or the one given by --wid
-> either use all, allow an option to say how many to use
-> launch listener threads on each port, but only 'activate' the
slot when the controller is connected
* after every thread cleanup, to an enumeration over all USB devices,
find those not currently used by a Slot and recreate them, this
should fix resume issues, this would also fix the issue with
ignoring controllers when all slots are full
Other Stuff
===========
* in INI files allow:
[xboxdrv]
ui-buttonmap = A=BTN_A,B=BTN_B,...
- in general cleanup config handling, turn almost everything into
proper functions and use the same functions for both cmdline and ini
* --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
* check how daemon reacts on suspend
- suspending the computer leads to LIBUSB_ERROR_IO, unplugging the
controller leads to LIBUSB_ERROR_OTHER
- errno is set to EBUSY
- the device handle can't be reused, device has to be reallocated
- integrate this with the "keep backlog of devices currently in use"
* remember controllers that couldn't be used when all slots where full
and use them when a slot got free
* 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)
* do modifier/filter dump when --verbose is given, make verbose
overall more useful
* remove uinput.send_rel_repetitive() replace with just EventHandler::update()
* add --device-usbid TYPE.SLOT=VENDOR:PRODUCT:VERSION
* allow multiple controllers in non-daemon mode
* make more use of percentance values (in deadzone filter for example)
* add extra arguments to --on-connect and --on-disconnect (controller name, usb path, etc.)
* boost::lexical_cast<> error messages are useless, make some better ones
* couldn't convert 'XK_Page_Up' to enum, not a member of X11Keysym
currenty code can't handle multple names for a single key
* --match again sysname could make sense, seems somewhat constant:
"5-2" Xbox1 controller results in "5-2.1", due to being really two
devices, would help to now how exactly those are formed
* --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
* 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 EnumBox to have multiple names per values per key
* allow --modifier help, --ui-buttonmap X2^help
* move XBOX_BTN_UNKNOWN behind XBOX_BTN_MAX (or make it -1), 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'
* 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} ??!?!?
* 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?
Stuff to do before 0.7.x release:
=================================
* add Wiimote and PS3 bluetooth support
* -R, --rumble-test is broken for FirestormDualController (has no analog triggers)
* add ABS support to macros events (need to deal with min/max)
* 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
* 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()
* 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
Stuff to do before 0.7.x release:
=================================
* add extra checks to make sure the evdev buttons and axis given exist on the current device
* 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
* 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
Feature
=======
* figure out a way to make userspace force feedback driver not become dead processes
* test TR:Anniversary with max effect 16
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?)
Stuff to do before 0.8.0 release:
=================================
* Playstation 3 controller bluetooth 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
* Wiimote support (either native or via libcwiid
Random Stuff
============
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 #