1 |
cebix |
1.1 |
/* |
2 |
|
|
* sysdeps.h - System dependent definitions for AmigaOS |
3 |
|
|
* |
4 |
|
|
* Basilisk II (C) 1997-1999 Christian Bauer |
5 |
|
|
* |
6 |
|
|
* This program is free software; you can redistribute it and/or modify |
7 |
|
|
* it under the terms of the GNU General Public License as published by |
8 |
|
|
* the Free Software Foundation; either version 2 of the License, or |
9 |
|
|
* (at your option) any later version. |
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. See the |
14 |
|
|
* GNU General Public License for more details. |
15 |
|
|
* |
16 |
|
|
* You should have received a copy of the GNU General Public License |
17 |
|
|
* along with this program; if not, write to the Free Software |
18 |
|
|
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA |
19 |
|
|
*/ |
20 |
|
|
|
21 |
|
|
#ifndef SYSDEPS_H |
22 |
|
|
#define SYSDEPS_H |
23 |
|
|
|
24 |
|
|
#include <exec/types.h> |
25 |
|
|
#include <devices/timer.h> |
26 |
|
|
#include <assert.h> |
27 |
|
|
#include <stdio.h> |
28 |
|
|
#include <stdlib.h> |
29 |
|
|
#include <string.h> |
30 |
|
|
|
31 |
cebix |
1.2 |
#include "user_strings_amiga.h" |
32 |
|
|
|
33 |
cebix |
1.1 |
// Are the Mac and the host address space the same? |
34 |
|
|
#define REAL_ADDRESSING 1 |
35 |
|
|
|
36 |
|
|
// Are we using a 68k emulator or the real thing? |
37 |
|
|
#define EMULATED_68K 0 |
38 |
|
|
|
39 |
|
|
// Is the Mac ROM write protected? |
40 |
|
|
#define ROM_IS_WRITE_PROTECTED 0 |
41 |
|
|
|
42 |
cebix |
1.5 |
// ExtFS is supported |
43 |
|
|
#define SUPPORTS_EXTFS 1 |
44 |
|
|
|
45 |
cebix |
1.1 |
// Data types |
46 |
|
|
typedef unsigned char uint8; |
47 |
|
|
typedef signed char int8; |
48 |
|
|
typedef unsigned short uint16; |
49 |
|
|
typedef signed short int16; |
50 |
|
|
typedef unsigned long uint32; |
51 |
|
|
typedef signed long int32; |
52 |
cebix |
1.4 |
|
53 |
|
|
#ifdef __GNUC__ |
54 |
|
|
typedef unsigned long long loff_t; |
55 |
|
|
#endif |
56 |
|
|
|
57 |
|
|
#ifdef __SASC |
58 |
cebix |
1.1 |
typedef char bool; |
59 |
|
|
#define true 1 |
60 |
|
|
#define false 0 |
61 |
|
|
typedef LONG loff_t; |
62 |
cebix |
1.4 |
#endif |
63 |
cebix |
1.1 |
|
64 |
|
|
// Time data type for Time Manager emulation |
65 |
|
|
typedef struct timeval tm_time_t; |
66 |
|
|
|
67 |
cebix |
1.3 |
// Offset Mac->AmigaOS time in seconds |
68 |
|
|
#define TIME_OFFSET 0x8b31ef80 |
69 |
|
|
|
70 |
cebix |
1.1 |
// Endianess conversion (not needed) |
71 |
|
|
#define ntohs(x) (x) |
72 |
|
|
#define ntohl(x) (x) |
73 |
|
|
#define htons(x) (x) |
74 |
|
|
#define htonl(x) (x) |
75 |
cebix |
1.4 |
|
76 |
|
|
// Some systems don't define this |
77 |
|
|
#ifndef AFF_68060 |
78 |
|
|
#define AFF_68060 (1L<<7) |
79 |
|
|
#endif |
80 |
cebix |
1.1 |
|
81 |
|
|
#endif |