--- BasiliskII/src/Unix/sysdeps.h 2000/07/13 13:47:11 1.11 +++ BasiliskII/src/Unix/sysdeps.h 2000/11/30 16:20:52 1.15 @@ -69,18 +69,35 @@ /* Mac ROM is not write protected */ #define ROM_IS_WRITE_PROTECTED 0 +#define USE_SCRATCHMEM_SUBTERFUGE 1 #else /* Mac and host address space are distinct */ +#ifndef REAL_ADDRESSING #define REAL_ADDRESSING 0 +#endif /* Using 68k emulator */ #define EMULATED_68K 1 -/* Mac ROM is write protected */ -#define ROM_IS_WRITE_PROTECTED 1 +/* The m68k emulator uses a prefetch buffer ? */ +#define USE_PREFETCH_BUFFER 0 + +/* Mac ROM is write protected when banked memory is used */ +#if REAL_ADDRESSING || DIRECT_ADDRESSING +# define ROM_IS_WRITE_PROTECTED 0 +# define USE_SCRATCHMEM_SUBTERFUGE 1 +#else +# define ROM_IS_WRITE_PROTECTED 1 +#endif + +#endif +/* Direct Addressing requires Video on SEGV signals */ +#if DIRECT_ADDRESSING && !ENABLE_VOSF +# undef ENABLE_VOSF +# define ENABLE_VOSF 1 #endif /* ExtFS is supported */ @@ -121,6 +138,15 @@ typedef long long int64; #else #error "No 8 byte type, you lose." #endif +#if SIZEOF_VOID_P == 4 +typedef uint32 uintptr; +typedef int32 intptr; +#elif SIZEOF_VOID_P == 8 +typedef uint64 uintptr; +typedef int64 intptr; +#else +#error "Unsupported size of pointer" +#endif /* Time data type for Time Manager emulation */ #ifdef HAVE_CLOCK_GETTIME @@ -148,6 +174,10 @@ typedef uae_u32 uaecptr; # define CPU_CAN_ACCESS_UNALIGNED #endif +/* Timing functions */ +extern uint64 GetTicks_usec(void); +extern void Delay_usec(uint32 usec); + /* UAE CPU defines */ #ifdef WORDS_BIGENDIAN @@ -239,16 +269,8 @@ static inline void do_put_mem_word(uae_u #define ENUMDECL typedef enum #define ENUMNAME(name) name #define write_log printf - -#ifdef USE_COMPILER -#define USE_MAPPED_MEMORY -#define CAN_MAP_MEMORY -#define NO_EXCEPTION_3 -#define NO_PREFETCH_BUFFER -#else #undef USE_MAPPED_MEMORY #undef CAN_MAP_MEMORY -#endif #ifdef X86_ASSEMBLY #define ASM_SYM_FOR_FUNC(a) __asm__(a)