[Contents] [Index] [Help] [Retrace] [Browse <] [Browse >]

Command         Operation
-------         ---------
CMD_CLEAR       Clear the gameport input buffer.

gpd_askctype    return the type of gameport controller being used.

gpd_asktrigger  return the conditions that have been preset for triggering.

gpd_readevent   read one or more gameport events.

gpd_setctype    set the type of the controller to be used.

gpd_settrigger  preset the conditions that will trigger a gameport event.


Exec Functions as Used in This Chapter
--------------------------------------
abortio()       abort a command to the gameport device.

checkio()       return the status of an i/o request.

closedevice()   relinquish use of the gameport device.  all requests must
                be complete before closing.

doio()          initiate a command and wait for completion (synchronous
                request).

opendevice()    obtain shared use of one unit of the gameport device. the
                unit number specified is placed in the I/O request
                structure for use by gameport commands.

sendio()        initiate a command and return immediately (asynchronous
                request).

waitio()        wait for the completion of an asynchronous request.  when
                the request is complete the message will be removed from
                reply port.


Exec Support Functions as Used in This Chapter
----------------------------------------------
createextio()   create an extended i/o request structure of type iostdreq.
                This structure will be used to communicate commands to the
                gameport device.

createport()    create a signal message port for reply messages from the
                gameport device.  Exec will signal a task when a message
                arrives at the port.

deleteextio()   delete an i/o request structure created by createextio().

deleteport()    delete the message port created by createport().

   Who Runs The Mouse?
   -------------------
   When the input device or Intution is operating, unit 0 is usually
   dedicated to gathering mouse events.  The input device uses the
   gameport device to read the mouse events.  (For applications that
   take over the machine without starting up the input device or
   Intuition, unit 0 can perform the same functions as unit 1.)  See the
   "input device" chapter for more information on the input device.