1 {
2     This file is part of the Free Pascal run time library.
3 
4     A file in Amiga system run time library.
5     Copyright (c) 1998 by Nils Sjoholm
6     member of the Amiga RTL development team.
7 
8     See the file COPYING.FPC, included in this distribution,
9     for details about the copyright.
10 
11     This program is distributed in the hope that it will be useful,
12     but WITHOUT ANY WARRANTY; without even the implied warranty of
13     MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
14 
15  **********************************************************************}
16 
17 unit gameport;
18 
19 INTERFACE
20 
21 uses exec;
22 
23 const
24 
25 {*****   GamePort commands *****}
26 
27     GPD_READEVENT       = CMD_NONSTD + 0;
28     GPD_ASKCTYPE        = CMD_NONSTD + 1;
29     GPD_SETCTYPE        = CMD_NONSTD + 2;
30     GPD_ASKTRIGGER      = CMD_NONSTD + 3;
31     GPD_SETTRIGGER      = CMD_NONSTD + 4;
32 
33 {*****   GamePort structures *****}
34 
35 { gpt_Keys }
36 
37     GPTB_DOWNKEYS       = 0;
38     GPTF_DOWNKEYS       = 1;
39     GPTB_UPKEYS         = 1;
40     GPTF_UPKEYS         = 2;
41 
42 type
43 
44     pGamePortTrigger = ^tGamePortTrigger;
45     tGamePortTrigger = record
46         gpt_Keys        : Word;        { key transition triggers }
47         gpt_Timeout     : Word;        { time trigger (vertical blank units) }
48         gpt_XDelta      : Word;        { X distance trigger }
49         gpt_YDelta      : Word;        { Y distance trigger }
50     end;
51 
52 
53 const
54 
55 {***** Controller Types *****}
56 
57     GPCT_ALLOCATED      = -1;   { allocated by another user }
58     GPCT_NOCONTROLLER   = 0;
59 
60     GPCT_MOUSE          = 1;
61     GPCT_RELJOYSTICK    = 2;
62     GPCT_ABSJOYSTICK    = 3;
63 
64 
65 {***** Errors *****}
66 
67     GPDERR_SETCTYPE     = 1;    { this controller not valid at this time }
68 
69 IMPLEMENTATION
70 
71 end.
72