Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src Move the joy(4) manpage to MI location, too - it's not i386-...



details:   https://anonhg.NetBSD.org/src/rev/2920284d3c95
branches:  trunk
changeset: 521840:2920284d3c95
user:      jdolecek <jdolecek%NetBSD.org@localhost>
date:      Wed Feb 06 21:06:32 2002 +0000

description:
Move the joy(4) manpage to MI location, too - it's not i386-only.
Pointed out by Thomas Klausner, thanks :)

diffstat:

 distrib/sets/lists/man/mi          |    6 +-
 distrib/sets/lists/man/obsolete.mi |    4 +-
 share/man/man4/Makefile            |    5 +-
 share/man/man4/joy.4               |  142 +++++++++++++++++++++++++++++++++++++
 share/man/man4/man4.i386/Makefile  |    4 +-
 share/man/man4/man4.i386/joy.4     |  142 -------------------------------------
 6 files changed, 153 insertions(+), 150 deletions(-)

diffs (truncated from 391 to 300 lines):

diff -r 63f5ac6273af -r 2920284d3c95 distrib/sets/lists/man/mi
--- a/distrib/sets/lists/man/mi Wed Feb 06 20:39:00 2002 +0000
+++ b/distrib/sets/lists/man/mi Wed Feb 06 21:06:32 2002 +0000
@@ -1,4 +1,4 @@
-# $NetBSD: mi,v 1.444 2002/01/24 14:49:16 martti Exp $
+# $NetBSD: mi,v 1.445 2002/02/06 21:06:32 jdolecek Exp $
 ./usr/share/info/am-utils.info                 man-amd-info
 ./usr/share/info/as.info                       man-computil-info
 ./usr/share/info/awk.info                      man-util-info
@@ -664,7 +664,6 @@
 ./usr/share/man/cat4/i386/fdc.0                        man-sys-catman
 ./usr/share/man/cat4/i386/intro.0              man-sys-catman
 ./usr/share/man/cat4/i386/io.0                 man-sys-catman
-./usr/share/man/cat4/i386/joy.0                        man-sys-catman
 ./usr/share/man/cat4/i386/kmem.0               man-sys-catman
 ./usr/share/man/cat4/i386/lms.0                        man-sys-catman
 ./usr/share/man/cat4/i386/lpt.0                        man-sys-catman
@@ -718,6 +717,7 @@
 ./usr/share/man/cat4/isp.0                     man-sys-catman
 ./usr/share/man/cat4/ix.0                      man-sys-catman
 ./usr/share/man/cat4/iy.0                      man-sys-catman
+./usr/share/man/cat4/joy.0                     man-sys-catman
 ./usr/share/man/cat4/kue.0                     man-sys-catman
 ./usr/share/man/cat4/lc.0                      man-sys-catman
 ./usr/share/man/cat4/ld.0                      man-sys-catman
@@ -2332,7 +2332,6 @@
 ./usr/share/man/man4/i386/fdc.4                        man-sys-man
 ./usr/share/man/man4/i386/intro.4              man-sys-man
 ./usr/share/man/man4/i386/io.4                 man-sys-man
-./usr/share/man/man4/i386/joy.4                        man-sys-man
 ./usr/share/man/man4/i386/kmem.4               man-sys-man
 ./usr/share/man/man4/i386/lms.4                        man-sys-man
 ./usr/share/man/man4/i386/lpt.4                        man-sys-man
@@ -2386,6 +2385,7 @@
 ./usr/share/man/man4/isp.4                     man-sys-man
 ./usr/share/man/man4/ix.4                      man-sys-man
 ./usr/share/man/man4/iy.4                      man-sys-man
+./usr/share/man/man4/joy.4                     man-sys-man
 ./usr/share/man/man4/kue.4                     man-sys-man
 ./usr/share/man/man4/lc.4                      man-sys-man
 ./usr/share/man/man4/ld.4                      man-sys-man
