ViewVC Help
View File | Revision Log | Show Annotations | Revision Graph | Root Listing
root/cebix/BasiliskII/src/Unix/sysdeps.h
(Generate patch)

Comparing BasiliskII/src/Unix/sysdeps.h (file contents):
Revision 1.3 by cebix, 1999-10-12T20:00:54Z vs.
Revision 1.12 by cebix, 2000-07-22T18:12:34Z

# Line 1 | Line 1
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
# Line 42 | Line 42
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>
# Line 60 | Line 59
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;
# Line 93 | Line 111 | typedef long int32;
111   #if SIZEOF_LONG == 8
112   typedef unsigned long uint64;
113   typedef long int64;
114 + #define VAL64(a) (a ## l)
115 + #define UVAL64(a) (a ## ul)
116   #elif SIZEOF_LONG_LONG == 8
117   typedef unsigned long long uint64;
118   typedef long long int64;
119 + #define VAL64(a) (a ## LL)
120 + #define UVAL64(a) (a ## uLL)
121   #else
122   #error "No 8 byte type, you lose."
123   #endif
# Line 107 | Line 129 | typedef struct timespec tm_time_t;
129   typedef struct timeval tm_time_t;
130   #endif
131  
132 + /* Offset Mac->Unix time in seconds */
133 + #define TIME_OFFSET 0x7c25b080
134 +
135   /* UAE CPU data types */
136   #define uae_s8 int8
137   #define uae_u8 uint8
# Line 114 | Line 139 | typedef struct timeval tm_time_t;
139   #define uae_u16 uint16
140   #define uae_s32 int32
141   #define uae_u32 uint32
142 + #define uae_s64 int64
143 + #define uae_u64 uint64
144   typedef uae_u32 uaecptr;
145  
146   /* Alignment restrictions */
147 < #if defined(__i386__) || defined(__powerpc__)
147 > #if defined(__i386__) || defined(__powerpc__) || defined(__m68k__)
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  
# Line 207 | Line 238 | static inline void do_put_mem_word(uae_u
238   #define call_mem_put_func(func, addr, v) ((*func)(addr, v))
239   #define __inline__ inline
240   #define CPU_EMU_SIZE 0
210 #undef USE_MAPPED_MEMORY
211 #undef CAN_MAP_MEMORY
241   #undef NO_INLINE_MEMORY_ACCESS
242   #undef MD_HAVE_MEM_1_FUNCS
214 #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

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines