Linux Joystick driver v2.0.0

如果想评论或更新本文的内容,请直接联系原文档的维护者。

如果你使用英文交流有困难的话,也可以向中文版维护者求助。

如果本翻译更新不及时或者翻译存在问题,请联系中文版维护者。

中文版维护者: 姚家珺AriosYao   ks666dejia@163.com

中文版翻译者: 姚家珺AriosYao   ks666dejia@163.com

中文版校译者: 姚家珺AriosYao   ks666dejia@163.com

 

                       Linux Joystick driver v2.0.0
               (c) 1996-2000 Vojtech Pavlik <vojtech@ucw.cz>
                             Sponsored by SuSE
----------------------------------------------------------------------------

0. 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
Software Foundation; either version 2 of the License, or (at your option)
any later version.

这个程序是免费软件,您可以在免费
软件基金会第2版许可证出版的GNU通用公共许可证的条款下,重新分配和/或修改
或(以你的方式)任何更新的版本。

  This program is distributed in the hope that it will be useful, but
WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License for
more details.

  这个程序是分布式的,希望这货是有用的,但
这有用性没有任何担保,甚至没有隐含的担保
或针对特定用途的适用性。请参阅GNU通用公共许可证
更多的细节。

  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
Temple Place, Suite 330, Boston, MA 02111-1307 USA

 你应该已经收到一份GNU通用公共许可证沿
这个程序,如果没有,写信给自由软件基金会,公司,59
寺广场,330室,波士顿,MA02111-1307,USA

  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,
Simunkova 1594, Prague 8, 182 00 Czech Republic

  如果您需要与我联系,你可以通过e-mail
 - 留言到<vojtech@ucw.cz>,或通过纸质邮件:
 Vojtech Pavlik,Simunkova 1594, Prague 8, 182 00 Czech Republic

  For your convenience, the GNU General Public License version 2 is included
in the package: See the file COPYING.

 为了您的方便,附上GNU通用公共许可证版本2的软件包

1. Intro/介绍
~~~~~~~~
  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
input devices in Linux.

游戏操作杆的Linux驱动程序提供支持,为各种操纵杆
和类似的装置。它是基于一个更大的项目,旨在在Linux下支持所有
输入设备。

  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
them. Bug reports and success stories are also welcome.

如果您在使用这个驱动程序的时候遇到任何问题,或你的游戏操纵杆
运行这个驱动程序不能完全使用,我很愿意了解
它们。欢迎报告各种奇奇怪怪的事情。

  The input project website is at:

  网站地址:

        http://atrey.karlin.mff.cuni.cz/~vojtech/input/

  There is also a mailing list for the driver at:
  另一为这个驱动程序做的邮件地址:

        listproc@atrey.karlin.mff.cuni.cz

send "subscribe linux-joystick Your Name" to subscribe to it.

发送格式:subscribe linux-joystick +你的名字

2. Usage/使用
~~~~~~~~
  For basic usage you just choose the right options in kernel config and
you should be set.
  如果是最基本的使用,只要选择正确的配置,并且在内核里进行设置就可以了。
2.1 inpututils
~~~~~~~~~~~~~~
For testing and other purposes (for example serial devices), a set of
utilities is available at the abovementioned website. I suggest you download
and install it before going on.

如果用于测试和其他用途(例如串口设备),有一组
实用程序可在上述网站找到。我建议你下载
并安装它,然后再继续。

2.2 Device nodes/设备节点
 ~~~~~~~~~~~~~~~~
For applications to be able to use the joysticks,
you'll have to manually create these nodes in /dev:

为了使应用程序能够使用游戏操纵杆,
你必须在/ dev:手动创建这些节点

cd /dev
rm js*
mkdir input
mknod input/js0 c 13 0
mknod input/js1 c 13 1
mknod input/js2 c 13 2
mknod input/js3 c 13 3
ln -s input/js0 js0
ln -s input/js1 js1
ln -s input/js2 js2
ln -s input/js3 js3

For testing with inpututils it's also convenient to create these:

如果是为了测试,还需要创建这些:

mknod input/event0 c 13 64
mknod input/event1 c 13 65
mknod input/event2 c 13 66
mknod input/event3 c 13 67