diff -r 63f5ac6273af -r 2920284d3c95 distrib/sets/lists/man/obsolete.mi
--- a/distrib/sets/lists/man/obsolete.mi        Wed Feb 06 20:39:00 2002 +0000
+++ b/distrib/sets/lists/man/obsolete.mi        Wed Feb 06 21:06:32 2002 +0000
@@ -1,4 +1,4 @@
-# $NetBSD: obsolete.mi,v 1.36 2002/01/04 15:33:03 bjh21 Exp $
+# $NetBSD: obsolete.mi,v 1.37 2002/02/06 21:06:33 jdolecek Exp $
 /usr/share/man/cat1/amq.0
 /usr/share/man/cat1/i386
 /usr/share/man/cat1/i386/cursor.0
@@ -38,6 +38,7 @@
 /usr/share/man/cat4/hp300/tc.0
 /usr/share/man/cat4/i386/com.0
 /usr/share/man/cat4/i386/ie.0
+/usr/share/man/cat4/i386/joy.0
 /usr/share/man/cat4/i386/le.0
 /usr/share/man/cat4/i386/pcvt.0
 /usr/share/man/cat4/i386/pms.0
@@ -134,6 +135,7 @@
 /usr/share/man/man4/hp300/tc.4
 /usr/share/man/man4/i386/com.4
 /usr/share/man/man4/i386/ie.4
+/usr/share/man/man4/i386/joy.4
 /usr/share/man/man4/i386/le.4
 /usr/share/man/man4/i386/pcvt.4
 /usr/share/man/man4/i386/pms.4
diff -r 63f5ac6273af -r 2920284d3c95 share/man/man4/Makefile
--- a/share/man/man4/Makefile   Wed Feb 06 20:39:00 2002 +0000
+++ b/share/man/man4/Makefile   Wed Feb 06 21:06:32 2002 +0000
@@ -1,4 +1,4 @@
-#      $NetBSD: Makefile,v 1.244 2002/01/06 16:08:17 jmcneill Exp $
+#      $NetBSD: Makefile,v 1.245 2002/02/06 21:06:34 jdolecek Exp $
 #      @(#)Makefile    8.1 (Berkeley) 6/18/93
 
 MAN=   acphy.4 adv.4 adw.4 agp.4 ahb.4 ahc.4 amhphy.4 an.4 aria.4 \
@@ -12,7 +12,8 @@
        fd.4 fpa.4 fms.4 fxp.4 gentbi.4 glxtphy.4 gre.4 gphyter.4 gsip.4 hme.4 \
        icmp.4 icsphy.4 idp.4 ifmedia.4 iha.4 inet.4 inphy.4 intersil7170.4 \
        ioasic.4 ioat.4 \
-       iop.4 iophy.4 iopsp.4 ip.4 ipip.4 ipkdb.4 iso.4 isp.4 lc.4 ld.4 lkm.4 \
+       iop.4 iophy.4 iopsp.4 ip.4 ipip.4 ipkdb.4 iso.4 isp.4 joy.4 \
+       lc.4 ld.4 lkm.4 \
        lo.4 lxtphy.4 mainbus.4 makphy.4 mbe.4 mca.4 mcclock.4 \
        md.4 mfb.4 mhzc.4 midi.4 mii.4 \
        mk48txx.4 mlx.4 mly.4 mpu.4 mtio.4 ne.4 neo.4 netintro.4 ns.4 nsip.4 \
