1 |
|
/* |
2 |
|
* sysdeps.h - System dependent definitions for Unix |
3 |
|
* |
4 |
< |
* Basilisk II (C) 1997-1999 Christian Bauer |
4 |
> |
* Basilisk II (C) 1997-2000 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 |
42 |
|
#include <stdio.h> |
43 |
|
#include <stdlib.h> |
44 |
|
#include <string.h> |
45 |
– |
#include <pthread.h> |
45 |
|
|
46 |
|
#ifdef HAVE_FCNTL_H |
47 |
|
# include <fcntl.h> |
59 |
|
#endif |
60 |
|
|
61 |
|
|
62 |
< |
/* Are the Mac and the host address space the same? */ |
62 |
> |
#ifdef ENABLE_NATIVE_M68K |
63 |
> |
|
64 |
> |
/* Mac and host address space are the same */ |
65 |
> |
#define REAL_ADDRESSING 1 |
66 |
> |
|
67 |
> |
/* Using 68k natively */ |
68 |
> |
#define EMULATED_68K 0 |
69 |
> |
|
70 |
> |
/* Mac ROM is not write protected */ |
71 |
> |
#define ROM_IS_WRITE_PROTECTED 0 |
72 |
> |
|
73 |
> |
#else |
74 |
> |
|
75 |
> |
/* Mac and host address space are distinct */ |
76 |
|
#define REAL_ADDRESSING 0 |
77 |
|
|
78 |
< |
/* Are we using a 68k emulator or the real thing? */ |
78 |
> |
/* Using 68k emulator */ |
79 |
|
#define EMULATED_68K 1 |
80 |
|
|
81 |
< |
/* Is the Mac ROM write protected? */ |
81 |
> |
/* Mac ROM is write protected */ |
82 |
|
#define ROM_IS_WRITE_PROTECTED 1 |
83 |
|
|
84 |
+ |
#endif |
85 |
+ |
|
86 |
|
/* ExtFS is supported */ |
87 |
|
#define SUPPORTS_EXTFS 1 |
88 |
|
|
89 |
+ |
|
90 |
|
/* Data types */ |
91 |
|
typedef unsigned char uint8; |
92 |
|
typedef signed char int8; |
148 |
|
# define CPU_CAN_ACCESS_UNALIGNED |
149 |
|
#endif |
150 |
|
|
151 |
+ |
/* Timing functions */ |
152 |
+ |
extern uint64 GetTicks_usec(void); |
153 |
+ |
extern void Delay_usec(uint32 usec); |
154 |
+ |
|
155 |
|
/* UAE CPU defines */ |
156 |
|
#ifdef WORDS_BIGENDIAN |
157 |
|
|
238 |
|
#define call_mem_put_func(func, addr, v) ((*func)(addr, v)) |
239 |
|
#define __inline__ inline |
240 |
|
#define CPU_EMU_SIZE 0 |
222 |
– |
#undef USE_MAPPED_MEMORY |
223 |
– |
#undef CAN_MAP_MEMORY |
241 |
|
#undef NO_INLINE_MEMORY_ACCESS |
242 |
|
#undef MD_HAVE_MEM_1_FUNCS |
226 |
– |
#undef USE_COMPILER |
243 |
|
#define ENUMDECL typedef enum |
244 |
|
#define ENUMNAME(name) name |
245 |
|
#define write_log printf |
246 |
|
|
247 |
+ |
#ifdef USE_COMPILER |
248 |
+ |
#define USE_MAPPED_MEMORY |
249 |
+ |
#define CAN_MAP_MEMORY |
250 |
+ |
#define NO_EXCEPTION_3 |
251 |
+ |
#define NO_PREFETCH_BUFFER |
252 |
+ |
#else |
253 |
+ |
#undef USE_MAPPED_MEMORY |
254 |
+ |
#undef CAN_MAP_MEMORY |
255 |
+ |
#endif |
256 |
+ |
|
257 |
|
#ifdef X86_ASSEMBLY |
258 |
|
#define ASM_SYM_FOR_FUNC(a) __asm__(a) |
259 |
|
#else |