2.4 Modules needed /所需模块
~~~~~~~~~~~~~~~~~~
  For all joystick drivers to function, you'll need the userland interface
module in kernel, either loaded or compiled in:

为使用所有游戏杆驱动程序的功能,你需要内核的用户级接口模块,加载或编译:

        modprobe joydev

  For gameport joysticks, you'll have to load the gameport driver as well;
 
  对于游戏端口游戏操纵杆,你就必须进行游戏端口驱动程序的加载;

        modprobe ns558

  And for serial port joysticks, you'll need the serial input line
discipline module loaded and the inputattach utility started:

如果是串口游戏操纵杆,你需要串行输入线
检测模块的加载,输入,连接:

        modprobe serport
        inputattach -xxx /dev/tts/X &

  In addition to that, you'll need the joystick driver module itself, most
usually you'll have an analog joystick:

此外,你需要你的操纵杆驱动程序模块本身,大多数情况下,你可以使用模拟游戏杆了:

        modprobe analog
       
  For automatic module loading, something like this might work - tailor to
your needs:

自动加载模块,根据你的需求,大概就会发生这样的事情:

        alias tty-ldisc-2 serport
        alias char-major-13 input
        above input joydev ns558 analog
        options analog map=gamepad,none,2btn

2.5 Verifying that it works/验证它的工作原理
~~~~~~~~~~~~~~~~~~~~~~~~~~~
  For testing the joystick driver functionality, there is the jstest
program in the utilities package. You run it by typing:

为测试摇杆的驱动程序的功能,下面是jstest的
程序的公用封装。您可以通过键入运行:

        jstest /dev/js0

  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
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
the stick. They should have the full range from -32767 to 32767. If all this
s met, then it's all fine, and you can play the games. :)

它应该用操纵杆值显示一行,更新你
移动棒,并按下按钮。轴值都为零时
游戏杆应该居于中心位置。并且它们不应该自己在附近的值来回抖动,同时也应该能稳定在任何其他位置
。这些值应该有完整的范围,从-32767到32767。如果是上述的情况,那么你的操作杆就是正常的,并可以玩游戏。 :)

  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
troubleshooting section, and the FAQ.

如果它不是,那么就可能有问题。尝试校正游戏杆,
如果它仍然不能正常工作,阅读本文件的驱动程序部分,
故障排除一节和FAQ。

2.6. Calibration/校准
~~~~~~~~~~~~~~~~
  For most joysticks you won't need any manual calibration, since the
joystick should be autocalibrated by the driver automagically. However, with
some analog joysticks, that either do not use linear resistors, or if you
want better precision, you can use the jscal program


  对于大多数游戏操纵杆,您将不需要任何手动校准,
游戏杆应由驱动程序自动校准。然而,随着
一些模拟游戏操纵杆,要么不使用非线性电阻,或者如果你
要更好的精度,您可以使用jscal的程序来进行校准:

        jscal -c /dev/js0

 included in the joystick package to set better correction coefficients than
what the driver would choose itself.

在操纵杆包设置比驱动程序原本自己选择的更好的修正系数。

  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
correction coefficients into a file

游戏杆校准后,您可以验证,如果你喜欢新
校准,使用如下jstest的命令,如果你这样做,你就可以把你的校正系数保存
到一个文件中:

        jscal -p /dev/js0 > /etc/joystick.cal
 
  And add a line to your rc script executing that file

  rc脚本,执行该文件并添加一行
 
        source /etc/joystick.cal

  This way, after the next reboot your joystick will remain calibrated. You
can also add the jscal -p line to your shutdown script.

通过这种方式,在下次重新启动后仍将校准您的摇杆。你
还可以添加jscal-P线关机脚本。

3. HW specific driver information/硬件驱动信息
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
In this section each of the separate hardware specific drivers is described.

本节中的每一种单独的硬件进行特定的驱动程序说明。

3.1 Analog joysticks/模拟游戏操纵杆
~~~~~~~~~~~~~~~~~~~~
  The analog.c uses the standard analog inputs of the gameport, and thus
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
other system.

analog.c中使用标准的模拟输入该游戏端口,从而
支持所有标准的操纵杆和游戏手柄。它采用了非常先进的
程序,所允许数据的精度,是其他系统无法匹敌的。

  It also supports extensions like additional hats and buttons compatible
