This file describes how to install the joystick device driver version
0.7.3 for the Linux 1.1-1.2 kernel (or previous, if it has the
loadable modules).

This package includes the following files:

Makefile         - make file for package and test programs
README           - this README file
joystick-0.7.3.lsm - Linux Software map entry for this package
joystick.c       - The device driver itself
joystick.h       - The device driver include file
js.4             - man page
js.c             - test program
jscal.c          - calibration program

INSTALLATION:

You will need the modutils to load and remove loadable modules from
the kernel. They can be found in the kernel directories of the
Linux sites.

First you need the joystick module. The following command line will
install the joystick header file in /usr/include/linux and compile the
joystick module. (The include file must be installed as root, but the
compilation of the driver can proceed as a normal user. insmod and
rmmod also require superuser priveleges.)

# make joystick.o

Then in your rc.local insert a line like this:

# insmod /conf/modules/joystick.o

Choose your own place for joystick.o. You can load the module from the
joystick source directory to try it out; you can remove the module with

# rmmod joystick

If you have a recent kernel where it has the proper symbol table, you
shouldn't have problems. If you have an old kernel, then you will get
an error similar to this:

# insmod joystick.o
_xtime undefined
#

If that is the case, then you need to add those ``undefined'' calls to
the kernel symbol table in linux/kernel/ksyms.S, then remake the
kernel, save a backup of your current kernel, and reboot the new
kernel.

On bootup you should see a message displayed such as the following:

js_init: found 2 joysticks

To use the joystick driver, two files should be made in /dev. To do
this, go to the directory where the joystick distribution was
installed and do:

# make devs

To test the driver, compile and run the programs "js" and "jscal" by
doing:

# make all

The program "js" simply prints out the state of the buttons and
joystick values continuously.

The program "jscal" allows the joysticks to be calibrated to return
values between 0 and 0xff (or as close as can be done with
shifting).

If you want to install the works,

# make install

will compile everything, make devices, install the test programs in
/usr/local/bin, and install the man page in /usr/man/man4.

The original joystick driver was written by Art Smith
(asmith@cbnewsd.att.com). Changes in version 0.6 were made by Jeff
Tranter (tranter@software.mitel.com). Version 0.7 brought to you by
Carlos Puchol (cpg@cs.utexas.edu). Version 0.7.1-0.7.3 brought to you
by Matt Rhoten (mrhoten@oz.net).

Changes from version 0.7.1 to 0.7.3
- Makefile changes to install the header file in /usr/include/linux/
- Makefile changes to prettify and fix dependencies
- Include directives changed for joystick.h
- Code changes in module from Dan Fandrich (dan@fch.wimsey.bc.ca): separated
  out joystick detection/counting, cleanup
- Code changes in module from Sverker Wiberg (sverkerw@manila.docs.uu.se):
  replicated fix for detection of 3-axis joysticks (a la Gravis Gamepad,
  FLCS Thrustmaster), better detection announcement.
- Warning and possible bug for variable 'fname' fixed in js.c and jscal.c.

Changes from version 0.7 to 0.7.1
- Add include so module compiles under recent kernels.

Changes from version 0.7 to 0.7.1
- Fix bug in reading button state of js1

Changes from version 0.6 to 0.7
- Support for loadable modules

Changes from version 0.5 to 0.6:
- updated to work with 0.99pl15 kernel (and hopefully 1.0)
- wrote man page
- enhanced "js" and "jscal" programs
- various minor changes (indenting code, fixing typos, etc...)

One application that supports the joystick driver is the "fly8" flight
simulator program. Check any of the major Linux archive sites for the
latest version.
