--- SheepShaver/src/include/cpu_emulation.h 2003/12/04 17:26:38 1.7 +++ SheepShaver/src/include/cpu_emulation.h 2004/01/12 15:37:23 1.10 @@ -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 @@ -90,14 +90,19 @@ static inline void *Mac2Mac_memcpy(uint3 * 680x0 and PPC emulation */ +// 68k procedure helper to write a big endian 16-bit word +#ifdef WORDS_BIGENDIAN +#define PW(W) W +#else +#define PW(X) ((((X) >> 8) & 0xff) | (((X) & 0xff) << 8)) +#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 #if EMULATED_PPC extern void FlushCodeCache(uintptr start, uintptr end); // Invalidate emulator caches -extern void ExecuteNative(int selector); // Execute native code from EMUL_OP routine (real mode switch) -#else -extern void ExecutePPC(void (*func)(void)); // Execute PPC code from EMUL_OP routine (real mode switch) #endif +extern void ExecuteNative(int selector); // Execute native code from EMUL_OP routine (real mode switch) #endif