with CH Flightstick Pro, ThrustMaster FCS or 6 and 8 button gamepads. Saitek
Cyborg 'digital' joysticks are also supported by this driver, because
they're basically souped up CHF sticks.

它也支持扩展,如兼容CH FlightstickPro的附加的摇杆和按钮,THRUSTMASTER FCS 或6和8键游戏手柄。赛钛客
“数字”赛博格游戏操纵杆也支持此驱动程序,因为
他们基本上改装成了CHF操作杆。

  However the only types that can be autodetected are:
  可以被自动检测到的类型是这么几种:

* 2-axis, 4-button joystick
* 3-axis, 4-button joystick
* 4-axis, 4-button joystick
* Saitek Cyborg 'digital' joysticks

  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
module command line, when inserting analog into the kernel. The
parameters are:


  对于其他类型的游戏杆(多/少轴,摇杆和按钮)的支持无论是在内核命令行或在你需要指定的类型
  模块的命令行,当插入到内核模拟。该参数是:

        analog.map=<type1>,<type2>,<type3>,....

  'type' is type of the joystick from the table below, defining joysticks
present on gameports in the system, starting with gameport0, second 'type'
entry defining joystick on gameport1 and so on.

'type'是下表中不同的操纵杆,定义游戏操纵杆
系统中的游戏操作端口,开始端口0,第二类型
条目定义端口1,以此类推。

        Type     | Meaning
        -----------------------------------
        none     | No analog joystick on that port
        auto     | Autodetect joystick
        2btn     | 2-button n-axis joystick
        y-joy    | Two 2-button 2-axis joysticks on an Y-cable
        y-pad    | Two 2-button 2-axis gamepads on an Y-cable
        fcs      | Thrustmaster FCS compatible joystick
        chf      | Joystick with a CH Flightstick compatible hat
        fullchf  | CH Flightstick compatible with two hats and 6 buttons
        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
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
dangerous, but not simple either.

   如果你的游戏杆不适合上述任何类别,你可以结合下表的位,用数字指定相应的类型。
不推荐这么干,除非你真的知道你在做什么。这不危险,但并不简单。

        Bit | Meaning
         --------------------------
         0  | Axis X1
         1  | Axis Y1
         2  | Axis X2
         3  | Axis Y2
         4  | Button A
         5  | Button B
         6  | Button C
         7  | Button D
         8  | CHF Buttons X and Y
         9  | CHF Hat 1
        10  | CHF Hat 2
        11  | FCS Hat
        12  | Pad Button X
        13  | Pad Button Y
        14  | Pad Button U
        15  | Pad Button V
        16  | Saitek F1-F4 Buttons
        17  | Saitek Digital Mode
        19  | GamePad
        20  | Joy2 Axis X1
        21  | Joy2 Axis Y1
        22  | Joy2 Axis X2
        23  | Joy2 Axis Y2
        24  | Joy2 Button A
        25  | Joy2 Button B
        26  | Joy2 Button C
        27  | Joy2 Button D
        31  | Joy2 GamePad

3.2 Microsoft SideWinder joysticks/微软SideWinder游戏操纵杆
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  Microsoft 'Digital Overdrive' protocol is supported by the sidewinder.c
module. All currently supported joysticks:

微软的“数字高速“协议支持sidewinder.c的
模块。所有目前支持的游戏操纵杆:
 
* Microsoft SideWinder 3D Pro
* Microsoft SideWinder Force Feedback Pro
* Microsoft SideWinder Force Feedback Wheel
* Microsoft SideWinder FreeStyle Pro
* Microsoft SideWinder GamePad (up to four, chained)
* Microsoft SideWinder Precision Pro
* Microsoft SideWinder Precision Pro USB
 
  are autodetected, and thus no module parameters are needed.
  上面这些可以自动检测到,并且不需要模块参数。
 
  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
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
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.


  对于3DPro有一点需要注意。这货有9个按钮报道,
操纵杆上虽然只有8个,但是第九按钮是
操纵杆旁边的模式开关。它用来控制操纵杆的复位,
并使它不响应的大约三分之一秒。此外,本
游戏杆自己可以自动复位,它是在使用过程中会自己选定新的中心位置。使用此功能请慎重。
 
  The SideWinder Standard is not a digital joystick, and thus is supported
