Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

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: Mauro Carvalho Chehab <mchehab@s-opensource.com>
Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>

authored by

Mauro Carvalho Chehab and committed by
Dmitry Torokhov
89237c42 0498b4b4

+293 -248
+293 -248
Documentation/input/joystick.txt
··· 1 - Linux Joystick driver v2.0.0 2 - (c) 1996-2000 Vojtech Pavlik <vojtech@ucw.cz> 3 - Sponsored by SuSE 4 - ---------------------------------------------------------------------------- 1 + .. include:: <isonum.txt> 5 2 6 - 0. Disclaimer 7 - ~~~~~~~~~~~~~ 8 - This program is free software; you can redistribute it and/or modify it 3 + ============================ 4 + Linux Joystick driver v2.0.0 5 + ============================ 6 + 7 + :Copyright: |copy| 1996-2000 Vojtech Pavlik <vojtech@ucw.cz> - Sponsored by SuSE 8 + 9 + 10 + Disclaimer 11 + ========== 12 + 13 + This program is free software; you can redistribute it and/or modify it 9 14 under the terms of the GNU General Public License as published by the Free 10 15 Software Foundation; either version 2 of the License, or (at your option) 11 16 any later version. 12 17 13 - This program is distributed in the hope that it will be useful, but 18 + This program is distributed in the hope that it will be useful, but 14 19 WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY 15 20 or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for 16 21 more details. 17 22 18 - You should have received a copy of the GNU General Public License along 23 + You should have received a copy of the GNU General Public License along 19 24 with this program; if not, write to the Free Software Foundation, Inc., 59 20 25 Temple Place, Suite 330, Boston, MA 02111-1307 USA 21 26 22 - Should you need to contact me, the author, you can do so either by e-mail 27 + Should you need to contact me, the author, you can do so either by e-mail 23 28 - mail your message to <vojtech@ucw.cz>, or by paper mail: Vojtech Pavlik, 24 29 Simunkova 1594, Prague 8, 182 00 Czech Republic 25 30 26 - For your convenience, the GNU General Public License version 2 is included 31 + For your convenience, the GNU General Public License version 2 is included 27 32 in the package: See the file COPYING. 28 33 29 - 1. Intro 30 - ~~~~~~~~ 31 - The joystick driver for Linux provides support for a variety of joysticks 34 + Intro 35 + ===== 36 + 37 + The joystick driver for Linux provides support for a variety of joysticks 32 38 and similar devices. It is based on a larger project aiming to support all 33 39 input devices in Linux. 34 40 35 - Should you encounter any problems while using the driver, or joysticks 41 + Should you encounter any problems while using the driver, or joysticks 36 42 this driver can't make complete use of, I'm very interested in hearing about 37 43 them. Bug reports and success stories are also welcome. 38 44 39 - The input project website is at: 45 + The input project website is at: 40 46 41 47 http://atrey.karlin.mff.cuni.cz/~vojtech/input/ 42 48 43 - There is also a mailing list for the driver at: 49 + There is also a mailing list for the driver at: 44 50 45 51 listproc@atrey.karlin.mff.cuni.cz 46 52 47 53 send "subscribe linux-joystick Your Name" to subscribe to it. 48 54 49 - 2. Usage 50 - ~~~~~~~~ 51 - For basic usage you just choose the right options in kernel config and 55 + Usage 56 + ===== 57 + 58 + For basic usage you just choose the right options in kernel config and 52 59 you should be set. 53 60 54 - 2.1 inpututils 55 - ~~~~~~~~~~~~~~ 61 + inpututils 62 + ---------- 63 + 56 64 For testing and other purposes (for example serial devices), a set of 57 65 utilities is available at the abovementioned website. I suggest you download 58 66 and install it before going on. 59 67 60 - 2.2 Device nodes 61 - ~~~~~~~~~~~~~~~~ 68 + Device nodes 69 + ------------ 70 + 62 71 For applications to be able to use the joysticks, 63 - you'll have to manually create these nodes in /dev: 72 + you'll have to manually create these nodes in /dev:: 64 73 65 - cd /dev 66 - rm js* 67 - mkdir input 68 - mknod input/js0 c 13 0 69 - mknod input/js1 c 13 1 70 - mknod input/js2 c 13 2 71 - mknod input/js3 c 13 3 72 - ln -s input/js0 js0 73 - ln -s input/js1 js1 74 - ln -s input/js2 js2 75 - ln -s input/js3 js3 74 + cd /dev 75 + rm js* 76 + mkdir input 77 + mknod input/js0 c 13 0 78 + mknod input/js1 c 13 1 79 + mknod input/js2 c 13 2 80 + mknod input/js3 c 13 3 81 + ln -s input/js0 js0 82 + ln -s input/js1 js1 83 + ln -s input/js2 js2 84 + ln -s input/js3 js3 76 85 77 - For testing with inpututils it's also convenient to create these: 86 + For testing with inpututils it's also convenient to create these:: 78 87 79 - mknod input/event0 c 13 64 80 - mknod input/event1 c 13 65 81 - mknod input/event2 c 13 66 82 - mknod input/event3 c 13 67 88 + mknod input/event0 c 13 64 89 + mknod input/event1 c 13 65 90 + mknod input/event2 c 13 66 91 + mknod input/event3 c 13 67 83 92 84 - 2.4 Modules needed 85 - ~~~~~~~~~~~~~~~~~~ 86 - For all joystick drivers to function, you'll need the userland interface 87 - module in kernel, either loaded or compiled in: 93 + Modules needed 94 + -------------- 95 + 96 + For all joystick drivers to function, you'll need the userland interface 97 + module in kernel, either loaded or compiled in:: 88 98 89 99 modprobe joydev 90 100 91 - For gameport joysticks, you'll have to load the gameport driver as well; 101 + For gameport joysticks, you'll have to load the gameport driver as well:: 92 102 93 103 modprobe ns558 94 104 95 - And for serial port joysticks, you'll need the serial input line 96 - discipline module loaded and the inputattach utility started: 105 + And for serial port joysticks, you'll need the serial input line 106 + discipline module loaded and the inputattach utility started:: 97 107 98 108 modprobe serport 99 109 inputattach -xxx /dev/tts/X & 100 110 101 - In addition to that, you'll need the joystick driver module itself, most 102 - usually you'll have an analog joystick: 111 + In addition to that, you'll need the joystick driver module itself, most 112 + usually you'll have an analog joystick:: 103 113 104 114 modprobe analog 105 - 106 - For automatic module loading, something like this might work - tailor to 107 - your needs: 115 + 116 + For automatic module loading, something like this might work - tailor to 117 + your needs:: 108 118 109 119 alias tty-ldisc-2 serport 110 120 alias char-major-13 input 111 121 above input joydev ns558 analog 112 122 options analog map=gamepad,none,2btn 113 123 114 - 2.5 Verifying that it works 115 - ~~~~~~~~~~~~~~~~~~~~~~~~~~~ 116 - For testing the joystick driver functionality, there is the jstest 117 - program in the utilities package. You run it by typing: 124 + Verifying that it works 125 + ----------------------- 126 + 127 + For testing the joystick driver functionality, there is the jstest 128 + program in the utilities package. You run it by typing:: 118 129 119 130 jstest /dev/input/js0 120 131 121 - And it should show a line with the joystick values, which update as you 132 + And it should show a line with the joystick values, which update as you 122 133 move the stick, and press its buttons. The axes should all be zero when the 123 134 joystick is in the center position. They should not jitter by themselves to 124 135 other close values, and they also should be steady in any other position of 125 136 the stick. They should have the full range from -32767 to 32767. If all this 126 137 is met, then it's all fine, and you can play the games. :) 127 138 128 - If it's not, then there might be a problem. Try to calibrate the joystick, 139 + If it's not, then there might be a problem. Try to calibrate the joystick, 129 140 and if it still doesn't work, read the drivers section of this file, the 130 141 troubleshooting section, and the FAQ. 131 142 132 - 2.6. Calibration 133 - ~~~~~~~~~~~~~~~~ 134 - For most joysticks you won't need any manual calibration, since the 143 + Calibration 144 + ----------- 145 + 146 + For most joysticks you won't need any manual calibration, since the 135 147 joystick should be autocalibrated by the driver automagically. However, with 136 148 some analog joysticks, that either do not use linear resistors, or if you 137 - want better precision, you can use the jscal program 149 + want better precision, you can use the jscal program:: 138 150 139 151 jscal -c /dev/input/js0 140 152 141 - included in the joystick package to set better correction coefficients than 153 + included in the joystick package to set better correction coefficients than 142 154 what the driver would choose itself. 143 155 144 - After calibrating the joystick you can verify if you like the new 156 + After calibrating the joystick you can verify if you like the new 145 157 calibration using the jstest command, and if you do, you then can save the 146 - correction coefficients into a file 158 + correction coefficients into a file:: 147 159 148 160 jscal -p /dev/input/js0 > /etc/joystick.cal 149 161 150 - And add a line to your rc script executing that file 162 + And add a line to your rc script executing that file:: 151 163 152 164 source /etc/joystick.cal 153 165 154 - This way, after the next reboot your joystick will remain calibrated. You 155 - can also add the jscal -p line to your shutdown script. 166 + This way, after the next reboot your joystick will remain calibrated. You 167 + can also add the ``jscal -p`` line to your shutdown script. 156 168 157 169 158 - 3. HW specific driver information 159 - ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 170 + HW specific driver information 171 + ============================== 172 + 160 173 In this section each of the separate hardware specific drivers is described. 161 174 162 - 3.1 Analog joysticks 163 - ~~~~~~~~~~~~~~~~~~~~ 164 - The analog.c uses the standard analog inputs of the gameport, and thus 175 + Analog joysticks 176 + ---------------- 177 + 178 + The analog.c uses the standard analog inputs of the gameport, and thus 165 179 supports all standard joysticks and gamepads. It uses a very advanced 166 180 routine for this, allowing for data precision that can't be found on any 167 181 other system. 168 182 169 - It also supports extensions like additional hats and buttons compatible 183 + It also supports extensions like additional hats and buttons compatible 170 184 with CH Flightstick Pro, ThrustMaster FCS or 6 and 8 button gamepads. Saitek 171 185 Cyborg 'digital' joysticks are also supported by this driver, because 172 186 they're basically souped up CHF sticks. 173 187 174 - However the only types that can be autodetected are: 188 + However the only types that can be autodetected are: 175 189 176 190 * 2-axis, 4-button joystick 177 191 * 3-axis, 4-button joystick 178 192 * 4-axis, 4-button joystick 179 193 * Saitek Cyborg 'digital' joysticks 180 194 181 - For other joystick types (more/less axes, hats, and buttons) support 195 + For other joystick types (more/less axes, hats, and buttons) support 182 196 you'll need to specify the types either on the kernel command line or on the 183 197 module command line, when inserting analog into the kernel. The 184 - parameters are: 198 + parameters are:: 185 199 186 200 analog.map=<type1>,<type2>,<type3>,.... 187 201 188 - 'type' is type of the joystick from the table below, defining joysticks 202 + 'type' is type of the joystick from the table below, defining joysticks 189 203 present on gameports in the system, starting with gameport0, second 'type' 190 204 entry defining joystick on gameport1 and so on. 191 205 192 - Type | Meaning 193 - ----------------------------------- 194 - none | No analog joystick on that port 195 - auto | Autodetect joystick 196 - 2btn | 2-button n-axis joystick 197 - y-joy | Two 2-button 2-axis joysticks on an Y-cable 198 - y-pad | Two 2-button 2-axis gamepads on an Y-cable 199 - fcs | Thrustmaster FCS compatible joystick 200 - chf | Joystick with a CH Flightstick compatible hat 201 - fullchf | CH Flightstick compatible with two hats and 6 buttons 202 - gamepad | 4/6-button n-axis gamepad 203 - gamepad8 | 8-button 2-axis gamepad 206 + ========= ===================================================== 207 + Type Meaning 208 + ========= ===================================================== 209 + none No analog joystick on that port 210 + auto Autodetect joystick 211 + 2btn 2-button n-axis joystick 212 + y-joy Two 2-button 2-axis joysticks on an Y-cable 213 + y-pad Two 2-button 2-axis gamepads on an Y-cable 214 + fcs Thrustmaster FCS compatible joystick 215 + chf Joystick with a CH Flightstick compatible hat 216 + fullchf CH Flightstick compatible with two hats and 6 buttons 217 + gamepad 4/6-button n-axis gamepad 218 + gamepad8 8-button 2-axis gamepad 219 + ========= ===================================================== 204 220 205 - In case your joystick doesn't fit in any of the above categories, you can 221 + In case your joystick doesn't fit in any of the above categories, you can 206 222 specify the type as a number by combining the bits in the table below. This 207 223 is not recommended unless you really know what are you doing. It's not 208 224 dangerous, but not simple either. 209 225 210 - Bit | Meaning 211 - -------------------------- 212 - 0 | Axis X1 213 - 1 | Axis Y1 214 - 2 | Axis X2 215 - 3 | Axis Y2 216 - 4 | Button A 217 - 5 | Button B 218 - 6 | Button C 219 - 7 | Button D 220 - 8 | CHF Buttons X and Y 221 - 9 | CHF Hat 1 222 - 10 | CHF Hat 2 223 - 11 | FCS Hat 224 - 12 | Pad Button X 225 - 13 | Pad Button Y 226 - 14 | Pad Button U 227 - 15 | Pad Button V 228 - 16 | Saitek F1-F4 Buttons 229 - 17 | Saitek Digital Mode 230 - 19 | GamePad 231 - 20 | Joy2 Axis X1 232 - 21 | Joy2 Axis Y1 233 - 22 | Joy2 Axis X2 234 - 23 | Joy2 Axis Y2 235 - 24 | Joy2 Button A 236 - 25 | Joy2 Button B 237 - 26 | Joy2 Button C 238 - 27 | Joy2 Button D 239 - 31 | Joy2 GamePad 226 + ==== ========================= 227 + Bit Meaning 228 + ==== ========================= 229 + 0 Axis X1 230 + 1 Axis Y1 231 + 2 Axis X2 232 + 3 Axis Y2 233 + 4 Button A 234 + 5 Button B 235 + 6 Button C 236 + 7 Button D 237 + 8 CHF Buttons X and Y 238 + 9 CHF Hat 1 239 + 10 CHF Hat 2 240 + 11 FCS Hat 241 + 12 Pad Button X 242 + 13 Pad Button Y 243 + 14 Pad Button U 244 + 15 Pad Button V 245 + 16 Saitek F1-F4 Buttons 246 + 17 Saitek Digital Mode 247 + 19 GamePad 248 + 20 Joy2 Axis X1 249 + 21 Joy2 Axis Y1 250 + 22 Joy2 Axis X2 251 + 23 Joy2 Axis Y2 252 + 24 Joy2 Button A 253 + 25 Joy2 Button B 254 + 26 Joy2 Button C 255 + 27 Joy2 Button D 256 + 31 Joy2 GamePad 257 + ==== ========================= 240 258 241 - 3.2 Microsoft SideWinder joysticks 242 - ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 243 - Microsoft 'Digital Overdrive' protocol is supported by the sidewinder.c 259 + Microsoft SideWinder joysticks 260 + ------------------------------ 261 + 262 + Microsoft 'Digital Overdrive' protocol is supported by the sidewinder.c 244 263 module. All currently supported joysticks: 245 264 246 265 * Microsoft SideWinder 3D Pro 247 266 * Microsoft SideWinder Force Feedback Pro 248 267 * Microsoft SideWinder Force Feedback Wheel 249 - * Microsoft SideWinder FreeStyle Pro 268 + * Microsoft SideWinder FreeStyle Pro 250 269 * Microsoft SideWinder GamePad (up to four, chained) 251 - * Microsoft SideWinder Precision Pro 252 - * Microsoft SideWinder Precision Pro USB 270 + * Microsoft SideWinder Precision Pro 271 + * Microsoft SideWinder Precision Pro USB 253 272 254 - are autodetected, and thus no module parameters are needed. 273 + are autodetected, and thus no module parameters are needed. 255 274 256 - There is one caveat with the 3D Pro. There are 9 buttons reported, 275 + There is one caveat with the 3D Pro. There are 9 buttons reported, 257 276 although the joystick has only 8. The 9th button is the mode switch on the 258 277 rear side of the joystick. However, moving it, you'll reset the joystick, 259 278 and make it unresponsive for about a one third of a second. Furthermore, the 260 279 joystick will also re-center itself, taking the position it was in during 261 280 this time as a new center position. Use it if you want, but think first. 262 281 263 - The SideWinder Standard is not a digital joystick, and thus is supported 264 - by the analog driver described above. 282 + The SideWinder Standard is not a digital joystick, and thus is supported 283 + by the analog driver described above. 265 284 266 - 3.3 Logitech ADI devices 267 - ~~~~~~~~~~~~~~~~~~~~~~~~ 268 - Logitech ADI protocol is supported by the adi.c module. It should support 285 + Logitech ADI devices 286 + -------------------- 287 + 288 + Logitech ADI protocol is supported by the adi.c module. It should support 269 289 any Logitech device using this protocol. This includes, but is not limited 270 290 to: 271 291 ··· 299 279 * Logitech WingMan GamePad Extreme 300 280 * Logitech WingMan Extreme Digital 3D 301 281 302 - ADI devices are autodetected, and the driver supports up to two (any 282 + ADI devices are autodetected, and the driver supports up to two (any 303 283 combination of) devices on a single gameport, using an Y-cable or chained 304 284 together. 305 285 306 - Logitech WingMan Joystick, Logitech WingMan Attack, Logitech WingMan 286 + Logitech WingMan Joystick, Logitech WingMan Attack, Logitech WingMan 307 287 Extreme and Logitech WingMan ThunderPad are not digital joysticks and are 308 288 handled by the analog driver described above. Logitech WingMan Warrior and 309 289 Logitech Magellan are supported by serial drivers described below. Logitech 310 290 WingMan Force and Logitech WingMan Formula Force are supported by the 311 291 I-Force driver described below. Logitech CyberMan is not supported yet. 312 292 313 - 3.4 Gravis GrIP 314 - ~~~~~~~~~~~~~~~ 315 - Gravis GrIP protocol is supported by the grip.c module. It currently 293 + Gravis GrIP 294 + ----------- 295 + 296 + Gravis GrIP protocol is supported by the grip.c module. It currently 316 297 supports: 317 298 318 299 * Gravis GamePad Pro ··· 321 300 * Gravis Xterminator 322 301 * Gravis Xterminator DualControl 323 302 324 - All these devices are autodetected, and you can even use any combination 303 + All these devices are autodetected, and you can even use any combination 325 304 of up to two of these pads either chained together or using an Y-cable on a 326 305 single gameport. 327 306 ··· 329 308 supported by the stinger driver. Other Gravis joysticks are supported by the 330 309 analog driver. 331 310 332 - 3.5 FPGaming A3D and MadCatz A3D 333 - ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 334 - The Assassin 3D protocol created by FPGaming, is used both by FPGaming 311 + FPGaming A3D and MadCatz A3D 312 + ---------------------------- 313 + 314 + The Assassin 3D protocol created by FPGaming, is used both by FPGaming 335 315 themselves and is licensed to MadCatz. A3D devices are supported by the 336 316 a3d.c module. It currently supports: 337 317 ··· 340 318 * MadCatz Panther 341 319 * MadCatz Panther XL 342 320 343 - All these devices are autodetected. Because the Assassin 3D and the Panther 321 + All these devices are autodetected. Because the Assassin 3D and the Panther 344 322 allow connecting analog joysticks to them, you'll need to load the analog 345 323 driver as well to handle the attached joysticks. 346 324 347 - The trackball should work with USB mousedev module as a normal mouse. See 325 + The trackball should work with USB mousedev module as a normal mouse. See 348 326 the USB documentation for how to setup an USB mouse. 349 327 350 - 3.6 ThrustMaster DirectConnect (BSP) 351 - ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 352 - The TM DirectConnect (BSP) protocol is supported by the tmdc.c 328 + ThrustMaster DirectConnect (BSP) 329 + -------------------------------- 330 + 331 + The TM DirectConnect (BSP) protocol is supported by the tmdc.c 353 332 module. This includes, but is not limited to: 354 333 355 334 * ThrustMaster Millennium 3D Interceptor 356 335 * ThrustMaster 3D Rage Pad 357 336 * ThrustMaster Fusion Digital Game Pad 358 337 359 - Devices not directly supported, but hopefully working are: 338 + Devices not directly supported, but hopefully working are: 360 339 361 340 * ThrustMaster FragMaster 362 341 * ThrustMaster Attack Throttle 363 342 364 - If you have one of these, contact me. 343 + If you have one of these, contact me. 365 344 366 - TMDC devices are autodetected, and thus no parameters to the module 345 + TMDC devices are autodetected, and thus no parameters to the module 367 346 are needed. Up to two TMDC devices can be connected to one gameport, using 368 347 an Y-cable. 369 348 370 - 3.7 Creative Labs Blaster 371 - ~~~~~~~~~~~~~~~~~~~~~~~~~ 372 - The Blaster protocol is supported by the cobra.c module. It supports only 349 + Creative Labs Blaster 350 + --------------------- 351 + 352 + The Blaster protocol is supported by the cobra.c module. It supports only 373 353 the: 374 354 375 355 * Creative Blaster GamePad Cobra 376 356 377 - Up to two of these can be used on a single gameport, using an Y-cable. 357 + Up to two of these can be used on a single gameport, using an Y-cable. 378 358 379 - 3.8 Genius Digital joysticks 380 - ~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 381 - The Genius digitally communicating joysticks are supported by the gf2k.c 359 + Genius Digital joysticks 360 + ------------------------ 361 + 362 + The Genius digitally communicating joysticks are supported by the gf2k.c 382 363 module. This includes: 383 364 384 - * Genius Flight2000 F-23 joystick 385 - * Genius Flight2000 F-31 joystick 365 + * Genius Flight2000 F-23 joystick 366 + * Genius Flight2000 F-31 joystick 386 367 * Genius G-09D gamepad 387 368 388 - Other Genius digital joysticks are not supported yet, but support can be 369 + Other Genius digital joysticks are not supported yet, but support can be 389 370 added fairly easily. 390 371 391 - 3.9 InterAct Digital joysticks 392 - ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 393 - The InterAct digitally communicating joysticks are supported by the 372 + InterAct Digital joysticks 373 + -------------------------- 374 + 375 + The InterAct digitally communicating joysticks are supported by the 394 376 interact.c module. This includes: 395 377 396 378 * InterAct HammerHead/FX gamepad 397 - * InterAct ProPad8 gamepad 379 + * InterAct ProPad8 gamepad 398 380 399 - Other InterAct digital joysticks are not supported yet, but support can be 381 + Other InterAct digital joysticks are not supported yet, but support can be 400 382 added fairly easily. 401 383 402 - 3.10 PDPI Lightning 4 gamecards 403 - ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 404 - PDPI Lightning 4 gamecards are supported by the lightning.c module. 384 + PDPI Lightning 4 gamecards 385 + -------------------------- 386 + 387 + PDPI Lightning 4 gamecards are supported by the lightning.c module. 405 388 Once the module is loaded, the analog driver can be used to handle the 406 389 joysticks. Digitally communicating joystick will work only on port 0, while 407 390 using Y-cables, you can connect up to 8 analog joysticks to a single L4 408 391 card, 16 in case you have two in your system. 409 392 410 - 3.11 Trident 4DWave / Aureal Vortex 411 - ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 412 - Soundcards with a Trident 4DWave DX/NX or Aureal Vortex/Vortex2 chipsets 393 + Trident 4DWave / Aureal Vortex 394 + ------------------------------ 395 + 396 + Soundcards with a Trident 4DWave DX/NX or Aureal Vortex/Vortex2 chipsets 413 397 provide an "Enhanced Game Port" mode where the soundcard handles polling the 414 398 joystick. This mode is supported by the pcigame.c module. Once loaded the 415 399 analog driver can use the enhanced features of these gameports.. 416 400 417 - 3.13 Crystal SoundFusion 418 - ~~~~~~~~~~~~~~~~~~~~~~~~ 419 - Soundcards with Crystal SoundFusion chipsets provide an "Enhanced Game 401 + Crystal SoundFusion 402 + ------------------- 403 + 404 + Soundcards with Crystal SoundFusion chipsets provide an "Enhanced Game 420 405 Port", much like the 4DWave or Vortex above. This, and also the normal mode 421 406 for the port of the SoundFusion is supported by the cs461x.c module. 422 407 423 - 3.14 SoundBlaster Live! 424 - ~~~~~~~~~~~~~~~~~~~~~~~~ 425 - The Live! has a special PCI gameport, which, although it doesn't provide 408 + SoundBlaster Live! 409 + ------------------ 410 + 411 + The Live! has a special PCI gameport, which, although it doesn't provide 426 412 any "Enhanced" stuff like 4DWave and friends, is quite a bit faster than 427 413 its ISA counterparts. It also requires special support, hence the 428 414 emu10k1-gp.c module for it instead of the normal ns558.c one. 429 415 430 - 3.15 SoundBlaster 64 and 128 - ES1370 and ES1371, ESS Solo1 and S3 SonicVibes 431 - ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 432 - These PCI soundcards have specific gameports. They are handled by the 416 + SoundBlaster 64 and 128 - ES1370 and ES1371, ESS Solo1 and S3 SonicVibes 417 + ------------------------------------------------------------------------ 418 + 419 + These PCI soundcards have specific gameports. They are handled by the 433 420 sound drivers themselves. Make sure you select gameport support in the 434 421 joystick menu and sound card support in the sound menu for your appropriate 435 422 card. 436 423 437 - 3.16 Amiga 438 - ~~~~~~~~~~ 439 - Amiga joysticks, connected to an Amiga, are supported by the amijoy.c 440 - driver. Since they can't be autodetected, the driver has a command line. 424 + Amiga 425 + ----- 426 + 427 + Amiga joysticks, connected to an Amiga, are supported by the amijoy.c 428 + driver. Since they can't be autodetected, the driver has a command line: 441 429 442 430 amijoy.map=<a>,<b> 443 431 444 - a and b define the joysticks connected to the JOY0DAT and JOY1DAT ports of 432 + a and b define the joysticks connected to the JOY0DAT and JOY1DAT ports of 445 433 the Amiga. 446 434 447 - Value | Joystick type 448 - --------------------- 449 - 0 | None 450 - 1 | 1-button digital joystick 435 + ====== =========================== 436 + Value Joystick type 437 + ====== =========================== 438 + 0 None 439 + 1 1-button digital joystick 440 + ====== =========================== 451 441 452 - No more joystick types are supported now, but that should change in the 442 + No more joystick types are supported now, but that should change in the 453 443 future if I get an Amiga in the reach of my fingers. 454 444 455 - 3.17 Game console and 8-bit pads and joysticks 456 - ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 457 - See joystick-parport.txt for more info. 445 + Game console and 8-bit pads and joysticks 446 + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 458 447 459 - 3.18 SpaceTec/LabTec devices 460 - ~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 461 - SpaceTec serial devices communicate using the SpaceWare protocol. It is 448 + See :ref:`joystick-parport` for more info. 449 + 450 + SpaceTec/LabTec devices 451 + ----------------------- 452 + 453 + SpaceTec serial devices communicate using the SpaceWare protocol. It is 462 454 supported by the spaceorb.c and spaceball.c drivers. The devices currently 463 455 supported by spaceorb.c are: 464 456 ··· 483 447 484 448 * SpaceTec SpaceBall 4000 FLX 485 449 486 - In addition to having the spaceorb/spaceball and serport modules in the 450 + In addition to having the spaceorb/spaceball and serport modules in the 487 451 kernel, you also need to attach a serial port to it. to do that, run the 488 - inputattach program: 452 + inputattach program:: 489 453 490 454 inputattach --spaceorb /dev/tts/x & 491 - or 455 + 456 + or:: 457 + 492 458 inputattach --spaceball /dev/tts/x & 493 459 494 460 where /dev/tts/x is the serial port which the device is connected to. After 495 461 doing this, the device will be reported and will start working. 496 462 497 - There is one caveat with the SpaceOrb. The button #6, the on the bottom 463 + There is one caveat with the SpaceOrb. The button #6, the on the bottom 498 464 side of the orb, although reported as an ordinary button, causes internal 499 465 recentering of the spaceorb, moving the zero point to the position in which 500 466 the ball is at the moment of pressing the button. So, think first before 501 467 you bind it to some other function. 502 468 503 - SpaceTec SpaceBall 2003 FLX and 3003 FLX are not supported yet. 469 + SpaceTec SpaceBall 2003 FLX and 3003 FLX are not supported yet. 504 470 505 - 3.19 Logitech SWIFT devices 506 - ~~~~~~~~~~~~~~~~~~~~~~~~~~~ 507 - The SWIFT serial protocol is supported by the warrior.c module. It 471 + Logitech SWIFT devices 472 + ---------------------- 473 + 474 + The SWIFT serial protocol is supported by the warrior.c module. It 508 475 currently supports only the: 509 476 510 477 * Logitech WingMan Warrior 511 478 512 479 but in the future, Logitech CyberMan (the original one, not CM2) could be 513 480 supported as well. To use the module, you need to run inputattach after you 514 - insert/compile the module into your kernel: 481 + insert/compile the module into your kernel:: 515 482 516 483 inputattach --warrior /dev/tts/x & 517 484 518 485 /dev/tts/x is the serial port your Warrior is attached to. 519 486 520 - 3.20 Magellan / Space Mouse 521 - ~~~~~~~~~~~~~~~~~~~~~~~~~~~ 522 - The Magellan (or Space Mouse), manufactured by LogiCad3d (formerly Space 487 + Magellan / Space Mouse 488 + ---------------------- 489 + 490 + The Magellan (or Space Mouse), manufactured by LogiCad3d (formerly Space 523 491 Systems), for many other companies (Logitech, HP, ...) is supported by the 524 492 joy-magellan module. It currently supports only the: 525 493 ··· 532 492 533 493 models, the additional buttons on the 'Plus' versions are not supported yet. 534 494 535 - To use it, you need to attach the serial port to the driver using the 495 + To use it, you need to attach the serial port to the driver using the:: 536 496 537 497 inputattach --magellan /dev/tts/x & 538 498 539 499 command. After that the Magellan will be detected, initialized, will beep, 540 500 and the /dev/input/jsX device should become usable. 541 501 542 - 3.21 I-Force devices 543 - ~~~~~~~~~~~~~~~~~~~~ 544 - All I-Force devices are supported by the iforce module. This includes: 502 + I-Force devices 503 + --------------- 504 + 505 + All I-Force devices are supported by the iforce module. This includes: 545 506 546 507 * AVB Mag Turbo Force 547 508 * AVB Top Shot Pegasus 548 509 * AVB Top Shot Force Feedback Racing Wheel 549 510 * Logitech WingMan Force 550 - * Logitech WingMan Force Wheel 511 + * Logitech WingMan Force Wheel 551 512 * Guillemot Race Leader Force Feedback 552 513 * Guillemot Force Feedback Racing Wheel 553 514 * Thrustmaster Motor Sport GT 554 515 555 - To use it, you need to attach the serial port to the driver using the 516 + To use it, you need to attach the serial port to the driver using the:: 556 517 557 518 inputattach --iforce /dev/tts/x & 558 519 559 520 command. After that the I-Force device will be detected, and the 560 521 /dev/input/jsX device should become usable. 561 522 562 - In case you're using the device via the USB port, the inputattach command 523 + In case you're using the device via the USB port, the inputattach command 563 524 isn't needed. 564 525 565 - The I-Force driver now supports force feedback via the event interface. 526 + The I-Force driver now supports force feedback via the event interface. 566 527 567 - Please note that Logitech WingMan *3D devices are _not_ supported by this 528 + Please note that Logitech WingMan 3D devices are _not_ supported by this 568 529 module, rather by hid. Force feedback is not supported for those devices. 569 530 Logitech gamepads are also hid devices. 570 531 571 - 3.22 Gravis Stinger gamepad 572 - ~~~~~~~~~~~~~~~~~~~~~~~~~~~ 573 - The Gravis Stinger serial port gamepad, designed for use with laptop 574 - computers, is supported by the stinger.c module. To use it, attach the 575 - serial port to the driver using: 532 + Gravis Stinger gamepad 533 + ---------------------- 576 534 577 - inputattach --stinger /dev/tty/x & 535 + The Gravis Stinger serial port gamepad, designed for use with laptop 536 + computers, is supported by the stinger.c module. To use it, attach the 537 + serial port to the driver using:: 538 + 539 + inputattach --stinger /dev/tty/x & 578 540 579 541 where x is the number of the serial port. 580 542 581 - 4. Troubleshooting 582 - ~~~~~~~~~~~~~~~~~~ 583 - There is quite a high probability that you run into some problems. For 543 + Troubleshooting 544 + =============== 545 + 546 + There is quite a high probability that you run into some problems. For 584 547 testing whether the driver works, if in doubt, use the jstest utility in 585 548 some of its modes. The most useful modes are "normal" - for the 1.x 586 - interface, and "old" for the "0.x" interface. You run it by typing: 549 + interface, and "old" for the "0.x" interface. You run it by typing:: 587 550 588 551 jstest --normal /dev/input/js0 589 552 jstest --old /dev/input/js0 590 553 591 - Additionally you can do a test with the evtest utility: 554 + Additionally you can do a test with the evtest utility:: 592 555 593 556 evtest /dev/input/event0 594 557 595 - Oh, and read the FAQ! :) 558 + Oh, and read the FAQ! :) 596 559 597 - 5. FAQ 598 - ~~~~~~ 599 - Q: Running 'jstest /dev/input/js0' results in "File not found" error. What's the 600 - cause? 601 - A: The device files don't exist. Create them (see section 2.2). 560 + FAQ 561 + === 602 562 603 - Q: Is it possible to connect my old Atari/Commodore/Amiga/console joystick 604 - or pad that uses a 9-pin D-type cannon connector to the serial port of my 605 - PC? 606 - A: Yes, it is possible, but it'll burn your serial port or the pad. It 607 - won't work, of course. 563 + :Q: Running 'jstest /dev/input/js0' results in "File not found" error. What's the 564 + cause? 565 + :A: The device files don't exist. Create them (see section 2.2). 608 566 609 - Q: My joystick doesn't work with Quake / Quake 2. What's the cause? 610 - A: Quake / Quake 2 don't support joystick. Use joy2key to simulate keypresses 611 - for them. 567 + :Q: Is it possible to connect my old Atari/Commodore/Amiga/console joystick 568 + or pad that uses a 9-pin D-type cannon connector to the serial port of my 569 + PC? 570 + :A: Yes, it is possible, but it'll burn your serial port or the pad. It 571 + won't work, of course. 612 572 613 - 6. Programming Interface 614 - ~~~~~~~~~~~~~~~~~~~~~~~~ 615 - The 1.0 driver uses a new, event based approach to the joystick driver. 573 + :Q: My joystick doesn't work with Quake / Quake 2. What's the cause? 574 + :A: Quake / Quake 2 don't support joystick. Use joy2key to simulate keypresses 575 + for them. 576 + 577 + Programming Interface 578 + ===================== 579 + 580 + The 1.0 driver uses a new, event based approach to the joystick driver. 616 581 Instead of the user program polling for the joystick values, the joystick 617 582 driver now reports only any changes of its state. See joystick-api.txt, 618 583 joystick.h and jstest.c included in the joystick package for more 619 584 information. The joystick device can be used in either blocking or 620 585 nonblocking mode and supports select() calls. 621 586 622 - For backward compatibility the old (v0.x) interface is still included. 587 + For backward compatibility the old (v0.x) interface is still included. 623 588 Any call to the joystick driver using the old interface will return values 624 589 that are compatible to the old interface. This interface is still limited 625 590 to 2 axes, and applications using it usually decode only 2 buttons, although