73 |
|
#endif |
74 |
|
} |
75 |
|
|
76 |
+ |
// From main_*.cpp |
77 |
+ |
extern uintptr SignalStackBase(); |
78 |
+ |
|
79 |
|
// PowerPC EmulOp to exit from emulation looop |
80 |
|
const uint32 POWERPC_EXEC_RETURN = POWERPC_EMUL_OP | 1; |
81 |
|
|
271 |
|
#endif |
272 |
|
|
273 |
|
// Initialize stack pointer to SheepShaver alternate stack base |
274 |
< |
SheepArray<64> stack_area; |
272 |
< |
gpr(1) = stack_area.addr(); |
274 |
> |
gpr(1) = SignalStackBase() - 64; |
275 |
|
|
276 |
|
// Build trampoline to return from interrupt |
277 |
|
SheepVar32 trampoline = POWERPC_EXEC_RETURN; |
786 |
|
if (InterruptFlags & INTFLAG_VIA) { |
787 |
|
ClearInterruptFlag(INTFLAG_VIA); |
788 |
|
ADBInterrupt(); |
789 |
< |
ExecutePPC(VideoVBL); |
789 |
> |
ExecuteNative(NATIVE_VIDEO_VBL); |
790 |
|
} |
791 |
|
} |
792 |
|
#endif |
910 |
|
} |
911 |
|
|
912 |
|
/* |
911 |
– |
* Execute native subroutine (LR must contain return address) |
912 |
– |
*/ |
913 |
– |
|
914 |
– |
void ExecuteNative(int selector) |
915 |
– |
{ |
916 |
– |
SheepRoutineDescriptor desc(0, NativeTVECT(selector)); |
917 |
– |
M68kRegisters r; |
918 |
– |
Execute68k(desc.addr(), &r); |
919 |
– |
} |
920 |
– |
|
921 |
– |
/* |
913 |
|
* Execute 68k subroutine (must be ended with EXEC_RETURN) |
914 |
|
* This must only be called by the emul_thread when in EMUL_OP mode |
915 |
|
* r->a[7] is unused, the routine runs on the caller's stack |