home *** CD-ROM | disk | FTP | other *** search
/ Fresh Fish 8 / FreshFishVol8-CD2.bin / bbs / dev / oberon-a-1.4ß.lha / Oberon-A / source / amiga / GamePort.mod < prev    next >
Text File  |  1994-08-08  |  2KB  |  84 lines

  1. (***************************************************************************
  2.  
  3.      $RCSfile: GamePort.mod $
  4.   Description: Interface to gameport.device
  5.  
  6.    Created by: fjc (Frank Copeland)
  7.     $Revision: 3.2 $
  8.       $Author: fjc $
  9.         $Date: 1994/08/08 00:46:06 $
  10.  
  11.   $VER: gameport.h 36.1 (5.11.90)
  12.   Includes Release 40.15
  13.  
  14.   (C) Copyright 1985-1993 Commodore-Amiga, Inc.
  15.       All Rights Reserved
  16.  
  17.   Oberon-A interface Copyright © 1994, Frank Copeland.
  18.   This file is part of the Oberon-A Interface.
  19.   See Oberon-A.doc for conditions of use and distribution.
  20.  
  21. ***************************************************************************)
  22.  
  23. MODULE GamePort;
  24.  
  25. (*
  26. ** $C- CaseChk       $I- IndexChk  $L+ LongAdr   $N- NilChk
  27. ** $P- PortableCode  $R- RangeChk  $S- StackChk  $T- TypeChk
  28. ** $V- OvflChk       $Z- ZeroVars
  29. *)
  30.  
  31. IMPORT E := Exec;
  32.  
  33.  
  34. (*
  35. **      GamePort device command definitions
  36. *)
  37.  
  38.  
  39. CONST
  40.  
  41. (******  GamePort commands ******)
  42.   readEvent     * = E.cmdNonstd+0;
  43.   askCType      * = E.cmdNonstd+1;
  44.   setCType      * = E.cmdNonstd+2;
  45.   askTrigger    * = E.cmdNonstd+3;
  46.   setTrigger    * = E.cmdNonstd+4;
  47.  
  48. (******  GamePort structures ******)
  49.  
  50. (* GamePortTrigger.keys *)
  51.   gptDownKeys     * = 0;
  52.   gptUpKeys       * = 1;
  53.  
  54. TYPE
  55.  
  56.   GamePortTriggerPtr * = CPOINTER TO GamePortTrigger;
  57.   GamePortTrigger * = RECORD
  58.     keys *    : E.WSET;       (* key transition triggers *)
  59.     timeout * : E.UWORD;      (* time trigger (vertical blank units) *)
  60.     xDelta *  : E.UWORD;      (* X distance trigger *)
  61.     yDelta *  : E.UWORD;      (* Y distance trigger *)
  62.   END; (* GamePortTrigger *)
  63.  
  64. CONST
  65.  
  66. (****** Controller Types ******)
  67.   ctAllocated    * = -1;    (* allocated by another user *)
  68.   ctNoController * = 0;
  69.  
  70.   ctMouse        * = 1;
  71.   ctRelJoystick  * = 2;
  72.   ctAbsJoystick  * = 3;
  73.  
  74.  
  75. (****** Errors ******)
  76.   errSetCType    * = 1;     (* this controller not valid at this time *)
  77.  
  78.  
  79. CONST
  80.  
  81.   name * = "gameport.device";
  82.  
  83. END GamePort.
  84.