<!DOCTYPE html>
<html lang="en" data-content_root="../../">
<head>
<meta charset="utf-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" /><meta name="viewport" content="width=device-width, initial-scale=1" />
<title>6.1. Introduction — The Linux Kernel documentation</title>
<link rel="stylesheet" type="text/css" href="../../_static/pygments.css?v=fa44fd50" />
<link rel="stylesheet" type="text/css" href="../../_static/alabaster.css?v=3918102e" />
<script src="../../_static/documentation_options.js?v=5929fcd5"></script>
<script src="../../_static/doctools.js?v=9bcbadda"></script>
<script src="../../_static/sphinx_highlight.js?v=dc90522c"></script>
<link rel="index" title="Index" href="../../genindex.html" />
<link rel="search" title="Search" href="../../search.html" />
<link rel="next" title="6.6. Programming Interface" href="joystick-api.html" />
<link rel="prev" title="6. Linux Joystick support" href="index.html" />
<link rel="stylesheet" href="../../_static/custom.css" type="text/css" />
</head><body>
<div class="document">
<div class="sphinxsidebar" role="navigation" aria-label="Main">
<div class="sphinxsidebarwrapper">
<p class="logo"><a href="../../index.html">
<img class="logo" src="../../_static/logo.svg" alt="Logo of The Linux Kernel"/>
</a></p>
<h1 class="logo"><a href="../../index.html">The Linux Kernel</a></h1>
<p class="blurb">6.18.50</p>
<search id="searchbox" style="display: none" role="search">
<h3 id="searchlabel">Quick search</h3>
<div class="searchformwrapper">
<form class="search" action="../../search.html" method="get">
<input type="text" name="q" aria-labelledby="searchlabel" autocomplete="off" autocorrect="off" autocapitalize="off" spellcheck="false"/>
<input type="submit" value="Go" />
</form>
</div>
</search>
<script>document.getElementById('searchbox').style.display = "block"</script>
<p>
<h3 class="kernel-toc-contents">Contents</h3>
<input type="checkbox" class="kernel-toc-toggle" id = "kernel-toc-toggle" checked>
<label class="kernel-toc-title" for="kernel-toc-toggle"></label>
<div class="kerneltoc" id="kerneltoc">
<ul>
<li class="toctree-l1"><a class="reference internal" href="../../process/development-process.html">Development process</a></li>
<li class="toctree-l1"><a class="reference internal" href="../../process/submitting-patches.html">Submitting patches</a></li>
<li class="toctree-l1"><a class="reference internal" href="../../process/code-of-conduct.html">Code of conduct</a></li>
<li class="toctree-l1"><a class="reference internal" href="../../maintainer/index.html">Maintainer handbook</a></li>
<li class="toctree-l1"><a class="reference internal" href="../../process/index.html">All development-process docs</a></li>
</ul>
<ul class="current">
<li class="toctree-l1"><a class="reference internal" href="../../core-api/index.html">Core API</a></li>
<li class="toctree-l1"><a class="reference internal" href="../../driver-api/index.html">Driver APIs</a></li>
<li class="toctree-l1 current"><a class="reference internal" href="../../subsystem-apis.html">Subsystems</a><ul class="current">
<li class="toctree-l2"><a class="reference internal" href="../../subsystem-apis.html#core-subsystems">Core subsystems</a></li>
<li class="toctree-l2 current"><a class="reference internal" href="../../subsystem-apis.html#human-interfaces">Human interfaces</a><ul class="current">
<li class="toctree-l3 current"><a class="reference internal" href="../index.html">Input Documentation</a></li>
<li class="toctree-l3"><a class="reference internal" href="../../hid/index.html">Human Interface Devices (HID)</a></li>
<li class="toctree-l3"><a class="reference internal" href="../../sound/index.html">Sound Subsystem Documentation</a></li>
<li class="toctree-l3"><a class="reference internal" href="../../gpu/index.html">GPU Driver Developer’s Guide</a></li>
<li class="toctree-l3"><a class="reference internal" href="../../fb/index.html">Frame Buffer</a></li>
<li class="toctree-l3"><a class="reference internal" href="../../leds/index.html">LEDs</a></li>
</ul>
</li>
<li class="toctree-l2"><a class="reference internal" href="../../subsystem-apis.html#networking-interfaces">Networking interfaces</a></li>
<li class="toctree-l2"><a class="reference internal" href="../../subsystem-apis.html#storage-interfaces">Storage interfaces</a></li>
<li class="toctree-l2"><a class="reference internal" href="../../subsystem-apis.html#other-subsystems">Other subsystems</a></li>
</ul>
</li>
<li class="toctree-l1"><a class="reference internal" href="../../locking/index.html">Locking</a></li>
</ul>
<ul>
<li class="toctree-l1"><a class="reference internal" href="../../process/license-rules.html">Licensing rules</a></li>
<li class="toctree-l1"><a class="reference internal" href="../../doc-guide/index.html">Writing documentation</a></li>
<li class="toctree-l1"><a class="reference internal" href="../../dev-tools/index.html">Development tools</a></li>
<li class="toctree-l1"><a class="reference internal" href="../../dev-tools/testing-overview.html">Testing guide</a></li>
<li class="toctree-l1"><a class="reference internal" href="../../kernel-hacking/index.html">Hacking guide</a></li>
<li class="toctree-l1"><a class="reference internal" href="../../trace/index.html">Tracing</a></li>
<li class="toctree-l1"><a class="reference internal" href="../../fault-injection/index.html">Fault injection</a></li>
<li class="toctree-l1"><a class="reference internal" href="../../livepatch/index.html">Livepatching</a></li>
<li class="toctree-l1"><a class="reference internal" href="../../rust/index.html">Rust</a></li>
</ul>
<ul>
<li class="toctree-l1"><a class="reference internal" href="../../admin-guide/index.html">Administration</a></li>
<li class="toctree-l1"><a class="reference internal" href="../../kbuild/index.html">Build system</a></li>
<li class="toctree-l1"><a class="reference internal" href="../../admin-guide/reporting-issues.html">Reporting issues</a></li>
<li class="toctree-l1"><a class="reference internal" href="../../tools/index.html">Userspace tools</a></li>
<li class="toctree-l1"><a class="reference internal" href="../../userspace-api/index.html">Userspace API</a></li>
</ul>
<ul>
<li class="toctree-l1"><a class="reference internal" href="../../firmware-guide/index.html">Firmware</a></li>
<li class="toctree-l1"><a class="reference internal" href="../../devicetree/index.html">Firmware and Devicetree</a></li>
</ul>
<ul>
<li class="toctree-l1"><a class="reference internal" href="../../arch/index.html">CPU architectures</a></li>
</ul>
<ul>
<li class="toctree-l1"><a class="reference internal" href="../../staging/index.html">Unsorted documentation</a></li>
</ul>
<ul>
<li class="toctree-l1"><a class="reference internal" href="../../translations/index.html">Translations</a></li>
</ul>
</div>
<script type="text/javascript"> <!--
var sbar = document.getElementsByClassName("sphinxsidebar")[0];
let currents = document.getElementsByClassName("current")
if (currents.length) {
sbar.scrollTop = currents[currents.length - 1].offsetTop;
}
--> </script>
<div role="note" aria-label="source link">
<h3>This Page</h3>
<ul class="this-page-menu">
<li><a href="../../_sources/input/joydev/joystick.rst.txt"
rel="nofollow">Show Source</a></li>
</ul>
</div>
</div>
</div>
<div class="documentwrapper">
<div class="bodywrapper">
<div class="body" role="main">
<section id="introduction">
<span id="joystick-doc"></span><h1><span class="section-number">6.1. </span>Introduction<a class="headerlink" href="#introduction" title="Link to this heading">¶</a></h1>
<p>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.</p>
<p>The mailing list for the project is:</p>
<blockquote>
<div><p><a class="reference external" href="mailto:linux-input%40vger.kernel.org">linux-input<span>@</span>vger<span>.</span>kernel<span>.</span>org</a></p>
</div></blockquote>
<p>send “subscribe linux-input” to <a class="reference external" href="mailto:majordomo%40vger.kernel.org">majordomo<span>@</span>vger<span>.</span>kernel<span>.</span>org</a> to subscribe to it.</p>
</section>
<section id="usage">
<h1><span class="section-number">6.2. </span>Usage<a class="headerlink" href="#usage" title="Link to this heading">¶</a></h1>
<p>For basic usage you just choose the right options in kernel config and
you should be set.</p>
<section id="utilities">
<h2><span class="section-number">6.2.1. </span>Utilities<a class="headerlink" href="#utilities" title="Link to this heading">¶</a></h2>
<p>For testing and other purposes (for example serial devices), there is a set
of utilities, such as <code class="docutils literal notranslate"><span class="pre">jstest</span></code>, <code class="docutils literal notranslate"><span class="pre">jscal</span></code>, and <code class="docutils literal notranslate"><span class="pre">evtest</span></code>,
usually packaged as <code class="docutils literal notranslate"><span class="pre">joystick</span></code>, <code class="docutils literal notranslate"><span class="pre">input-utils</span></code>, <code class="docutils literal notranslate"><span class="pre">evtest</span></code>, and so on.</p>
<p><code class="docutils literal notranslate"><span class="pre">inputattach</span></code> utility is required if your joystick is connected to a
serial port.</p>
</section>
<section id="device-nodes">
<h2><span class="section-number">6.2.2. </span>Device nodes<a class="headerlink" href="#device-nodes" title="Link to this heading">¶</a></h2>
<p>For applications to be able to use the joysticks, device nodes should be
created in /dev. Normally it is done automatically by the system, but
it can also be done by hand:</p>
<div class="highlight-none notranslate"><div class="highlight"><pre><span></span>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
</pre></div>
</div>
<p>For testing with inpututils it’s also convenient to create these:</p>
<div class="highlight-none notranslate"><div class="highlight"><pre><span></span>mknod input/event0 c 13 64
mknod input/event1 c 13 65
mknod input/event2 c 13 66
mknod input/event3 c 13 67
</pre></div>
</div>
</section>
<section id="modules-needed">
<h2><span class="section-number">6.2.3. </span>Modules needed<a class="headerlink" href="#modules-needed" title="Link to this heading">¶</a></h2>
<p>For all joystick drivers to function, you’ll need the userland interface
module in kernel, either loaded or compiled in:</p>
<div class="highlight-none notranslate"><div class="highlight"><pre><span></span>modprobe joydev
</pre></div>
</div>
<p>For gameport joysticks, you’ll have to load the gameport driver as well:</p>
<div class="highlight-none notranslate"><div class="highlight"><pre><span></span>modprobe ns558
</pre></div>
</div>
<p>And for serial port joysticks, you’ll need the serial input line
discipline module loaded and the inputattach utility started:</p>
<div class="highlight-none notranslate"><div class="highlight"><pre><span></span>modprobe serport
inputattach -xxx /dev/tts/X &
</pre></div>
</div>
<p>In addition to that, you’ll need the joystick driver module itself, most
usually you’ll have an analog joystick:</p>
<div class="highlight-none notranslate"><div class="highlight"><pre><span></span>modprobe analog
</pre></div>
</div>
<p>For automatic module loading, something like this might work - tailor to
your needs:</p>
<div class="highlight-none notranslate"><div class="highlight"><pre><span></span>alias tty-ldisc-2 serport
alias char-major-13 input
above input joydev ns558 analog
options analog map=gamepad,none,2btn
</pre></div>
</div>
</section>
<section id="verifying-that-it-works">
<h2><span class="section-number">6.2.4. </span>Verifying that it works<a class="headerlink" href="#verifying-that-it-works" title="Link to this heading">¶</a></h2>
<p>For testing the joystick driver functionality, there is the jstest
program in the utilities package. You run it by typing:</p>
<div class="highlight-none notranslate"><div class="highlight"><pre><span></span>jstest /dev/input/js0
</pre></div>
</div>
<p>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
is met, then it’s all fine, and you can play the games. :)</p>
<p>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.</p>
</section>
<section id="calibration">
<h2><span class="section-number">6.2.5. </span>Calibration<a class="headerlink" href="#calibration" title="Link to this heading">¶</a></h2>
<p>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:</p>
<div class="highlight-none notranslate"><div class="highlight"><pre><span></span>jscal -c /dev/input/js0
</pre></div>
</div>
<p>included in the joystick package to set better correction coefficients than
what the driver would choose itself.</p>
<p>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:</p>
<div class="highlight-none notranslate"><div class="highlight"><pre><span></span>jscal -p /dev/input/js0 > /etc/joystick.cal
</pre></div>
</div>
<p>And add a line to your rc script executing that file:</p>
<div class="highlight-none notranslate"><div class="highlight"><pre><span></span>source /etc/joystick.cal
</pre></div>
</div>
<p>This way, after the next reboot your joystick will remain calibrated. You
can also add the <code class="docutils literal notranslate"><span class="pre">jscal</span> <span class="pre">-p</span></code> line to your shutdown script.</p>
</section>
</section>
<section id="hardware-specific-driver-information">
<h1><span class="section-number">6.3. </span>Hardware-specific driver information<a class="headerlink" href="#hardware-specific-driver-information" title="Link to this heading">¶</a></h1>
<p>In this section each of the separate hardware specific drivers is described.</p>
<section id="analog-joysticks">
<h2><span class="section-number">6.3.1. </span>Analog joysticks<a class="headerlink" href="#analog-joysticks" title="Link to this heading">¶</a></h2>
<p>The analog.c driver 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.</p>
<p>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.</p>
<p>However the only types that can be autodetected are:</p>
<ul class="simple">
<li><p>2-axis, 4-button joystick</p></li>
<li><p>3-axis, 4-button joystick</p></li>
<li><p>4-axis, 4-button joystick</p></li>
<li><p>Saitek Cyborg ‘digital’ joysticks</p></li>
</ul>
<p>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:</p>
<div class="highlight-none notranslate"><div class="highlight"><pre><span></span>analog.map=<type1>,<type2>,<type3>,....
</pre></div>
</div>
<p>‘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.</p>
<blockquote>
<div><table class="docutils align-default">
<thead>
<tr class="row-odd"><th class="head"><p>Type</p></th>
<th class="head"><p>Meaning</p></th>
</tr>
</thead>
<tbody>
<tr class="row-even"><td><p>none</p></td>
<td><p>No analog joystick on that port</p></td>
</tr>
<tr class="row-odd"><td><p>auto</p></td>
<td><p>Autodetect joystick</p></td>
</tr>
<tr class="row-even"><td><p>2btn</p></td>
<td><p>2-button n-axis joystick</p></td>
</tr>
<tr class="row-odd"><td><p>y-joy</p></td>
<td><p>Two 2-button 2-axis joysticks on an Y-cable</p></td>
</tr>
<tr class="row-even"><td><p>y-pad</p></td>
<td><p>Two 2-button 2-axis gamepads on an Y-cable</p></td>
</tr>
<tr class="row-odd"><td><p>fcs</p></td>
<td><p>Thrustmaster FCS compatible joystick</p></td>
</tr>
<tr class="row-even"><td><p>chf</p></td>
<td><p>Joystick with a CH Flightstick compatible hat</p></td>
</tr>
<tr class="row-odd"><td><p>fullchf</p></td>
<td><p>CH Flightstick compatible with two hats and 6 buttons</p></td>
</tr>
<tr class="row-even"><td><p>gamepad</p></td>
<td><p>4/6-button n-axis gamepad</p></td>
</tr>
<tr class="row-odd"><td><p>gamepad8</p></td>
<td><p>8-button 2-axis gamepad</p></td>
</tr>
</tbody>
</table>
</div></blockquote>
<p>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.</p>
<blockquote>
<div><table class="docutils align-default">
<thead>
<tr class="row-odd"><th class="head"><p>Bit</p></th>
<th class="head"><p>Meaning</p></th>
</tr>
</thead>
<tbody>
<tr class="row-even"><td><p>0</p></td>
<td><p>Axis X1</p></td>
</tr>
<tr class="row-odd"><td><p>1</p></td>
<td><p>Axis Y1</p></td>
</tr>
<tr class="row-even"><td><p>2</p></td>
<td><p>Axis X2</p></td>
</tr>
<tr class="row-odd"><td><p>3</p></td>
<td><p>Axis Y2</p></td>
</tr>
<tr class="row-even"><td><p>4</p></td>
<td><p>Button A</p></td>
</tr>
<tr class="row-odd"><td><p>5</p></td>
<td><p>Button B</p></td>
</tr>
<tr class="row-even"><td><p>6</p></td>
<td><p>Button C</p></td>
</tr>
<tr class="row-odd"><td><p>7</p></td>
<td><p>Button D</p></td>
</tr>
<tr class="row-even"><td><p>8</p></td>
<td><p>CHF Buttons X and Y</p></td>
</tr>
<tr class="row-odd"><td><p>9</p></td>
<td><p>CHF Hat 1</p></td>
</tr>
<tr class="row-even"><td><p>10</p></td>
<td><p>CHF Hat 2</p></td>
</tr>
<tr class="row-odd"><td><p>11</p></td>
<td><p>FCS Hat</p></td>
</tr>
<tr class="row-even"><td><p>12</p></td>
<td><p>Pad Button X</p></td>
</tr>
<tr class="row-odd"><td><p>13</p></td>
<td><p>Pad Button Y</p></td>
</tr>
<tr class="row-even"><td><p>14</p></td>
<td><p>Pad Button U</p></td>
</tr>
<tr class="row-odd"><td><p>15</p></td>
<td><p>Pad Button V</p></td>
</tr>
<tr class="row-even"><td><p>16</p></td>
<td><p>Saitek F1-F4 Buttons</p></td>
</tr>
<tr class="row-odd"><td><p>17</p></td>
<td><p>Saitek Digital Mode</p></td>
</tr>
<tr class="row-even"><td><p>19</p></td>
<td><p>GamePad</p></td>
</tr>
<tr class="row-odd"><td><p>20</p></td>
<td><p>Joy2 Axis X1</p></td>
</tr>
<tr class="row-even"><td><p>21</p></td>
<td><p>Joy2 Axis Y1</p></td>
</tr>
<tr class="row-odd"><td><p>22</p></td>
<td><p>Joy2 Axis X2</p></td>
</tr>
<tr class="row-even"><td><p>23</p></td>
<td><p>Joy2 Axis Y2</p></td>
</tr>
<tr class="row-odd"><td><p>24</p></td>
<td><p>Joy2 Button A</p></td>
</tr>
<tr class="row-even"><td><p>25</p></td>
<td><p>Joy2 Button B</p></td>
</tr>
<tr class="row-odd"><td><p>26</p></td>
<td><p>Joy2 Button C</p></td>
</tr>
<tr class="row-even"><td><p>27</p></td>
<td><p>Joy2 Button D</p></td>
</tr>
<tr class="row-odd"><td><p>31</p></td>
<td><p>Joy2 GamePad</p></td>
</tr>
</tbody>
</table>
</div></blockquote>
</section>
<section id="microsoft-sidewinder-joysticks">
<h2><span class="section-number">6.3.2. </span>Microsoft SideWinder joysticks<a class="headerlink" href="#microsoft-sidewinder-joysticks" title="Link to this heading">¶</a></h2>
<p>Microsoft ‘Digital Overdrive’ protocol is supported by the sidewinder.c
module. All currently supported joysticks:</p>
<ul class="simple">
<li><p>Microsoft SideWinder 3D Pro</p></li>
<li><p>Microsoft SideWinder Force Feedback Pro</p></li>
<li><p>Microsoft SideWinder Force Feedback Wheel</p></li>
<li><p>Microsoft SideWinder FreeStyle Pro</p></li>
<li><p>Microsoft SideWinder GamePad (up to four, chained)</p></li>
<li><p>Microsoft SideWinder Precision Pro</p></li>
<li><p>Microsoft SideWinder Precision Pro USB</p></li>
</ul>
<p>are autodetected, and thus no module parameters are needed.</p>
<p>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.</p>
<p>The SideWinder Standard is not a digital joystick, and thus is supported
by the analog driver described above.</p>
</section>
<section id="logitech-adi-devices">
<h2><span class="section-number">6.3.3. </span>Logitech ADI devices<a class="headerlink" href="#logitech-adi-devices" title="Link to this heading">¶</a></h2>
<p>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:</p>
<ul class="simple">
<li><p>Logitech CyberMan 2</p></li>
<li><p>Logitech ThunderPad Digital</p></li>
<li><p>Logitech WingMan Extreme Digital</p></li>
<li><p>Logitech WingMan Formula</p></li>
<li><p>Logitech WingMan Interceptor</p></li>
<li><p>Logitech WingMan GamePad</p></li>
<li><p>Logitech WingMan GamePad USB</p></li>
<li><p>Logitech WingMan GamePad Extreme</p></li>
<li><p>Logitech WingMan Extreme Digital 3D</p></li>
</ul>
<p>ADI devices are autodetected, and the driver supports up to two (any
combination of) devices on a single gameport, using a Y-cable or chained
together.</p>
<p>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. Logitech CyberMan is not supported yet.</p>
</section>
<section id="gravis-grip">
<h2><span class="section-number">6.3.4. </span>Gravis GrIP<a class="headerlink" href="#gravis-grip" title="Link to this heading">¶</a></h2>
<p>Gravis GrIP protocol is supported by the grip.c module. It currently
supports:</p>
<ul class="simple">
<li><p>Gravis GamePad Pro</p></li>
<li><p>Gravis BlackHawk Digital</p></li>
<li><p>Gravis Xterminator</p></li>
<li><p>Gravis Xterminator DualControl</p></li>
</ul>
<p>All these devices are autodetected, and you can even use any combination
of up to two of these pads either chained together or using a Y-cable on a
single gameport.</p>
<p>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
analog driver.</p>
</section>
<section id="fpgaming-a3d-and-madcatz-a3d">
<h2><span class="section-number">6.3.5. </span>FPGaming A3D and MadCatz A3D<a class="headerlink" href="#fpgaming-a3d-and-madcatz-a3d" title="Link to this heading">¶</a></h2>
<p>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:</p>
<ul class="simple">
<li><p>FPGaming Assassin 3D</p></li>
<li><p>MadCatz Panther</p></li>
<li><p>MadCatz Panther XL</p></li>
</ul>
<p>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.</p>
<p>The trackball should work with USB mousedev module as a normal mouse. See
the USB documentation for how to setup a USB mouse.</p>
</section>
<section id="thrustmaster-directconnect-bsp">
<h2><span class="section-number">6.3.6. </span>ThrustMaster DirectConnect (BSP)<a class="headerlink" href="#thrustmaster-directconnect-bsp" title="Link to this heading">¶</a></h2>
<p>The TM DirectConnect (BSP) protocol is supported by the tmdc.c
module. This includes, but is not limited to:</p>
<ul class="simple">
<li><p>ThrustMaster Millennium 3D Interceptor</p></li>
<li><p>ThrustMaster 3D Rage Pad</p></li>
<li><p>ThrustMaster Fusion Digital Game Pad</p></li>
</ul>
<p>Devices not directly supported, but hopefully working are:</p>
<ul class="simple">
<li><p>ThrustMaster FragMaster</p></li>
<li><p>ThrustMaster Attack Throttle</p></li>
</ul>
<p>If you have one of these, contact me.</p>
<p>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
a Y-cable.</p>
</section>
<section id="creative-labs-blaster">
<h2><span class="section-number">6.3.7. </span>Creative Labs Blaster<a class="headerlink" href="#creative-labs-blaster" title="Link to this heading">¶</a></h2>
<p>The Blaster protocol is supported by the cobra.c module. It supports only
the:</p>
<ul class="simple">
<li><p>Creative Blaster GamePad Cobra</p></li>
</ul>
<p>Up to two of these can be used on a single gameport, using a Y-cable.</p>
</section>
<section id="genius-digital-joysticks">
<h2><span class="section-number">6.3.8. </span>Genius Digital joysticks<a class="headerlink" href="#genius-digital-joysticks" title="Link to this heading">¶</a></h2>
<p>The Genius digitally communicating joysticks are supported by the gf2k.c
module. This includes:</p>
<ul class="simple">
<li><p>Genius Flight2000 F-23 joystick</p></li>
<li><p>Genius Flight2000 F-31 joystick</p></li>
<li><p>Genius G-09D gamepad</p></li>
</ul>
<p>Other Genius digital joysticks are not supported yet, but support can be
added fairly easily.</p>
</section>
<section id="interact-digital-joysticks">
<h2><span class="section-number">6.3.9. </span>InterAct Digital joysticks<a class="headerlink" href="#interact-digital-joysticks" title="Link to this heading">¶</a></h2>
<p>The InterAct digitally communicating joysticks are supported by the
interact.c module. This includes:</p>
<ul class="simple">
<li><p>InterAct HammerHead/FX gamepad</p></li>
<li><p>InterAct ProPad8 gamepad</p></li>
</ul>
<p>Other InterAct digital joysticks are not supported yet, but support can be
added fairly easily.</p>
</section>
<section id="pdpi-lightning-4-gamecards">
<h2><span class="section-number">6.3.10. </span>PDPI Lightning 4 gamecards<a class="headerlink" href="#pdpi-lightning-4-gamecards" title="Link to this heading">¶</a></h2>
<p>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.</p>
</section>
<section id="trident-4dwave-aureal-vortex">
<h2><span class="section-number">6.3.11. </span>Trident 4DWave / Aureal Vortex<a class="headerlink" href="#trident-4dwave-aureal-vortex" title="Link to this heading">¶</a></h2>
<p>Soundcards with a Trident 4DWave DX/NX or Aureal Vortex/Vortex2 chipset
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..</p>
</section>
<section id="crystal-soundfusion">
<h2><span class="section-number">6.3.12. </span>Crystal SoundFusion<a class="headerlink" href="#crystal-soundfusion" title="Link to this heading">¶</a></h2>
<p>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.</p>
</section>
<section id="soundblaster-live">
<h2><span class="section-number">6.3.13. </span>SoundBlaster Live!<a class="headerlink" href="#soundblaster-live" title="Link to this heading">¶</a></h2>
<p>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.</p>
</section>
<section id="soundblaster-64-and-128-es1370-and-es1371-ess-solo1-and-s3-sonicvibes">
<h2><span class="section-number">6.3.14. </span>SoundBlaster 64 and 128 - ES1370 and ES1371, ESS Solo1 and S3 SonicVibes<a class="headerlink" href="#soundblaster-64-and-128-es1370-and-es1371-ess-solo1-and-s3-sonicvibes" title="Link to this heading">¶</a></h2>
<p>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.</p>
</section>
<section id="amiga">
<h2><span class="section-number">6.3.15. </span>Amiga<a class="headerlink" href="#amiga" title="Link to this heading">¶</a></h2>
<p>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:</p>
<blockquote>
<div><p>amijoy.map=<a>,<b></p>
</div></blockquote>
<p>a and b define the joysticks connected to the JOY0DAT and JOY1DAT ports of
the Amiga.</p>
<blockquote>
<div><table class="docutils align-default">
<thead>
<tr class="row-odd"><th class="head"><p>Value</p></th>
<th class="head"><p>Joystick type</p></th>
</tr>
</thead>
<tbody>
<tr class="row-even"><td><p>0</p></td>
<td><p>None</p></td>
</tr>
<tr class="row-odd"><td><p>1</p></td>
<td><p>1-button digital joystick</p></td>
</tr>
</tbody>
</table>
</div></blockquote>
<p>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.</p>
</section>
<section id="game-console-and-8-bit-pads-and-joysticks">
<h2><span class="section-number">6.3.16. </span>Game console and 8-bit pads and joysticks<a class="headerlink" href="#game-console-and-8-bit-pads-and-joysticks" title="Link to this heading">¶</a></h2>
<p>These pads and joysticks are not designed for PCs and other computers
Linux runs on, and usually require a special connector for attaching
them through a parallel port.</p>
<p>See <a class="reference internal" href="../devices/joystick-parport.html#joystick-parport"><span class="std std-ref">Parallel Port Joystick Drivers</span></a> for more info.</p>
</section>
<section id="spacetec-labtec-devices">
<h2><span class="section-number">6.3.17. </span>SpaceTec/LabTec devices<a class="headerlink" href="#spacetec-labtec-devices" title="Link to this heading">¶</a></h2>
<p>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:</p>
<ul class="simple">
<li><p>SpaceTec SpaceBall Avenger</p></li>
<li><p>SpaceTec SpaceOrb 360</p></li>
</ul>
<p>Devices currently supported by spaceball.c are:</p>
<ul class="simple">
<li><p>SpaceTec SpaceBall 4000 FLX</p></li>
</ul>
<p>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:</p>
<div class="highlight-none notranslate"><div class="highlight"><pre><span></span>inputattach --spaceorb /dev/tts/x &
</pre></div>
</div>
<p>or:</p>
<div class="highlight-none notranslate"><div class="highlight"><pre><span></span>inputattach --spaceball /dev/tts/x &
</pre></div>
</div>
<p>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.</p>
<p>There is one caveat with the SpaceOrb. The button #6, the one 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.</p>
<p>SpaceTec SpaceBall 2003 FLX and 3003 FLX are not supported yet.</p>
</section>
<section id="logitech-swift-devices">
<h2><span class="section-number">6.3.18. </span>Logitech SWIFT devices<a class="headerlink" href="#logitech-swift-devices" title="Link to this heading">¶</a></h2>
<p>The SWIFT serial protocol is supported by the warrior.c module. It
currently supports only the:</p>
<ul class="simple">
<li><p>Logitech WingMan Warrior</p></li>
</ul>
<p>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:</p>
<div class="highlight-none notranslate"><div class="highlight"><pre><span></span>inputattach --warrior /dev/tts/x &
</pre></div>
</div>
<p>/dev/tts/x is the serial port your Warrior is attached to.</p>
</section>
<section id="magellan-space-mouse">
<h2><span class="section-number">6.3.19. </span>Magellan / Space Mouse<a class="headerlink" href="#magellan-space-mouse" title="Link to this heading">¶</a></h2>
<p>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:</p>
<ul class="simple">
<li><p>Magellan 3D</p></li>
<li><p>Space Mouse</p></li>
</ul>
<p>models; the additional buttons on the ‘Plus’ versions are not supported yet.</p>
<p>To use it, you need to attach the serial port to the driver using the:</p>
<div class="highlight-none notranslate"><div class="highlight"><pre><span></span>inputattach --magellan /dev/tts/x &
</pre></div>
</div>
<p>command. After that the Magellan will be detected, initialized, will beep,
and the /dev/input/jsX device should become usable.</p>
</section>
<section id="i-force-devices">
<h2><span class="section-number">6.3.20. </span>I-Force devices<a class="headerlink" href="#i-force-devices" title="Link to this heading">¶</a></h2>
<p>All I-Force devices are supported by the iforce module. This includes:</p>
<ul class="simple">
<li><p>AVB Mag Turbo Force</p></li>
<li><p>AVB Top Shot Pegasus</p></li>
<li><p>AVB Top Shot Force Feedback Racing Wheel</p></li>
<li><p>Boeder Force Feedback Wheel</p></li>
<li><p>Logitech WingMan Force</p></li>
<li><p>Logitech WingMan Force Wheel</p></li>
<li><p>Guillemot Race Leader Force Feedback</p></li>
<li><p>Guillemot Force Feedback Racing Wheel</p></li>
<li><p>Thrustmaster Motor Sport GT</p></li>
</ul>
<p>To use it, you need to attach the serial port to the driver using the:</p>
<div class="highlight-none notranslate"><div class="highlight"><pre><span></span>inputattach --iforce /dev/tts/x &
</pre></div>
</div>
<p>command. After that the I-Force device will be detected, and the
/dev/input/jsX device should become usable.</p>
<p>In case you’re using the device via the USB port, the inputattach command
isn’t needed.</p>
<p>The I-Force driver now supports force feedback via the event interface.</p>
<p>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.</p>
</section>
<section id="gravis-stinger-gamepad">
<h2><span class="section-number">6.3.21. </span>Gravis Stinger gamepad<a class="headerlink" href="#gravis-stinger-gamepad" title="Link to this heading">¶</a></h2>
<p>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:</p>
<div class="highlight-none notranslate"><div class="highlight"><pre><span></span>inputattach --stinger /dev/tty/x &
</pre></div>
</div>
<p>where x is the number of the serial port.</p>
</section>
</section>
<section id="troubleshooting">
<h1><span class="section-number">6.4. </span>Troubleshooting<a class="headerlink" href="#troubleshooting" title="Link to this heading">¶</a></h1>
<p>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:</p>
<div class="highlight-none notranslate"><div class="highlight"><pre><span></span>jstest --normal /dev/input/js0
jstest --old /dev/input/js0
</pre></div>
</div>
<p>Additionally you can do a test with the evtest utility:</p>
<div class="highlight-none notranslate"><div class="highlight"><pre><span></span>evtest /dev/input/event0
</pre></div>
</div>
<p>Oh, and read the FAQ! :)</p>
</section>
<section id="faq">
<h1><span class="section-number">6.5. </span>FAQ<a class="headerlink" href="#faq" title="Link to this heading">¶</a></h1>
<dl class="field-list simple">
<dt class="field-odd">Q<span class="colon">:</span></dt>
<dd class="field-odd"><p>Running ‘jstest /dev/input/js0’ results in “File not found” error. What’s the
cause?</p>
</dd>
<dt class="field-even">A<span class="colon">:</span></dt>
<dd class="field-even"><p>The device files don’t exist. Create them (see section 2.2).</p>
</dd>
<dt class="field-odd">Q<span class="colon">:</span></dt>
<dd class="field-odd"><p>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?</p>
</dd>
<dt class="field-even">A<span class="colon">:</span></dt>
<dd class="field-even"><p>Yes, it is possible, but it’ll burn your serial port or the pad. It
won’t work, of course.</p>
</dd>
<dt class="field-odd">Q<span class="colon">:</span></dt>
<dd class="field-odd"><p>My joystick doesn’t work with Quake / Quake 2. What’s the cause?</p>
</dd>
<dt class="field-even">A<span class="colon">:</span></dt>
<dd class="field-even"><p>Quake / Quake 2 don’t support joystick. Use joy2key to simulate keypresses
for them.</p>
</dd>
</dl>
</section>
</div>
</div>
</div>
<div class="clearer"></div>
</div>
<div class="footer">
©The kernel development community.
|
Powered by <a href="https://www.sphinx-doc.org/">Sphinx 8.1.3</a>
& <a href="https://alabaster.readthedocs.io">Alabaster 0.7.16</a>
|
<a href="../../_sources/input/joydev/joystick.rst.txt"
rel="nofollow">Page source</a>
</div>
</body>
</html>