--- SheepShaver/src/emul_op.cpp 2003/10/12 05:44:11 1.3 +++ SheepShaver/src/emul_op.cpp 2004/01/10 08:46:56 1.7 @@ -45,6 +45,7 @@ #include "name_registry.h" #include "user_strings.h" #include "emul_op.h" +#include "thunks.h" #define DEBUG 0 #include "debug.h" @@ -260,22 +261,16 @@ void EmulOp(M68kRegisters *r, uint32 pc, // Patch MakeExecutable() MakeExecutableTvec = (uint32 *)FindLibSymbol("\023PrivateInterfaceLib", "\016MakeExecutable"); D(bug("MakeExecutable TVECT at %p\n", MakeExecutableTvec)); -#if EMULATED_PPC - MakeExecutableTvec[0] = POWERPC_NATIVE_OP_FUNC(NATIVE_MAKE_EXECUTABLE); -#else -#ifdef __BEOS__ - MakeExecutableTvec[0] = ((uint32 *)MakeExecutable)[0]; -#else - MakeExecutableTvec[0] = (uint32)MakeExecutable; -#endif + MakeExecutableTvec[0] = htonl(NativeFunction(NATIVE_MAKE_EXECUTABLE)); +#if !EMULATED_PPC MakeExecutableTvec[1] = (uint32)TOC; #endif // Patch DebugStr() - static const uint8 proc[] = { - M68K_EMUL_OP_DEBUG_STR >> 8, M68K_EMUL_OP_DEBUG_STR & 0xff, - 0x4e, 0x74, // rtd #4 - 0x00, 0x04 + static const uint16 proc[] = { + PW(M68K_EMUL_OP_DEBUG_STR), + PW(0x4e74), // rtd #4 + PW(0x0004) }; WriteMacInt32(0x1dfc, (uint32)proc); break; @@ -312,11 +307,7 @@ void EmulOp(M68kRegisters *r, uint32 pc, #if !PRECISE_TIMING TimerInterrupt(); #endif -#if EMULATED_PPC ExecuteNative(NATIVE_VIDEO_VBL); -#else - ExecutePPC(VideoVBL); -#endif static int tick_counter = 0; if (++tick_counter >= 60) { @@ -334,11 +325,7 @@ void EmulOp(M68kRegisters *r, uint32 pc, } if (InterruptFlags & INTFLAG_ETHER) { ClearInterruptFlag(INTFLAG_ETHER); -#if EMULATED_PPC ExecuteNative(NATIVE_ETHER_IRQ); -#else - ExecutePPC(EtherIRQ); -#endif } if (InterruptFlags & INTFLAG_TIMER) { ClearInterruptFlag(INTFLAG_TIMER);