by the analog driver described above.

  SideWinder标准游戏杆不是数字游戏杆,因此支持由上述模拟驱动器。
 
3.3 Logitech ADI devices/罗技ADI设备
~~~~~~~~~~~~~~~~~~~~~~~~
  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
to:

罗技ADI协议的支持adi.c模块。使用该协议应该支持罗技任何设备。这包括,但并不限于:

* Logitech CyberMan 2
* Logitech ThunderPad Digital
* Logitech WingMan Extreme Digital
* Logitech WingMan Formula
* Logitech WingMan Interceptor
* Logitech WingMan GamePad
* Logitech WingMan GamePad USB
* Logitech WingMan GamePad Extreme
* Logitech WingMan Extreme Digital 3D
 
  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
together.

  ADI的设备都会被自动检测,驱动器支持两台(任意
组合)的设备上的任何一个单一的游戏端口,使用Y型连接线或直接链接
在一起。

  Logitech WingMan Joystick, Logitech WingMan Attack, Logitech WingMan
Extreme and Logitech WingMan ThunderPad are not digital joysticks and are
handled by the analog driver described above. Logitech WingMan Warrior and
Logitech Magellan are supported by serial drivers described below.  Logitech
WingMan Force and Logitech WingMan Formula Force are supported by the
I-Force driver described below. is not supported yet.

 Logitech WingMan Joystick, Logitech WingMan Attack, Logitech WingMan
Extreme 以及 Logitech WingMan ThunderPad 不是数字的,因此支持上述模拟驱动程序,
Logitech WingMan Warrior 以及Logitech Magellan 支持下面说的串行驱动程序.Logitech
WingMan Force and Logitech WingMan Formula Force 支持下面说的I-Force驱动程序,
Logitech CyberMan 目前不支持。

3.4 Gravis GrIP
~~~~~~~~~~~~~~~
  Gravis GrIP protocol is supported by the  module. It currently
supports:

   Gravis GrIP协议由grip.c支持,它可以准确的支持以下型号:

* Gravis GamePad Pro
* Gravis BlackHawk Digital
* Gravis Xterminator
* Gravis Xterminator DualControl

  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
single gameport.

所有这些设备都能自动检测,你甚至可以使用任意组合
两个设备,无论是直接链接在一起,或使用Y型连接线连接单一的游戏端口。
 
 isn't supported yet. Gravis Stinger is a serial device and is
supported by the stinger driver. Other joysticks are supported by the
analog driver.

GrIP MultiPort现在还不支持Gravis Stinger是串行设备,并且由它自己的驱动支持,其他Gravis游戏杆
能支持上述模拟驱动程序。

3.5 FPGaming A3D and MadCatz A3D / FPGaming A3D和MadCatz A3D
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  The Assassin 3D protocol created by FPGaming, is used both by FPGaming
themselves and is licensed to MadCatz. A3D devices are supported by the
a3d.c module. It currently supports:

  Assassin 3D协议由FPGaming创立,FPGaming自己在用,并且授权了MadCatz,A3D的驱动支持a3d.c 模块,
  以下设备能够被准确的支持:

* FPGaming Assassin 3D
* MadCatz Panther
* MadCatz Panther XL
 
  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
driver as well to handle the attached joysticks.

所有这些设备都能被自动检测。因为Assassin 3D和Panther
允许模拟游戏操纵杆连接,你还需要加载模拟
驱动器以及来处理连接的游戏操纵杆。

  The trackball should work with USB mousedev module as a normal mouse. See
the USB documentation for how to setup an USB mouse.

  作为一个正常的鼠标,轨迹球应与USB MOUSEDEV模块。见
如何设置一个USB鼠标的USB文档。
 
3.6 ThrustMaster DirectConnect (BSP)
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  The TM DirectConnect (BSP) protocol is supported by the tmdc.c
module. This includes, but is not limited to:

  TM DirectConnect (BSP)协议由tmdc.c模块支持,因此,支持但不限于以下设备:

* ThrustMaster Millennium 3D Interceptor
* ThrustMaster 3D Rage Pad
* ThrustMaster Fusion Digital Game Pad
 
  Devices not directly supported, but hopefully working are:
 
  以下设备不能直接支持,不过大概可以运行:

