1 /*****************************************************************************/
5 /* ACE system specific definitions */
9 /* (C) 1998-2001 Ullrich von Bassewitz */
11 /* D-70597 Stuttgart */
12 /* EMail: uz@musoftware.de */
15 /* This software is provided 'as-is', without any expressed or implied */
16 /* warranty. In no event will the authors be held liable for any damages */
17 /* arising from the use of this software. */
19 /* Permission is granted to anyone to use this software for any purpose, */
20 /* including commercial applications, and to alter it and redistribute it */
21 /* freely, subject to the following restrictions: */
23 /* 1. The origin of this software must not be misrepresented; you must not */
24 /* claim that you wrote the original software. If you use this software */
25 /* in a product, an acknowledgment in the product documentation would be */
26 /* appreciated but is not required. */
27 /* 2. Altered source versions must be plainly marked as such, and must not */
28 /* be misrepresented as being the original software. */
29 /* 3. This notice may not be removed or altered from any source */
32 /*****************************************************************************/
41 /* Check for errors */
43 # error This module may only be used when compiling for the ACE os!
55 unsigned long ad_size; /* Size in bytes */
56 unsigned char ad_date [8]; /* YY:YY:MM:DD:HH:MM:SS:TW */
57 char ad_type [4]; /* File type as ASCIIZ string */
58 unsigned char ad_flags; /* File flags */
59 unsigned char ad_usage; /* More flags */
60 unsigned char ad_namelen; /* Length of name */
61 char ad_name [17]; /* Name itself, ASCIIZ */
64 int aceDirOpen (char* dir);
65 int aceDirClose (int handle);
66 int aceDirRead (int handle, struct aceDirentBuf* buf);
68 /* Type of an ACE key. Key in low byte, shift mask in high byte */
69 typedef unsigned int aceKey;
71 /* #defines for the shift mask returned by aceConGetKey */
72 #define aceSH_KEY 0x00FF /* Mask key itself */
73 #define aceSH_MASK 0xFF00 /* Mask shift mask */
74 #define aceSH_EXT 0x2000 /* Extended key */
75 #define aceSH_CAPS 0x1000 /* Caps lock key */
76 #define aceSH_ALT 0x0800 /* Alternate key */
77 #define aceSH_CTRL 0x0400 /* Ctrl key */
78 #define aceSH_CBM 0x0200 /* Commodore key */
79 #define aceSH_SHIFT 0x0100 /* Shift key */
81 /* #defines for the options in aceConSetOpt/aceConGetOpt */
82 #define aceOP_PUTMASK 1 /* Console put mask */
83 #define aceOP_CHARCOLOR 2 /* Character color */
84 #define aceOP_CHARATTR 3 /* Character attribute */
85 #define aceOP_FILLCOLOR 4 /* Fill color */
86 #define aceOP_FILLATTR 5 /* Fill attribute */
87 #define aceOP_CRSCOLOR 6 /* Cursor color */
88 #define aceOP_CRSWRAP 7 /* Force cursor wrap */
89 #define aceOP_SHSCROLL 8 /* Shift keys for scrolling */
90 #define aceOP_MOUSCALE 9 /* Mouse scaling */
91 #define aceOP_RPTDELAY 10 /* Key repeat delay */
92 #define aceOP_RPTRATE 11 /* Key repeat rate */
94 /* Console functions */
95 void aceConWrite (char* buf, size_t count);
96 void aceConPutLit (int c);
97 void aceConPos (unsigned x, unsigned y);
98 void aceConGetPos (unsigned* x, unsigned* y);
99 unsigned aceConGetX (void);
100 unsigned aceConGetY (void);
101 char* aceConInput (char* buf, unsigned initial);
102 int aceConStopKey (void);
103 aceKey aceConGetKey (void);
104 int aceConKeyAvail (aceKey* key);
105 void aceConKeyMat (char* matrix);
106 void aceConSetOpt (unsigned char opt, unsigned char val);
107 int aceConGetOpt (unsigned char opt);
110 int aceMiscIoPeek (unsigned addr);
111 void aceMiscIoPoke (unsigned addr, unsigned char val);