diff -r 63f5ac6273af -r 2920284d3c95 share/man/man4/joy.4
--- /dev/null   Thu Jan 01 00:00:00 1970 +0000
+++ b/share/man/man4/joy.4      Wed Feb 06 21:06:32 2002 +0000
@@ -0,0 +1,142 @@
+.\" $NetBSD: joy.4,v 1.1 2002/02/06 21:06:34 jdolecek Exp $
+.\"
+.\" Copyright (c) 1996 Matthieu Herrb
+.\" All rights reserved.
+.\"
+.\" Redistribution and use in source and binary forms, with or without
+.\" modification, are permitted provided that the following conditions
+.\" are met:
+.\" 1. Redistributions of source code must retain the above copyright
+.\"    notice, this list of conditions and the following disclaimer.
+.\" 2. Redistributions in binary form must reproduce the above copyright
+.\"    notice, this list of conditions and the following disclaimer in the
+.\"    documentation and/or other materials provided with the distribution.
+.\" 3. All advertising materials mentioning features or use of this software
+.\"    must display the following acknowledgement:
+.\"      This product includes software developed by Christopher G. Demetriou.
+.\" 4. The name of the author may not be used to endorse or promote products
+.\"    derived from this software without specific prior written permission
+.\"
+.\" THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
+.\" IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
+.\" OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
+.\" IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
+.\" INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
+.\" NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+.\" DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+.\" THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+.\" (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
+.\" THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+.\"
+.Dd January 7, 1996
+.Dt JOY 4
+.Os
+.Sh NAME
+.Nm joy
+.Nd
+Games adapter driver
+.Sh SYNOPSIS
+.Cd "joy0 at isa? port 0x201"
+.Cd "joy* at isapnp?"
+.Cd "joy* at ofisa?"
+.Cd "joy* at pci?"
+.Cd "joy* at pnpbios? index ?"
+.Sh DESCRIPTION
+This driver provides access to the games adapter. The lower bit in the
+minor device number selects the joystick: 0 is the first joystick and
+1 is the second.
+.Pp
+The game control adapter allows up to two joysticks to be attached to
+the system. The adapter plus the driver convert the present resistive
+value to a relative joystick position. On receipt of an output signal,
+four timing circuits are started. By determining the time required for
+the circuit to time-out (a function of the resistance), the paddle
+position can be determined. The adapter could be used as a general
+purpose I/O card with four analog (resistive) inputs plus four digital
+input points.
+.Pp
+Applications may call ioctl() on a game adapter driver file descriptor
+to set and get the offsets of the two potentiometers and the maximum
+time-out value for the circuit. The
+ioctl() commands are listed in
+.Pa Aq machine/joystick.h
+and currently are:
+.Pp
+.Bl -tag -width JOY_GET_X_OFFSET -compact
+.It JOY_SETTIMEOUT
+Sets the maximum time-out for the adapter.
+.It JOY_GETTIMEOUT
+Returns the current maximum time-out.
+.It JOY_SET_X_OFFSET
+Sets an offset on X value.
+.It JOY_GET_X_OFFSET
+Returns the current X offset.
+.It JOY_SET_Y_OFFSET
+Sets an offset on Y value.
+.It JOY_GET_Y_OFFSET
+Returns the current Y offset.
+.El
+.Pp
+All this commands take an integer parameter.
+.Pp
+Read() on the file descriptor returns a
+.Fa joystick
+structure:
+.Bd -literal -offset indent
+struct joystick {
+       int x;
+       int y;
+       int b1;
+       int b2;
+};
+.Ed
+.Pp
+The fields have the following functions:
+.Bl -tag -width xxx
+.It Fa x
+current X coordinate of the joystick (or position of paddle 1)
+.It Fa y
+current Y coordinate of the joystick (or position of paddle 2)
+.It Fa b1
+current state of button 1
+.It Fa b2
+current state of button 2
+.El
+.Pp
+The b1 and b2 fields in struct joystick are set to 1 if the
+corresponding button is down, 0 otherwise.
+.Pp
+The x and y coordinates are supposed to be between 0 and 255 for a
+good joystick and a good adapter. Unfortunately, because of the
+hardware hack that is used to measure the position (by measuring the
+time needed to discharge an RC circuit made from the joystick's
+potentiometer and a capacitor on the adapter), calibration
+is needed to determine exactly what values are returned for a specific
+joystick/adapter combination. Incorrect hardware can yield negative or
+> 255 values.
+.Pp
+A typical calibration procedure uses the values returned at lower
+left, center and upper right positions of the joystick to compute the
+relative position.
+.Pp
+This calibration is not part of the driver.
+.Sh FILES
+.Bl -tag -width Pa -compact
+.It Pa /dev/joy0
+first joystick
+.br
+.It Pa /dev/joy1
+second joystick
+.El
+.Sh SEE ALSO
+.Xr isa 4 ,
+.Xr isapnp 4 ,
+.Xr ofisa 4 ,
+.Xr pci 4 ,
+.Xr pnpbios 4
+.Sh AUTHORS
+Jean-Marc Zucconi wrote the
+.Fx
+driver. Matthieu Herrb ported it to
+.Nx
+and wrote this manual page.
diff -r 63f5ac6273af -r 2920284d3c95 share/man/man4/man4.i386/Makefile
--- a/share/man/man4/man4.i386/Makefile Wed Feb 06 20:39:00 2002 +0000
+++ b/share/man/man4/man4.i386/Makefile Wed Feb 06 21:06:32 2002 +0000
@@ -1,8 +1,8 @@
-#      $NetBSD: Makefile,v 1.49 2001/07/02 22:59:25 hubertf Exp $
+#      $NetBSD: Makefile,v 1.50 2002/02/06 21:06:35 jdolecek Exp $
 #      from: @(#)Makefile      8.1 (Berkeley) 6/5/93
 
 MAN=   apm.4 autoconf.4 busmouse.4 console.4 fdc.4 \
