From d7dd10171906c1814a83f184951d7ee392eacb8a Mon Sep 17 00:00:00 2001 From: wiz Date: Thu, 2 Dec 2004 15:02:37 +0000 Subject: [PATCH] Sort SYNOPSIS. New sentence, new line. use more markup. Grammar fixes. --- share/man/man4/joy.4 | 53 +++++++++++++++++++++++--------------------- 1 file changed, 28 insertions(+), 25 deletions(-) diff --git a/share/man/man4/joy.4 b/share/man/man4/joy.4 index 073132098840..cfa4a7b83a78 100644 --- a/share/man/man4/joy.4 +++ b/share/man/man4/joy.4 @@ -1,4 +1,4 @@ -.\" $NetBSD: joy.4,v 1.6 2004/12/02 14:33:31 xtraeme Exp $ +.\" $NetBSD: joy.4,v 1.7 2004/12/02 15:02:37 wiz Exp $ .\" .\" Copyright (c) 1996 Matthieu Herrb .\" All rights reserved. @@ -35,54 +35,55 @@ .Nm joy .Nd game adapter driver .Sh SYNOPSIS +.Cd "joy* at acpi?" +.Cd "joy* at eso?" .Cd "joy0 at isa? port 0x201" .Cd "joy* at isapnp?" .Cd "joy* at ofisa?" .Cd "joy* at pci?" .Cd "joy* at pnpbios? index ?" -.Cd "joy* at eso?" -.Cd "joy* at acpi?" .Sh DESCRIPTION This driver provides access to the game adapter. -The lower bit in the -minor device number selects the joystick: 0 is the first joystick and -1 is the second. +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. +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 .Xr ioctl 2 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 +time-out value for the circuit. +The .Xr ioctl 2 commands are listed in .Aq Pa machine/joystick.h and currently are: .Pp .Bl -tag -width JOY_GET_X_OFFSET -compact -.It JOY_SETTIMEOUT +.It Dv JOY_SETTIMEOUT Sets the maximum time-out for the adapter. -.It JOY_GETTIMEOUT +.It Dv JOY_GETTIMEOUT Returns the current maximum time-out. -.It JOY_SET_X_OFFSET +.It Dv JOY_SET_X_OFFSET Sets an offset on X value. -.It JOY_GET_X_OFFSET +.It Dv JOY_GET_X_OFFSET Returns the current X offset. -.It JOY_SET_Y_OFFSET +.It Dv JOY_SET_Y_OFFSET Sets an offset on Y value. -.It JOY_GET_Y_OFFSET +.It Dv JOY_GET_Y_OFFSET Returns the current Y offset. .El .Pp -All this commands take an integer parameter. +All these commands take an integer parameter. .Pp .Xr read 2 on the file descriptor returns a @@ -113,13 +114,14 @@ 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 +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. +joystick/adapter combination. +Incorrect hardware can yield negative or values greater than 255. .Pp A typical calibration procedure uses the values returned at lower left, center and upper right positions of the joystick to compute the @@ -144,6 +146,7 @@ second joystick .Sh AUTHORS Jean-Marc Zucconi wrote the .Fx -driver. Matthieu Herrb ported it to +driver. +Matthieu Herrb ported it to .Nx and wrote this manual page.