* ThrustMaster FragMaster
* ThrustMaster Attack Throttle

  If you have one of these, contact me.
 
  如果你的设备是上面的这几个,联系作者。

  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
an Y-cable.
 
TMDC设备是自动检测的,因此没有必要设置参数的模块。最多两个TMDC设备可以连接到一个游戏端口,用
Y型连接线。
 
3.7 Creative Labs Blaster
~~~~~~~~~~~~~~~~~~~~~~~~~
  The Blaster protocol is supported by the  module. It supports only
the:
 
  Blaster协议由cobra.c模块支持,他只支持下面这货:
 

* Creative Blaster GamePad Cobra

  Up to two of these can be used on a single gameport, using an Y-cable.
 
  最多两台设备可以连载一个游戏端口上,当然,用Y型连接线。

3.8 Genius Digital joysticks
~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  The Genius digitally communicating joysticks are supported by the gf2k.c
module. This includes:

  Genius digitally 交互游戏杆由gf2k.c模块支持,以下设备可以适用:
 

* Genius Flight2000 F-23 joystick
* Genius Flight2000 F-31 joystick
* Genius G-09D gamepad
 
  Other Genius digital joysticks are not supported yet, but support can be
added fairly easily.

  其他的Genius数字游戏杆现在还不支持,不过要支持起来非常简单。

3.9 InterAct Digital joysticks
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  The InterAct digitally communicating joysticks are supported by the
interact.c module. This includes:

  InterAct digitally交互游戏杆由interact.c模块支持,以下设备可以适用:

* InterAct HammerHead/FX gamepad
* InterAct ProPad8 gamepad

  Other InterAct digital joysticks are not supported yet, but support can be
added fairly easily.

  其他的InterAct数字游戏杆现在还不支持,不过要支持起来非常简单。

3.10 PDPI Lightning 4 gamecards
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  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
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
card, 16 in case you have two in your system.

  PDPI Lightning 4 gamecards由lightning.c模块支持。
一旦模块被加载时,模拟驱动器就可以用来处理
游戏操纵杆。数字通信游戏杆将仅在端口0能用,而如果
使用Y型电缆,可以连接多达8个模拟游戏操纵杆到一张L4
卡,如果你有两张L4卡,你就可以连接16个模拟杆。

3.11 Trident 4DWave / Aureal Vortex
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  Soundcards with a Trident 4DWave DX/NX or Aureal Vortex/Vortex2 chipsets
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
analog driver can use the enhanced features of these gameports..


  Trident 4DWave DX/NX or Aureal Vortex/Vortex2芯片组的声卡
提供“Enhanced Game Port”模式,声卡轮询处理
操纵杆。此模式由pcigame.c模块支持。一旦加载模拟驱动器就可以使用这些功能。
 
3.13 Crystal SoundFusion
~~~~~~~~~~~~~~~~~~~~~~~~
  Soundcards with Crystal SoundFusion chipsets provide an "Enhanced Game
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.

  跟上面那货很类似,Crystal SoundFusion芯片组的声卡也提供“Enhanced Game Port”模式,
这个模式以及正常模式都由cs461x.c模块支持。

3.14 SoundBlaster Live!
~~~~~~~~~~~~~~~~~~~~~~~~
  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
its ISA counterparts. It also requires special support, hence the
emu10k1-gp.c module for it instead of the normal ns558.c one.

  The Live!有一个特殊的PCI游戏端口,虽然在这里面它并没有提供
任何像4DWave那种特殊功能,但是和其他ISA比起来相当快。它也需要特别的支持,因此,
不是正常的加载ns558.c模块,而是加载emu10k1-gp.c模块。

3.15 SoundBlaster 64 and 128 - ES1370 and ES1371, ESS Solo1 and S3 SonicVibes
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  These PCI soundcards have specific gameports. They are handled by 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
card.
 
 这些PCI声卡有具体gameports。它们由声卡驱动操作。确保你在游戏杆的菜单上
选择支持游戏端口,在声音菜单里选择支持你的声卡。
 
3.16 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上的Amiga操作杆由amijoy.c支持,这些设备不能被自动检测,因此要输入下面的命令:

        amijoy.map=<a>,<b>

  a and b define the joysticks connected to the JOY0DAT and JOY1DAT ports of
