home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Fresh Fish 4
/
FreshFish_May-June1994.bin
/
new
/
amigalibdisks
/
d982
/
joyride
/
joyride.doc
< prev
next >
Wrap
Text File
|
1994-04-01
|
5KB
|
109 lines
***************************************************************************
* *
* JoyRide V1.0 *
* *
* © 1994 by Brian Koetting *
* *
***************************************************************************
** DISTRIBUTION:***********************************************************
JoyRide is FREEWARE and FREELY redistributable. No restrictions are placed
upon its distribution, alone, or with another package, whether commercial,
or otherwise.
** AAD:********************************************************************
Please add ALL APPLICABLE DISCLAIMERS here.
** INTRODUCTION:***********************************************************
JoyRide is a commodity that provides an intuition front-end for joystick
events. This has some nice advantages for both users and programmers.
There are three (3) basic features you get:
a) A simple joystick interface through a window's IDCMP port.
No joystick-specific code has to be used, JoyRide initializes and
handles all the trigger-setting and reading of the joystick.
The joystick events are passed to your application in the same
manner as all other intuition events through your window's IDCMP,
just like IDCMP_RAWKEY and IDCMP_MOUSEBUTTON.
b) Application shareable joystick events.
Normally, only one application can allocate the joystick at a time.
In other words, no two applications that both use the joystick can
multitask. JoyRide handles this in the same manner the
keyboard.device handles key presses. That is, it sends them down
the input.device where they are passed to the active window
(or "input focus"). In this way, many programs can now share
joystick events.
c) Joystick events now pass through the input.device stream.
This is helpful because now screen blankers know that you're
using the computer and won't blank during joystick games!
AmigaOS should already contain this functionality. Perhaps in the future.
Until then, JoyRide can potentionaly add usefulness and flexibiliy to
using the joystick in an OS friendly manner within your applications.
** USAGE:******************************************************************
JoyRide runs only under AmigaDOS 2.0 and above.
Basically, you can just put JoyRide in your WBStartup drawer or any other
convienant location. By double clicking on its icon (or typing its name
from a shell) you can alternately start and stop JoyRide. Since it is a
commodity, it can also be deactivated or removed through the commodities
Exchange program.
Note also that JoyRide is basically incompatible with previously written
applications that use the joystick, and will most likely have to be
terminated before any such programs are used.
** HOW TO IMPLEMENT:*******************************************************
Joystick events are sent as IDCMP_RAWKEY events. The "Code" field of your
IntuiMessage will contain a 0x7F (which is an unused rawkey code, and is
not used by any keyboard). The presence of this value means that a
joystick event has occurred. The status of the joystick is contained in
the "Qualifier" field. The directional values are indicated by the
presence of the following bits:
+--------+----------------------+
| Status | Qualifier bits |
+========+======================+
| Right | IEQUALIFIER_RSHIFT |
| Left | IEQUALIFIER_LSHIFT |
| Down | IEQUALIFIER_RALT |
| Up | IEQUALIFIER_LALT |
+--------+----------------------+
| FIRE | IEQUALIFIER_LBUTTON |
+--------+----------------------+
The absence of all these bits naturally indicates that the joystick is in
the upright position, and the button is not pressed.
Please see the example program "joy_tst.c" that should be included in this
archive.
Additionally, JoyRide opens a public port named "JoyRide" that may be
searched for (via FindPort()) in order to asses whether or not JoyRide is
currently in use.
** CREDITS, COMMENTS, REQUESTS, BUGS, DONATIONS:***************************
Brian Koetting can be reached through:
BIX: bsk
EMAIL: koettingb@yvax.byu.edu
bsk@bix.com
MAIL:
671 East 420 North
Provo, Utah 84606
** HISTORY:****************************************************************
V1.0 First public release
***************************************************************************