Commit 89237c42 authored by Mauro Carvalho Chehab's avatar Mauro Carvalho Chehab Committed by Dmitry Torokhov

Input: joystick - convert documentation into ReST format

This file require minimum adjustments to be a valid ReST file.
Do it, in order to be able to parse it with Sphinx.
Signed-off-by: default avatarMauro Carvalho Chehab <mchehab@s-opensource.com>
Signed-off-by: default avatarDmitry Torokhov <dmitry.torokhov@gmail.com>
parent 0498b4b4
Linux Joystick driver v2.0.0 .. include:: <isonum.txt>
(c) 1996-2000 Vojtech Pavlik <vojtech@ucw.cz>
Sponsored by SuSE ============================
---------------------------------------------------------------------------- Linux Joystick driver v2.0.0
============================
0. Disclaimer
~~~~~~~~~~~~~ :Copyright: |copy| 1996-2000 Vojtech Pavlik <vojtech@ucw.cz> - Sponsored by SuSE
This program is free software; you can redistribute it and/or modify it
Disclaimer
==========
This program is free software; you can redistribute it and/or modify it
under the terms of the GNU General Public License as published by the Free under the terms of the GNU General Public License as published by the Free
Software Foundation; either version 2 of the License, or (at your option) Software Foundation; either version 2 of the License, or (at your option)
any later version. any later version.
This program is distributed in the hope that it will be useful, but This program is distributed in the hope that it will be useful, but
WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
more details. more details.
You should have received a copy of the GNU General Public License along You should have received a copy of the GNU General Public License along
with this program; if not, write to the Free Software Foundation, Inc., 59 with this program; if not, write to the Free Software Foundation, Inc., 59
Temple Place, Suite 330, Boston, MA 02111-1307 USA Temple Place, Suite 330, Boston, MA 02111-1307 USA
Should you need to contact me, the author, you can do so either by e-mail Should you need to contact me, the author, you can do so either by e-mail
- mail your message to <vojtech@ucw.cz>, or by paper mail: Vojtech Pavlik, - mail your message to <vojtech@ucw.cz>, or by paper mail: Vojtech Pavlik,
Simunkova 1594, Prague 8, 182 00 Czech Republic Simunkova 1594, Prague 8, 182 00 Czech Republic
For your convenience, the GNU General Public License version 2 is included For your convenience, the GNU General Public License version 2 is included
in the package: See the file COPYING. in the package: See the file COPYING.
1. Intro Intro
~~~~~~~~ =====
The joystick driver for Linux provides support for a variety of joysticks
The joystick driver for Linux provides support for a variety of joysticks
and similar devices. It is based on a larger project aiming to support all and similar devices. It is based on a larger project aiming to support all
input devices in Linux. input devices in Linux.
Should you encounter any problems while using the driver, or joysticks Should you encounter any problems while using the driver, or joysticks
this driver can't make complete use of, I'm very interested in hearing about this driver can't make complete use of, I'm very interested in hearing about
them. Bug reports and success stories are also welcome. them. Bug reports and success stories are also welcome.
The input project website is at: The input project website is at:
http://atrey.karlin.mff.cuni.cz/~vojtech/input/ http://atrey.karlin.mff.cuni.cz/~vojtech/input/
There is also a mailing list for the driver at: There is also a mailing list for the driver at:
listproc@atrey.karlin.mff.cuni.cz listproc@atrey.karlin.mff.cuni.cz
send "subscribe linux-joystick Your Name" to subscribe to it. send "subscribe linux-joystick Your Name" to subscribe to it.
2. Usage Usage
~~~~~~~~ =====
For basic usage you just choose the right options in kernel config and
For basic usage you just choose the right options in kernel config and
you should be set. you should be set.
2.1 inpututils inpututils
~~~~~~~~~~~~~~ ----------
For testing and other purposes (for example serial devices), a set of For testing and other purposes (for example serial devices), a set of
utilities is available at the abovementioned website. I suggest you download utilities is available at the abovementioned website. I suggest you download
and install it before going on. and install it before going on.
2.2 Device nodes Device nodes
~~~~~~~~~~~~~~~~ ------------
For applications to be able to use the joysticks, For applications to be able to use the joysticks,
you'll have to manually create these nodes in /dev: you'll have to manually create these nodes in /dev::
cd /dev cd /dev
rm js* rm js*
mkdir input mkdir input
mknod input/js0 c 13 0 mknod input/js0 c 13 0
mknod input/js1 c 13 1 mknod input/js1 c 13 1
mknod input/js2 c 13 2 mknod input/js2 c 13 2
mknod input/js3 c 13 3 mknod input/js3 c 13 3
ln -s input/js0 js0 ln -s input/js0 js0
ln -s input/js1 js1 ln -s input/js1 js1
ln -s input/js2 js2 ln -s input/js2 js2
ln -s input/js3 js3 ln -s input/js3 js3
For testing with inpututils it's also convenient to create these: For testing with inpututils it's also convenient to create these::
mknod input/event0 c 13 64 mknod input/event0 c 13 64
mknod input/event1 c 13 65 mknod input/event1 c 13 65
mknod input/event2 c 13 66 mknod input/event2 c 13 66
mknod input/event3 c 13 67 mknod input/event3 c 13 67
2.4 Modules needed Modules needed
~~~~~~~~~~~~~~~~~~ --------------
For all joystick drivers to function, you'll need the userland interface
module in kernel, either loaded or compiled in: For all joystick drivers to function, you'll need the userland interface
module in kernel, either loaded or compiled in::
modprobe joydev modprobe joydev
For gameport joysticks, you'll have to load the gameport driver as well; For gameport joysticks, you'll have to load the gameport driver as well::
modprobe ns558 modprobe ns558
And for serial port joysticks, you'll need the serial input line And for serial port joysticks, you'll need the serial input line
discipline module loaded and the inputattach utility started: discipline module loaded and the inputattach utility started::
modprobe serport modprobe serport
inputattach -xxx /dev/tts/X & inputattach -xxx /dev/tts/X &
In addition to that, you'll need the joystick driver module itself, most In addition to that, you'll need the joystick driver module itself, most
usually you'll have an analog joystick: usually you'll have an analog joystick::
modprobe analog modprobe analog
For automatic module loading, something like this might work - tailor to For automatic module loading, something like this might work - tailor to
your needs: your needs::
alias tty-ldisc-2 serport alias tty-ldisc-2 serport
alias char-major-13 input alias char-major-13 input
above input joydev ns558 analog above input joydev ns558 analog
options analog map=gamepad,none,2btn options analog map=gamepad,none,2btn
2.5 Verifying that it works Verifying that it works
~~~~~~~~~~~~~~~~~~~~~~~~~~~ -----------------------
For testing the joystick driver functionality, there is the jstest
program in the utilities package. You run it by typing: For testing the joystick driver functionality, there is the jstest
program in the utilities package. You run it by typing::
jstest /dev/input/js0 jstest /dev/input/js0
And it should show a line with the joystick values, which update as you And it should show a line with the joystick values, which update as you
move the stick, and press its buttons. The axes should all be zero when the move the stick, and press its buttons. The axes should all be zero when the
joystick is in the center position. They should not jitter by themselves to joystick is in the center position. They should not jitter by themselves to
other close values, and they also should be steady in any other position of other close values, and they also should be steady in any other position of
the stick. They should have the full range from -32767 to 32767. If all this the stick. They should have the full range from -32767 to 32767. If all this
is met, then it's all fine, and you can play the games. :) is met, then it's all fine, and you can play the games. :)
If it's not, then there might be a problem. Try to calibrate the joystick, If it's not, then there might be a problem. Try to calibrate the joystick,
and if it still doesn't work, read the drivers section of this file, the and if it still doesn't work, read the drivers section of this file, the
troubleshooting section, and the FAQ. troubleshooting section, and the FAQ.
2.6. Calibration Calibration
~~~~~~~~~~~~~~~~ -----------
For most joysticks you won't need any manual calibration, since the
For most joysticks you won't need any manual calibration, since the
joystick should be autocalibrated by the driver automagically. However, with joystick should be autocalibrated by the driver automagically. However, with
some analog joysticks, that either do not use linear resistors, or if you some analog joysticks, that either do not use linear resistors, or if you
want better precision, you can use the jscal program want better precision, you can use the jscal program::
jscal -c /dev/input/js0 jscal -c /dev/input/js0
included in the joystick package to set better correction coefficients than included in the joystick package to set better correction coefficients than
what the driver would choose itself. what the driver would choose itself.
After calibrating the joystick you can verify if you like the new After calibrating the joystick you can verify if you like the new
calibration using the jstest command, and if you do, you then can save the calibration using the jstest command, and if you do, you then can save the
correction coefficients into a file correction coefficients into a file::
jscal -p /dev/input/js0 > /etc/joystick.cal jscal -p /dev/input/js0 > /etc/joystick.cal
And add a line to your rc script executing that file And add a line to your rc script executing that file::
source /etc/joystick.cal source /etc/joystick.cal
This way, after the next reboot your joystick will remain calibrated. You This way, after the next reboot your joystick will remain calibrated. You
can also add the jscal -p line to your shutdown script. can also add the ``jscal -p`` line to your shutdown script.
3. HW specific driver information HW specific driver information
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ==============================
In this section each of the separate hardware specific drivers is described. In this section each of the separate hardware specific drivers is described.
3.1 Analog joysticks Analog joysticks
~~~~~~~~~~~~~~~~~~~~ ----------------
The analog.c uses the standard analog inputs of the gameport, and thus
The analog.c uses the standard analog inputs of the gameport, and thus
supports all standard joysticks and gamepads. It uses a very advanced supports all standard joysticks and gamepads. It uses a very advanced
routine for this, allowing for data precision that can't be found on any routine for this, allowing for data precision that can't be found on any
other system. other system.
It also supports extensions like additional hats and buttons compatible It also supports extensions like additional hats and buttons compatible
with CH Flightstick Pro, ThrustMaster FCS or 6 and 8 button gamepads. Saitek with CH Flightstick Pro, ThrustMaster FCS or 6 and 8 button gamepads. Saitek
Cyborg 'digital' joysticks are also supported by this driver, because Cyborg 'digital' joysticks are also supported by this driver, because
they're basically souped up CHF sticks. they're basically souped up CHF sticks.
However the only types that can be autodetected are: However the only types that can be autodetected are:
* 2-axis, 4-button joystick * 2-axis, 4-button joystick
* 3-axis, 4-button joystick * 3-axis, 4-button joystick
* 4-axis, 4-button joystick * 4-axis, 4-button joystick
* Saitek Cyborg 'digital' joysticks * Saitek Cyborg 'digital' joysticks
For other joystick types (more/less axes, hats, and buttons) support For other joystick types (more/less axes, hats, and buttons) support
you'll need to specify the types either on the kernel command line or on the you'll need to specify the types either on the kernel command line or on the
module command line, when inserting analog into the kernel. The module command line, when inserting analog into the kernel. The
parameters are: parameters are::
analog.map=<type1>,<type2>,<type3>,.... analog.map=<type1>,<type2>,<type3>,....
'type' is type of the joystick from the table below, defining joysticks 'type' is type of the joystick from the table below, defining joysticks
present on gameports in the system, starting with gameport0, second 'type' present on gameports in the system, starting with gameport0, second 'type'
entry defining joystick on gameport1 and so on. entry defining joystick on gameport1 and so on.
Type | Meaning ========= =====================================================
----------------------------------- Type Meaning
none | No analog joystick on that port ========= =====================================================
auto | Autodetect joystick none No analog joystick on that port
2btn | 2-button n-axis joystick auto Autodetect joystick
y-joy | Two 2-button 2-axis joysticks on an Y-cable 2btn 2-button n-axis joystick
y-pad | Two 2-button 2-axis gamepads on an Y-cable y-joy Two 2-button 2-axis joysticks on an Y-cable
fcs | Thrustmaster FCS compatible joystick y-pad Two 2-button 2-axis gamepads on an Y-cable
chf | Joystick with a CH Flightstick compatible hat fcs Thrustmaster FCS compatible joystick
fullchf | CH Flightstick compatible with two hats and 6 buttons chf Joystick with a CH Flightstick compatible hat
gamepad | 4/6-button n-axis gamepad fullchf CH Flightstick compatible with two hats and 6 buttons
gamepad8 | 8-button 2-axis gamepad gamepad 4/6-button n-axis gamepad
gamepad8 8-button 2-axis gamepad
In case your joystick doesn't fit in any of the above categories, you can ========= =====================================================
In case your joystick doesn't fit in any of the above categories, you can
specify the type as a number by combining the bits in the table below. This specify the type as a number by combining the bits in the table below. This
is not recommended unless you really know what are you doing. It's not is not recommended unless you really know what are you doing. It's not
dangerous, but not simple either. dangerous, but not simple either.
Bit | Meaning ==== =========================
-------------------------- Bit Meaning
0 | Axis X1 ==== =========================
1 | Axis Y1 0 Axis X1
2 | Axis X2 1 Axis Y1
3 | Axis Y2 2 Axis X2
4 | Button A 3 Axis Y2
5 | Button B 4 Button A
6 | Button C 5 Button B
7 | Button D 6 Button C
8 | CHF Buttons X and Y 7 Button D
9 | CHF Hat 1 8 CHF Buttons X and Y
10 | CHF Hat 2 9 CHF Hat 1
11 | FCS Hat 10 CHF Hat 2
12 | Pad Button X 11 FCS Hat
13 | Pad Button Y 12 Pad Button X
14 | Pad Button U 13 Pad Button Y
15 | Pad Button V 14 Pad Button U
16 | Saitek F1-F4 Buttons 15 Pad Button V
17 | Saitek Digital Mode 16 Saitek F1-F4 Buttons
19 | GamePad 17 Saitek Digital Mode
20 | Joy2 Axis X1 19 GamePad
21 | Joy2 Axis Y1 20 Joy2 Axis X1
22 | Joy2 Axis X2 21 Joy2 Axis Y1
23 | Joy2 Axis Y2 22 Joy2 Axis X2
24 | Joy2 Button A 23 Joy2 Axis Y2
25 | Joy2 Button B 24 Joy2 Button A
26 | Joy2 Button C 25 Joy2 Button B
27 | Joy2 Button D 26 Joy2 Button C
31 | Joy2 GamePad 27 Joy2 Button D
31 Joy2 GamePad
3.2 Microsoft SideWinder joysticks ==== =========================
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Microsoft 'Digital Overdrive' protocol is supported by the sidewinder.c Microsoft SideWinder joysticks
------------------------------
Microsoft 'Digital Overdrive' protocol is supported by the sidewinder.c
module. All currently supported joysticks: module. All currently supported joysticks:
* Microsoft SideWinder 3D Pro * Microsoft SideWinder 3D Pro
* Microsoft SideWinder Force Feedback Pro * Microsoft SideWinder Force Feedback Pro
* Microsoft SideWinder Force Feedback Wheel * Microsoft SideWinder Force Feedback Wheel
* Microsoft SideWinder FreeStyle Pro * Microsoft SideWinder FreeStyle Pro
* Microsoft SideWinder GamePad (up to four, chained) * Microsoft SideWinder GamePad (up to four, chained)
* Microsoft SideWinder Precision Pro * Microsoft SideWinder Precision Pro
* Microsoft SideWinder Precision Pro USB * Microsoft SideWinder Precision Pro USB
are autodetected, and thus no module parameters are needed. are autodetected, and thus no module parameters are needed.
There is one caveat with the 3D Pro. There are 9 buttons reported, There is one caveat with the 3D Pro. There are 9 buttons reported,
although the joystick has only 8. The 9th button is the mode switch on the although the joystick has only 8. The 9th button is the mode switch on the
rear side of the joystick. However, moving it, you'll reset the joystick, rear side of the joystick. However, moving it, you'll reset the joystick,
and make it unresponsive for about a one third of a second. Furthermore, the and make it unresponsive for about a one third of a second. Furthermore, the
joystick will also re-center itself, taking the position it was in during joystick will also re-center itself, taking the position it was in during
this time as a new center position. Use it if you want, but think first. this time as a new center position. Use it if you want, but think first.
The SideWinder Standard is not a digital joystick, and thus is supported The SideWinder Standard is not a digital joystick, and thus is supported
by the analog driver described above. by the analog driver described above.
Logitech ADI devices
--------------------
3.3 Logitech ADI devices Logitech ADI protocol is supported by the adi.c module. It should support
~~~~~~~~~~~~~~~~~~~~~~~~
Logitech ADI protocol is supported by the adi.c module. It should support
any Logitech device using this protocol. This includes, but is not limited any Logitech device using this protocol. This includes, but is not limited
to: to:
...@@ -279,20 +299,21 @@ to: ...@@ -279,20 +299,21 @@ to:
* Logitech WingMan GamePad Extreme * Logitech WingMan GamePad Extreme
* Logitech WingMan Extreme Digital 3D * Logitech WingMan Extreme Digital 3D
ADI devices are autodetected, and the driver supports up to two (any ADI devices are autodetected, and the driver supports up to two (any
combination of) devices on a single gameport, using an Y-cable or chained combination of) devices on a single gameport, using an Y-cable or chained
together. together.
Logitech WingMan Joystick, Logitech WingMan Attack, Logitech WingMan Logitech WingMan Joystick, Logitech WingMan Attack, Logitech WingMan
Extreme and Logitech WingMan ThunderPad are not digital joysticks and are Extreme and Logitech WingMan ThunderPad are not digital joysticks and are
handled by the analog driver described above. Logitech WingMan Warrior and handled by the analog driver described above. Logitech WingMan Warrior and
Logitech Magellan are supported by serial drivers described below. Logitech Logitech Magellan are supported by serial drivers described below. Logitech
WingMan Force and Logitech WingMan Formula Force are supported by the WingMan Force and Logitech WingMan Formula Force are supported by the
I-Force driver described below. Logitech CyberMan is not supported yet. I-Force driver described below. Logitech CyberMan is not supported yet.
3.4 Gravis GrIP Gravis GrIP
~~~~~~~~~~~~~~~ -----------
Gravis GrIP protocol is supported by the grip.c module. It currently
Gravis GrIP protocol is supported by the grip.c module. It currently
supports: supports:
* Gravis GamePad Pro * Gravis GamePad Pro
...@@ -300,7 +321,7 @@ supports: ...@@ -300,7 +321,7 @@ supports:
* Gravis Xterminator * Gravis Xterminator
* Gravis Xterminator DualControl * Gravis Xterminator DualControl
All these devices are autodetected, and you can even use any combination All these devices are autodetected, and you can even use any combination
of up to two of these pads either chained together or using an Y-cable on a of up to two of these pads either chained together or using an Y-cable on a
single gameport. single gameport.
...@@ -308,9 +329,10 @@ GrIP MultiPort isn't supported yet. Gravis Stinger is a serial device and is ...@@ -308,9 +329,10 @@ GrIP MultiPort isn't supported yet. Gravis Stinger is a serial device and is
supported by the stinger driver. Other Gravis joysticks are supported by the supported by the stinger driver. Other Gravis joysticks are supported by the
analog driver. analog driver.
3.5 FPGaming A3D and MadCatz A3D FPGaming A3D and MadCatz A3D
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ----------------------------
The Assassin 3D protocol created by FPGaming, is used both by FPGaming
The Assassin 3D protocol created by FPGaming, is used both by FPGaming
themselves and is licensed to MadCatz. A3D devices are supported by the themselves and is licensed to MadCatz. A3D devices are supported by the
a3d.c module. It currently supports: a3d.c module. It currently supports:
...@@ -318,125 +340,139 @@ a3d.c module. It currently supports: ...@@ -318,125 +340,139 @@ a3d.c module. It currently supports:
* MadCatz Panther * MadCatz Panther
* MadCatz Panther XL * MadCatz Panther XL
All these devices are autodetected. Because the Assassin 3D and the Panther All these devices are autodetected. Because the Assassin 3D and the Panther
allow connecting analog joysticks to them, you'll need to load the analog allow connecting analog joysticks to them, you'll need to load the analog
driver as well to handle the attached joysticks. driver as well to handle the attached joysticks.
The trackball should work with USB mousedev module as a normal mouse. See The trackball should work with USB mousedev module as a normal mouse. See
the USB documentation for how to setup an USB mouse. the USB documentation for how to setup an USB mouse.
3.6 ThrustMaster DirectConnect (BSP) ThrustMaster DirectConnect (BSP)
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ --------------------------------
The TM DirectConnect (BSP) protocol is supported by the tmdc.c
The TM DirectConnect (BSP) protocol is supported by the tmdc.c
module. This includes, but is not limited to: module. This includes, but is not limited to:
* ThrustMaster Millennium 3D Interceptor * ThrustMaster Millennium 3D Interceptor
* ThrustMaster 3D Rage Pad * ThrustMaster 3D Rage Pad
* ThrustMaster Fusion Digital Game Pad * ThrustMaster Fusion Digital Game Pad
Devices not directly supported, but hopefully working are: Devices not directly supported, but hopefully working are:
* ThrustMaster FragMaster * ThrustMaster FragMaster
* ThrustMaster Attack Throttle * ThrustMaster Attack Throttle
If you have one of these, contact me. If you have one of these, contact me.
TMDC devices are autodetected, and thus no parameters to the module TMDC devices are autodetected, and thus no parameters to the module
are needed. Up to two TMDC devices can be connected to one gameport, using are needed. Up to two TMDC devices can be connected to one gameport, using
an Y-cable. an Y-cable.
3.7 Creative Labs Blaster Creative Labs Blaster
~~~~~~~~~~~~~~~~~~~~~~~~~ ---------------------
The Blaster protocol is supported by the cobra.c module. It supports only
The Blaster protocol is supported by the cobra.c module. It supports only
the: the:
* Creative Blaster GamePad Cobra * Creative Blaster GamePad Cobra
Up to two of these can be used on a single gameport, using an Y-cable. Up to two of these can be used on a single gameport, using an Y-cable.
Genius Digital joysticks
------------------------
3.8 Genius Digital joysticks The Genius digitally communicating joysticks are supported by the gf2k.c
~~~~~~~~~~~~~~~~~~~~~~~~~~~~
The Genius digitally communicating joysticks are supported by the gf2k.c
module. This includes: module. This includes:
* Genius Flight2000 F-23 joystick * Genius Flight2000 F-23 joystick
* Genius Flight2000 F-31 joystick * Genius Flight2000 F-31 joystick
* Genius G-09D gamepad * Genius G-09D gamepad
Other Genius digital joysticks are not supported yet, but support can be Other Genius digital joysticks are not supported yet, but support can be
added fairly easily. added fairly easily.
3.9 InterAct Digital joysticks InterAct Digital joysticks
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ --------------------------
The InterAct digitally communicating joysticks are supported by the
The InterAct digitally communicating joysticks are supported by the
interact.c module. This includes: interact.c module. This includes:
* InterAct HammerHead/FX gamepad * InterAct HammerHead/FX gamepad
* InterAct ProPad8 gamepad * InterAct ProPad8 gamepad
Other InterAct digital joysticks are not supported yet, but support can be Other InterAct digital joysticks are not supported yet, but support can be
added fairly easily. added fairly easily.
3.10 PDPI Lightning 4 gamecards PDPI Lightning 4 gamecards
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ --------------------------
PDPI Lightning 4 gamecards are supported by the lightning.c module.
PDPI Lightning 4 gamecards are supported by the lightning.c module.
Once the module is loaded, the analog driver can be used to handle the Once the module is loaded, the analog driver can be used to handle the
joysticks. Digitally communicating joystick will work only on port 0, while joysticks. Digitally communicating joystick will work only on port 0, while
using Y-cables, you can connect up to 8 analog joysticks to a single L4 using Y-cables, you can connect up to 8 analog joysticks to a single L4
card, 16 in case you have two in your system. card, 16 in case you have two in your system.
3.11 Trident 4DWave / Aureal Vortex Trident 4DWave / Aureal Vortex
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ------------------------------
Soundcards with a Trident 4DWave DX/NX or Aureal Vortex/Vortex2 chipsets
Soundcards with a Trident 4DWave DX/NX or Aureal Vortex/Vortex2 chipsets
provide an "Enhanced Game Port" mode where the soundcard handles polling the provide an "Enhanced Game Port" mode where the soundcard handles polling the
joystick. This mode is supported by the pcigame.c module. Once loaded the joystick. This mode is supported by the pcigame.c module. Once loaded the
analog driver can use the enhanced features of these gameports.. analog driver can use the enhanced features of these gameports..
3.13 Crystal SoundFusion Crystal SoundFusion
~~~~~~~~~~~~~~~~~~~~~~~~ -------------------
Soundcards with Crystal SoundFusion chipsets provide an "Enhanced Game
Soundcards with Crystal SoundFusion chipsets provide an "Enhanced Game
Port", much like the 4DWave or Vortex above. This, and also the normal mode Port", much like the 4DWave or Vortex above. This, and also the normal mode
for the port of the SoundFusion is supported by the cs461x.c module. for the port of the SoundFusion is supported by the cs461x.c module.
3.14 SoundBlaster Live! SoundBlaster Live!
~~~~~~~~~~~~~~~~~~~~~~~~ ------------------
The Live! has a special PCI gameport, which, although it doesn't provide
The Live! has a special PCI gameport, which, although it doesn't provide
any "Enhanced" stuff like 4DWave and friends, is quite a bit faster than any "Enhanced" stuff like 4DWave and friends, is quite a bit faster than
its ISA counterparts. It also requires special support, hence the its ISA counterparts. It also requires special support, hence the
emu10k1-gp.c module for it instead of the normal ns558.c one. emu10k1-gp.c module for it instead of the normal ns558.c one.
3.15 SoundBlaster 64 and 128 - ES1370 and ES1371, ESS Solo1 and S3 SonicVibes SoundBlaster 64 and 128 - ES1370 and ES1371, ESS Solo1 and S3 SonicVibes
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ------------------------------------------------------------------------
These PCI soundcards have specific gameports. They are handled by the
These PCI soundcards have specific gameports. They are handled by the
sound drivers themselves. Make sure you select gameport support in the sound drivers themselves. Make sure you select gameport support in the
joystick menu and sound card support in the sound menu for your appropriate joystick menu and sound card support in the sound menu for your appropriate
card. card.
3.16 Amiga Amiga
~~~~~~~~~~ -----
Amiga joysticks, connected to an Amiga, are supported by the amijoy.c
driver. Since they can't be autodetected, the driver has a command line. Amiga joysticks, connected to an Amiga, are supported by the amijoy.c
driver. Since they can't be autodetected, the driver has a command line:
amijoy.map=<a>,<b> amijoy.map=<a>,<b>
a and b define the joysticks connected to the JOY0DAT and JOY1DAT ports of a and b define the joysticks connected to the JOY0DAT and JOY1DAT ports of
the Amiga. the Amiga.
Value | Joystick type ====== ===========================
--------------------- Value Joystick type
0 | None ====== ===========================
1 | 1-button digital joystick 0 None
1 1-button digital joystick
====== ===========================
No more joystick types are supported now, but that should change in the No more joystick types are supported now, but that should change in the
future if I get an Amiga in the reach of my fingers. future if I get an Amiga in the reach of my fingers.
3.17 Game console and 8-bit pads and joysticks Game console and 8-bit pads and joysticks
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
See joystick-parport.txt for more info.
See :ref:`joystick-parport` for more info.
3.18 SpaceTec/LabTec devices SpaceTec/LabTec devices
~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -----------------------
SpaceTec serial devices communicate using the SpaceWare protocol. It is
SpaceTec serial devices communicate using the SpaceWare protocol. It is
supported by the spaceorb.c and spaceball.c drivers. The devices currently supported by the spaceorb.c and spaceball.c drivers. The devices currently
supported by spaceorb.c are: supported by spaceorb.c are:
...@@ -447,43 +483,47 @@ Devices currently supported by spaceball.c are: ...@@ -447,43 +483,47 @@ Devices currently supported by spaceball.c are:
* SpaceTec SpaceBall 4000 FLX * SpaceTec SpaceBall 4000 FLX
In addition to having the spaceorb/spaceball and serport modules in the In addition to having the spaceorb/spaceball and serport modules in the
kernel, you also need to attach a serial port to it. to do that, run the kernel, you also need to attach a serial port to it. to do that, run the
inputattach program: inputattach program::
inputattach --spaceorb /dev/tts/x & inputattach --spaceorb /dev/tts/x &
or
or::
inputattach --spaceball /dev/tts/x & inputattach --spaceball /dev/tts/x &
where /dev/tts/x is the serial port which the device is connected to. After where /dev/tts/x is the serial port which the device is connected to. After
doing this, the device will be reported and will start working. doing this, the device will be reported and will start working.
There is one caveat with the SpaceOrb. The button #6, the on the bottom There is one caveat with the SpaceOrb. The button #6, the on the bottom
side of the orb, although reported as an ordinary button, causes internal side of the orb, although reported as an ordinary button, causes internal
recentering of the spaceorb, moving the zero point to the position in which recentering of the spaceorb, moving the zero point to the position in which
the ball is at the moment of pressing the button. So, think first before the ball is at the moment of pressing the button. So, think first before
you bind it to some other function. you bind it to some other function.
SpaceTec SpaceBall 2003 FLX and 3003 FLX are not supported yet. SpaceTec SpaceBall 2003 FLX and 3003 FLX are not supported yet.
3.19 Logitech SWIFT devices Logitech SWIFT devices
~~~~~~~~~~~~~~~~~~~~~~~~~~~ ----------------------
The SWIFT serial protocol is supported by the warrior.c module. It
The SWIFT serial protocol is supported by the warrior.c module. It
currently supports only the: currently supports only the:
* Logitech WingMan Warrior * Logitech WingMan Warrior
but in the future, Logitech CyberMan (the original one, not CM2) could be but in the future, Logitech CyberMan (the original one, not CM2) could be
supported as well. To use the module, you need to run inputattach after you supported as well. To use the module, you need to run inputattach after you
insert/compile the module into your kernel: insert/compile the module into your kernel::
inputattach --warrior /dev/tts/x & inputattach --warrior /dev/tts/x &
/dev/tts/x is the serial port your Warrior is attached to. /dev/tts/x is the serial port your Warrior is attached to.
3.20 Magellan / Space Mouse Magellan / Space Mouse
~~~~~~~~~~~~~~~~~~~~~~~~~~~ ----------------------
The Magellan (or Space Mouse), manufactured by LogiCad3d (formerly Space
The Magellan (or Space Mouse), manufactured by LogiCad3d (formerly Space
Systems), for many other companies (Logitech, HP, ...) is supported by the Systems), for many other companies (Logitech, HP, ...) is supported by the
joy-magellan module. It currently supports only the: joy-magellan module. It currently supports only the:
...@@ -492,94 +532,99 @@ joy-magellan module. It currently supports only the: ...@@ -492,94 +532,99 @@ joy-magellan module. It currently supports only the:
models, the additional buttons on the 'Plus' versions are not supported yet. models, the additional buttons on the 'Plus' versions are not supported yet.
To use it, you need to attach the serial port to the driver using the To use it, you need to attach the serial port to the driver using the::
inputattach --magellan /dev/tts/x & inputattach --magellan /dev/tts/x &
command. After that the Magellan will be detected, initialized, will beep, command. After that the Magellan will be detected, initialized, will beep,
and the /dev/input/jsX device should become usable. and the /dev/input/jsX device should become usable.
3.21 I-Force devices I-Force devices
~~~~~~~~~~~~~~~~~~~~ ---------------
All I-Force devices are supported by the iforce module. This includes:
All I-Force devices are supported by the iforce module. This includes:
* AVB Mag Turbo Force * AVB Mag Turbo Force
* AVB Top Shot Pegasus * AVB Top Shot Pegasus
* AVB Top Shot Force Feedback Racing Wheel * AVB Top Shot Force Feedback Racing Wheel
* Logitech WingMan Force * Logitech WingMan Force
* Logitech WingMan Force Wheel * Logitech WingMan Force Wheel
* Guillemot Race Leader Force Feedback * Guillemot Race Leader Force Feedback
* Guillemot Force Feedback Racing Wheel * Guillemot Force Feedback Racing Wheel
* Thrustmaster Motor Sport GT * Thrustmaster Motor Sport GT
To use it, you need to attach the serial port to the driver using the To use it, you need to attach the serial port to the driver using the::
inputattach --iforce /dev/tts/x & inputattach --iforce /dev/tts/x &
command. After that the I-Force device will be detected, and the command. After that the I-Force device will be detected, and the
/dev/input/jsX device should become usable. /dev/input/jsX device should become usable.
In case you're using the device via the USB port, the inputattach command In case you're using the device via the USB port, the inputattach command
isn't needed. isn't needed.
The I-Force driver now supports force feedback via the event interface. The I-Force driver now supports force feedback via the event interface.
Please note that Logitech WingMan *3D devices are _not_ supported by this Please note that Logitech WingMan 3D devices are _not_ supported by this
module, rather by hid. Force feedback is not supported for those devices. module, rather by hid. Force feedback is not supported for those devices.
Logitech gamepads are also hid devices. Logitech gamepads are also hid devices.
3.22 Gravis Stinger gamepad Gravis Stinger gamepad
~~~~~~~~~~~~~~~~~~~~~~~~~~~ ----------------------
The Gravis Stinger serial port gamepad, designed for use with laptop
The Gravis Stinger serial port gamepad, designed for use with laptop
computers, is supported by the stinger.c module. To use it, attach the computers, is supported by the stinger.c module. To use it, attach the
serial port to the driver using: serial port to the driver using::
inputattach --stinger /dev/tty/x & inputattach --stinger /dev/tty/x &
where x is the number of the serial port. where x is the number of the serial port.
4. Troubleshooting Troubleshooting
~~~~~~~~~~~~~~~~~~ ===============
There is quite a high probability that you run into some problems. For
There is quite a high probability that you run into some problems. For
testing whether the driver works, if in doubt, use the jstest utility in testing whether the driver works, if in doubt, use the jstest utility in
some of its modes. The most useful modes are "normal" - for the 1.x some of its modes. The most useful modes are "normal" - for the 1.x
interface, and "old" for the "0.x" interface. You run it by typing: interface, and "old" for the "0.x" interface. You run it by typing::
jstest --normal /dev/input/js0 jstest --normal /dev/input/js0
jstest --old /dev/input/js0 jstest --old /dev/input/js0
Additionally you can do a test with the evtest utility: Additionally you can do a test with the evtest utility::
evtest /dev/input/event0 evtest /dev/input/event0
Oh, and read the FAQ! :) Oh, and read the FAQ! :)
FAQ
===
:Q: Running 'jstest /dev/input/js0' results in "File not found" error. What's the
cause?
:A: The device files don't exist. Create them (see section 2.2).
5. FAQ :Q: Is it possible to connect my old Atari/Commodore/Amiga/console joystick
~~~~~~ or pad that uses a 9-pin D-type cannon connector to the serial port of my
Q: Running 'jstest /dev/input/js0' results in "File not found" error. What's the PC?
cause? :A: Yes, it is possible, but it'll burn your serial port or the pad. It
A: The device files don't exist. Create them (see section 2.2). won't work, of course.
Q: Is it possible to connect my old Atari/Commodore/Amiga/console joystick :Q: My joystick doesn't work with Quake / Quake 2. What's the cause?
or pad that uses a 9-pin D-type cannon connector to the serial port of my :A: Quake / Quake 2 don't support joystick. Use joy2key to simulate keypresses
PC? for them.
A: Yes, it is possible, but it'll burn your serial port or the pad. It
won't work, of course.
Q: My joystick doesn't work with Quake / Quake 2. What's the cause? Programming Interface
A: Quake / Quake 2 don't support joystick. Use joy2key to simulate keypresses =====================
for them.
6. Programming Interface The 1.0 driver uses a new, event based approach to the joystick driver.
~~~~~~~~~~~~~~~~~~~~~~~~
The 1.0 driver uses a new, event based approach to the joystick driver.
Instead of the user program polling for the joystick values, the joystick Instead of the user program polling for the joystick values, the joystick
driver now reports only any changes of its state. See joystick-api.txt, driver now reports only any changes of its state. See joystick-api.txt,
joystick.h and jstest.c included in the joystick package for more joystick.h and jstest.c included in the joystick package for more
information. The joystick device can be used in either blocking or information. The joystick device can be used in either blocking or
nonblocking mode and supports select() calls. nonblocking mode and supports select() calls.
For backward compatibility the old (v0.x) interface is still included. For backward compatibility the old (v0.x) interface is still included.
Any call to the joystick driver using the old interface will return values Any call to the joystick driver using the old interface will return values
that are compatible to the old interface. This interface is still limited that are compatible to the old interface. This interface is still limited
to 2 axes, and applications using it usually decode only 2 buttons, although to 2 axes, and applications using it usually decode only 2 buttons, although
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment