--- SheepShaver/src/include/cpu_emulation.h 2004/01/10 08:46:57 1.9 +++ SheepShaver/src/include/cpu_emulation.h 2004/05/31 09:04:44 1.12 @@ -1,7 +1,7 @@ /* * cpu_emulation.h - Definitions for CPU emulation and Mac memory access * - * SheepShaver (C) 1997-2002 Christian Bauer and Marc Hellwig + * SheepShaver (C) 1997-2004 Christian Bauer and Marc Hellwig * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by @@ -31,6 +31,8 @@ const uintptr ROM_BASE = 0x40800000; / const uint32 ROM_SIZE = 0x400000; // Size of ROM file const uint32 ROM_AREA_SIZE = 0x500000; // Size of ROM area const uintptr ROM_END = ROM_BASE + ROM_SIZE; // End of ROM +const uintptr DR_EMULATOR_BASE = 0x68070000; // Address of DR emulator code +const uint32 DR_EMULATOR_SIZE = 0x10000; // Size of DR emulator code const uintptr DR_CACHE_BASE = 0x69000000; // Address of DR cache const uint32 DR_CACHE_SIZE = 0x80000; // Size of DR Cache @@ -97,6 +99,15 @@ static inline void *Mac2Mac_memcpy(uint3 #define PW(X) ((((X) >> 8) & 0xff) | (((X) & 0xff) << 8)) #endif +// PowerPC procedure helper to write a big-endian 32-bit word +#ifdef WORDS_BIGENDIAN +#define PL(X) X +#else +#define PL(X) \ + ((((X) & 0xff000000) >> 24) | (((X) & 0x00ff0000) >> 8) | \ + (((X) & 0x0000ff00) << 8) | (((X) & 0x000000ff) << 24)) +#endif + struct M68kRegisters; extern void Execute68k(uint32, M68kRegisters *r); // Execute 68k subroutine from EMUL_OP routine, must be ended with RTS extern void Execute68kTrap(uint16 trap, M68kRegisters *r); // Execute 68k A-Trap from EMUL_OP routine