the Amiga.

  a和b定义连接到JOY0DAT 和 JOY1DAT 端口的Amiga游戏手柄。
 
        Value | Joystick type
        ---------------------
          0   | None
          1   | 1-button digital joystick
 
  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.

  现在没有更多的游戏杆类型支持,但如果我得到一台Amiga,在未来应该能支持更多。

3.17 Game console and 8-bit pads and joysticks/游戏控制台和8位操纵杆
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
See  for more info.

参考文档joystick-parport.txt。
 
3.18 SpaceTec/LabTec devices
~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  SpaceTec serial devices communicate using the SpaceWare protocol. It is
supported by the spaceorb.c and spaceball.c drivers. The devices currently
supported by spaceorb.c are:

SpaceTec串行通信设备使用SpaceWare协议。由spaceorb.c和spaceball.c的驱动程序支持。
目前支持的spaceorb.c设备:

* SpaceTec SpaceBall Avenger
* SpaceTec SpaceOrb 360

Devices currently supported by are:

目前支持的spaceball.c设备:

* SpaceTec SpaceBall 4000 FLX

  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
inputattach program:

  为了使用 spaceorb/spaceball和serport的模块
内核,你还需要连接串行端口。做到这一点,运行
inputattach程序:

        inputattach --spaceorb /dev/tts/x &
or/或者
        inputattach --spaceball /dev/tts/x &

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.

/dev/tts/x是设备连接后的串行设备端口,昨晚这些,设备会报告,然后开始工作。

  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
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
you bind it to some other function.
 
 SpaceOrb有一点需要特别注意。按钮#6,在底
侧,虽然作为一个普通的按钮,是用来做SpaceOrb内部的重新校对的,对着零点的位置
时候按下按钮就是。所以,你把它绑定到其他一些功能之前要考虑清楚。
 
SpaceTec SpaceBall 2003 FLX and 3003 FLX are not supported yet.

SpaceTec SpaceBall 2003 FLX 和 3003 FLX目前不支持。
 
3.19 Logitech SWIFT devices
~~~~~~~~~~~~~~~~~~~~~~~~~~~
  The SWIFT serial protocol is supported by the warrior.c module. It
currently supports only the:

  SWIFT串行协议由warrior.c模块支持。它
目前只支持:
 
* Logitech WingMan Warrior

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
insert/compile the module into your kernel:

但在将来,罗技CyberMan(原版,不是CM2)可能能够支持。
要使用该模块,你需要插入/编译进内核该模块之后运行inputattach:
 
        inputattach --warrior /dev/tts/x &

/dev/tts/x is the serial port your Warrior is attached to.

/dev/tts/x是你的设备连接以后的串行端口。

3.20 Magellan / Space Mouse
~~~~~~~~~~~~~~~~~~~~~~~~~~~
  The Magellan (or Space Mouse), manufactured by LogiCad3d (formerly Space
Systems), for many other companies (Logitech, HP, ...) is supported by the
joy-magellan module. It currently supports only the:

Magellan (or Space Mouse), manufactured by LogiCad3d (formerly Space
Systems), 以及很多其他公司的产品 (Logitech, HP, ...) 都由joy-magellan模块支持,
以下设备能够使用:

* Magellan 3D
* Space Mouse
 
models, the additional buttons on the 'Plus' versions are not supported yet.

models,在“PLUS”上的附加按钮版本现在无法支持。
 
  To use it, you need to attach the serial port to the driver using the
 
  要使用它,你需要使用附加串行端口的驱动程序:

        inputattach --magellan /dev/tts/x &

command. After that the Magellan will be detected, initialized, will beep,
and the /dev/input/jsX device should become usable.

在那之后,Magellan将被检测到的,初始化时,将发出蜂鸣声,
 /dev/input/jsX 的设备应会成为可用的。
 
3.21 I-Force devices
~~~~~~~~~~~~~~~~~~~~
  All I-Force devices are supported by the iforce module. This includes:
 
  所有的 I-Force 设备由 iforce模块支持,包括:

