From 475fda43c390c0a326d8ace76a9a2e5df04e3826 Mon Sep 17 00:00:00 2001 From: Aaron Campbell Date: Wed, 5 Jul 2000 13:46:55 +0000 Subject: man4.i386 repairs. --- share/man/man4/man4.i386/joy.4 | 87 ++++++++++++++++++++++++------------------ 1 file changed, 50 insertions(+), 37 deletions(-) (limited to 'share/man/man4/man4.i386/joy.4') diff --git a/share/man/man4/man4.i386/joy.4 b/share/man/man4/man4.i386/joy.4 index 58220a143ac..a3e32436f33 100644 --- a/share/man/man4/man4.i386/joy.4 +++ b/share/man/man4/man4.i386/joy.4 @@ -1,4 +1,4 @@ -.\" $OpenBSD: joy.4,v 1.7 1999/07/09 13:35:43 aaron Exp $ +.\" $OpenBSD: joy.4,v 1.8 2000/07/05 13:46:52 aaron Exp $ .\" .\" Copyright (c) 1996 Matthieu Herrb .\" All rights reserved. @@ -41,27 +41,32 @@ Games adapter driver .Cd "joy0 at isa? port 0x201" .Cd "joy* at isapnp?" .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. +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. +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 +Applications may call +.Fn 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 +time-out value for the circuit. +The +.Fn ioctl +commands are listed in +.Aq Pa machine/joystick.h and currently are: .Pp -.Bl -tag -width JOY_GET_X_OFFSET -compact +.Bl -tag -width JOY_GET_X_OFFSET -offset indent -compact .It JOY_SETTIMEOUT Sets the maximum time-out for the adapter. .It JOY_GETTIMEOUT @@ -91,42 +96,50 @@ struct joystick { .Ed .Pp The fields have the following functions: -.Bl -tag -width b1 +.Pp +.Bl -tag -width xxx -offset indent -compact .It Fa x -The current X coordinate of the joystick (or position of paddle 1) +Joystick's current X coordinate (or position of paddle 1). .It Fa y -The current Y coordinate of the joystick (or position of paddle 2) +Joystick's current Y coordinate (or position of paddle 2). .It Fa b1 -The current state of button 1 +Current state of button 1. .It Fa b2 -The current state of button 2 +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. +The +.Fa b1 +and +.Fa b2 +fields in struct joystick are set to 1 if the corresponding button is down, +or 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 +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. +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. +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 +.Bl -tag -width /dev/joy0 -compact .It Pa /dev/joy0 first joystick -.br .It Pa /dev/joy1 second joystick .El .Sh AUTHORS -Jean-Marc Zucconi wrote the FreeBSD driver. Matthieu Herrb ported it -to NetBSD and wrote this manual page. +Jean-Marc Zucconi wrote the +.Fx +driver. +Matthieu Herrb ported it to +.Nx +and wrote this manual page. -- cgit v1.2.3