4 |
|
* |
5 |
|
* $Id$ |
6 |
|
* |
7 |
< |
* Basilisk II (C) 1997-2001 Christian Bauer |
7 |
> |
* Basilisk II (C) 1997-2005 Christian Bauer |
8 |
|
* |
9 |
|
* This program is free software; you can redistribute it and/or modify |
10 |
|
* it under the terms of the GNU General Public License as published by |
46 |
|
#include <stdlib.h> |
47 |
|
#include <string.h> |
48 |
|
|
49 |
+ |
#ifdef HAVE_PTHREADS |
50 |
+ |
# include <pthread.h> |
51 |
+ |
#endif |
52 |
+ |
|
53 |
|
#ifdef HAVE_FCNTL_H |
54 |
|
# include <fcntl.h> |
55 |
|
#endif |
66 |
|
#endif |
67 |
|
|
68 |
|
|
69 |
+ |
/* Symbol to distinguish Nigel's Aqua port from a normal Darwin X11 build */ |
70 |
+ |
/* (this sysdeps.h file is currently specific to the Mac OS X Aqua port) */ |
71 |
+ |
#define AQUA 1 |
72 |
+ |
|
73 |
+ |
/* Header which defines OS X version for selecting APIs */ |
74 |
|
#ifdef AVAILABILITYMACROS |
75 |
|
# include <AvailabilityMacros.h> |
76 |
|
#endif |
77 |
|
|
69 |
– |
/* Emulator and host address space are distinct */ |
70 |
– |
#ifndef REAL_ADDRESSING |
71 |
– |
# define REAL_ADDRESSING 0 |
72 |
– |
#endif |
78 |
|
|
79 |
< |
/* Linear address translation (i.e. just an offset between Emulator & host) */ |
80 |
< |
#ifndef DIRECT_ADDRESSING |
81 |
< |
# ifdef MAC_OS_X_VERSION_10_2 |
82 |
< |
/* For some reason, compiling on 10.2 with DIRECT_ADDRESSING enabled gives an */ |
83 |
< |
/* app that never writes to its screen! (i.e. it never calls most of video.cpp) */ |
84 |
< |
# define DIRECT_ADDRESSING 0 |
85 |
< |
# else |
86 |
< |
# define DIRECT_ADDRESSING 1 |
87 |
< |
# endif |
79 |
> |
#ifdef ENABLE_NATIVE_M68K |
80 |
> |
|
81 |
> |
/* Mac and host address space are the same */ |
82 |
> |
#define REAL_ADDRESSING 1 |
83 |
> |
|
84 |
> |
/* Using 68k natively */ |
85 |
> |
#define EMULATED_68K 0 |
86 |
> |
|
87 |
> |
/* Mac ROM is not write protected */ |
88 |
> |
#define ROM_IS_WRITE_PROTECTED 0 |
89 |
> |
#define USE_SCRATCHMEM_SUBTERFUGE 1 |
90 |
> |
|
91 |
> |
#else |
92 |
> |
|
93 |
> |
/* Mac and host address space are distinct */ |
94 |
> |
#ifndef REAL_ADDRESSING |
95 |
> |
#define REAL_ADDRESSING 0 |
96 |
|
#endif |
97 |
|
|
98 |
|
/* Using 68k emulator */ |
109 |
|
# define ROM_IS_WRITE_PROTECTED 1 |
110 |
|
#endif |
111 |
|
|
112 |
+ |
#endif |
113 |
+ |
|
114 |
+ |
/* Direct Addressing requires Video on SEGV signals */ |
115 |
+ |
#if DIRECT_ADDRESSING && !ENABLE_VOSF |
116 |
+ |
# undef ENABLE_VOSF |
117 |
+ |
# define ENABLE_VOSF 1 |
118 |
+ |
#endif |
119 |
|
|
120 |
|
/* ExtFS is supported */ |
121 |
|
#define SUPPORTS_EXTFS 1 |
122 |
|
|
123 |
+ |
/* BSD socket API supported */ |
124 |
+ |
#define SUPPORTS_UDP_TUNNEL 1 |
125 |
+ |
|
126 |
|
|
127 |
|
/* Data types */ |
128 |
|
typedef unsigned char uint8; |
169 |
|
#endif |
170 |
|
|
171 |
|
#ifndef HAVE_LOFF_T |
172 |
< |
typedef off_t loff_t; |
172 |
> |
typedef off_t loff_t; |
173 |
> |
#endif |
174 |
> |
#ifndef HAVE_CADDR_T |
175 |
> |
typedef char * caddr_t; |
176 |
|
#endif |
177 |
|
|
178 |
|
/* Time data type for Time Manager emulation */ |
182 |
|
typedef struct timeval tm_time_t; |
183 |
|
#endif |
184 |
|
|
185 |
< |
/* Offset Mac->Unix time in seconds */ |
186 |
< |
#define TIME_OFFSET 0x7c25b080 |
185 |
> |
/* Define codes for all the float formats that we know of. |
186 |
> |
* Though we only handle IEEE format. */ |
187 |
> |
#define UNKNOWN_FLOAT_FORMAT 0 |
188 |
> |
#define IEEE_FLOAT_FORMAT 1 |
189 |
> |
#define VAX_FLOAT_FORMAT 2 |
190 |
> |
#define IBM_FLOAT_FORMAT 3 |
191 |
> |
#define C4X_FLOAT_FORMAT 4 |
192 |
|
|
193 |
|
/* UAE CPU data types */ |
194 |
|
#define uae_s8 int8 |
210 |
|
extern uint64 GetTicks_usec(void); |
211 |
|
extern void Delay_usec(uint32 usec); |
212 |
|
|
213 |
+ |
#ifdef HAVE_PTHREADS |
214 |
+ |
/* Centralized pthread attribute setup */ |
215 |
+ |
void Set_pthread_attr(pthread_attr_t *attr, int priority); |
216 |
+ |
#endif |
217 |
+ |
|
218 |
|
/* UAE CPU defines */ |
219 |
|
#ifdef WORDS_BIGENDIAN |
220 |
|
|
325 |
|
#define ENUMDECL typedef enum |
326 |
|
#define ENUMNAME(name) name |
327 |
|
#define write_log printf |
292 |
– |
#undef USE_MAPPED_MEMORY |
293 |
– |
#undef CAN_MAP_MEMORY |
328 |
|
|
329 |
|
#if defined(X86_ASSEMBLY) || defined(X86_64_ASSEMBLY) |
330 |
|
#define ASM_SYM_FOR_FUNC(a) __asm__(a) |