* AVB Mag Turbo Force
* AVB Top Shot Pegasus
* AVB Top Shot Force Feedback Racing Wheel
* Logitech WingMan Force
* Logitech WingMan Force Wheel
* Guillemot Race Leader Force Feedback
* Guillemot Force Feedback Racing Wheel
* Thrustmaster Motor Sport GT
 
  To use it, you need to attach the serial port to the driver using the
 
    要使用它,你需要使用附加串行端口的驱动程序:

        inputattach --iforce /dev/tts/x &

command. After that the I-Force device will be detected, and the
/dev/input/jsX device should become usable.

在那之后,Magellan将被检测到的,初始化时,将发出蜂鸣声,
 /dev/input/jsX 的设备应会成为可用的。
 
  In case you're using the device via the USB port, the inputattach command
isn't needed.

如果你正在通过USB端口使用该设备,该inputattach命令
是不需要的。

  The I-Force driver now supports force feedback via the event interface.
 
  I-Force驱动程序程序现在支持通过事件接口的力反馈。

  Please note that Logitech WingMan *3D devices are _not_ supported by this
module, rather by hid. Force feedback is not supported for those devices.
Logitech gamepads are also hid devices.

  注意,罗技WingMan *3D设备现在不支持此模块,而由hid支持。力反馈不支持那些设备。
罗技游戏手柄也一样。

3.22 Gravis Stinger gamepad
~~~~~~~~~~~~~~~~~~~~~~~~~~~
  The Gravis Stinger serial port gamepad, designed for use with laptop
computers, is supported by the stinger.c module. To use it, attach the
serial port to the driver using:

Gravis Stinger串口手柄,专为使用笔记本电脑
电脑,由stinger.c模块支持。要使用它,安装
串口驱动程序:

        inputattach --stinger /dev/tty/x &
 
where x is the number of the serial port.

x是串行端口的编号。

4. Troubleshooting/故障排除
~~~~~~~~~~~~~~~~~
  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
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:

你有相当高的概率会碰到各种奇怪的问题。因此需要
测试驱动程序是否正常工作,如有疑问,使用jstest的实用工具
的一些模式。最有用的模式是“normal” -适用于 1.x的
接口,以及适用于“0.X”接口的“old”。您可以通过键入运行:

        jstest --normal /dev/input/js0
        jstest --old    /dev/input/js0

  Additionally you can do a test with the evtest utility:
 
  另外,你可以用evtest做测试:
 
        evtest /dev/input/event0

  Oh, and read the FAQ! :)
 
  以下是人民群众喜闻乐见的FAQ时间:
 
5. FAQ
~~~~~~
Q: Running 'jstest /dev/js0' results in "File not found" error. What's the
   cause?
  
   运行'jstest/ dev/js0'结果出现“File not found”错误。原因在哪里?
  
A: The device files don't exist. Create them (see section 2.2).
  
   设备文件不存在,创建他们,参照2.2节。

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
   PC?
  
   老式Atari/Commodore/Amiga/console游戏杆能不能用9针D型连接到我电脑的串行端口上?
  
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?
 
   我的游戏手柄的Quake / Quake 2无法工作,为啥?
  
A: Quake / Quake 2 don't support joystick. Use joy2key to simulate keypresses
   for them.
  
   Quake / Quake 2不支持啊少侠,用joy2key模拟按键吧。

6. Programming Interface/编程接口
~~~~~~~~~~~~~~~~~~~~~~~~
  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
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
information. The joystick device can be used in either blocking or
nonblocking mode and supports select() calls.

1.0驱动程序程序使用一个新的,基于事件的方法,操纵杆驱动程序程序。
代替了用户程序轮询该游戏杆值,操纵杆
驱动程序现在只报告其状态的任何变化。见joystick-api.txt,
更多的摇杆程序包包含在joystick.h和jstest.c
信息。游戏杆的移动设备,可用于阻塞或
非阻塞模式,并支持选择()调用。

  For backward compatibility the old (v0.x) interface is still included.
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
to 2 axes, and applications using it usually decode only 2 buttons, although
the driver provides up to 32.

为了向后兼容,旧的(v0.x)接口仍包含。
操纵杆驱动程序程序使用老接口的时候任何调用将有返回值。
旧的接口是兼容的。但是此接口仍然是有限的,支持2轴和两个应用,使用它通常只有2个按钮进行解码,虽然
驱动程序提供了多达32个。

 

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值