-       intro.4 io.4 joy.4 lms.4 lpt.4 mem.4 mms.4 npx.4 \
+       intro.4 io.4 lms.4 lpt.4 mem.4 mms.4 npx.4 \
        opms.4 pcibios.4 pnpbios.4
 MLINKS=        mem.4 kmem.4 lms.4 olms.4 mms.4 omms.4
 MLINKS+=pcibios.4 PCIBIOS.4
diff -r 63f5ac6273af -r 2920284d3c95 share/man/man4/man4.i386/joy.4
--- a/share/man/man4/man4.i386/joy.4    Wed Feb 06 20:39:00 2002 +0000
+++ /dev/null   Thu Jan 01 00:00:00 1970 +0000
@@ -1,142 +0,0 @@
-.\" $NetBSD: joy.4,v 1.13 2001/12/07 19:02:30 wiz Exp $
-.\"
-.\" Copyright (c) 1996 Matthieu Herrb
-.\" All rights reserved.
-.\"
-.\" Redistribution and use in source and binary forms, with or without
-.\" modification, are permitted provided that the following conditions
-.\" are met:
-.\" 1. Redistributions of source code must retain the above copyright
-.\"    notice, this list of conditions and the following disclaimer.
-.\" 2. Redistributions in binary form must reproduce the above copyright
-.\"    notice, this list of conditions and the following disclaimer in the
-.\"    documentation and/or other materials provided with the distribution.
-.\" 3. All advertising materials mentioning features or use of this software
-.\"    must display the following acknowledgement:
-.\"      This product includes software developed by Christopher G. Demetriou.
-.\" 4. The name of the author may not be used to endorse or promote products
-.\"    derived from this software without specific prior written permission
-.\"
-.\" THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
-.\" IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
-.\" OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
-.\" IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
-.\" INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
-.\" NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
-.\" DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
-.\" THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
-.\" (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
-.\" THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-.\"
-.Dd January 7, 1996
-.Dt JOY 4 i386
-.Os
-.Sh NAME
-.Nm joy
-.Nd
-Games adapter driver
-.Sh SYNOPSIS
-.Cd "joy0 at isa? port 0x201"
-.Cd "joy* at isapnp?"
-.Cd "joy* at ofisa?"
-.Cd "joy* at pci?"
-.Cd "joy* at pnpbios? index ?"
-.Sh DESCRIPTION
-This driver provides access to the games adapter. The lower bit in the
-minor device number selects the joystick: 0 is the first joystick and
-1 is the second.
-.Pp
-The game control adapter allows up to two joysticks to be attached to
-the system. The adapter plus the driver convert the present resistive
-value to a relative joystick position. On receipt of an output signal,



Home | Main Index | Thread Index | Old Index