ViewVC Help
View File | Revision Log | Show Annotations | Revision Graph | Root Listing
root/cebix/SheepShaver/src/Unix/main_unix.cpp
(Generate patch)

Comparing SheepShaver/src/Unix/main_unix.cpp (file contents):
Revision 1.16 by gbeauche, 2003-12-04T22:33:24Z vs.
Revision 1.17 by gbeauche, 2003-12-04T23:37:36Z

# Line 672 | Line 672 | int main(int argc, char **argv)
672          WriteMacInt32(XLM_PVR, PVR);                                                                    // Theoretical PVR
673          WriteMacInt32(XLM_BUS_CLOCK, BusClockSpeed);                                    // For DriverServicesLib patch
674          WriteMacInt16(XLM_EXEC_RETURN_OPCODE, M68K_EXEC_RETURN);                // For Execute68k() (RTS from the executed 68k code will jump here and end 68k mode)
675 < #if EMULATED_PPC
676 <        WriteMacInt32(XLM_ETHER_INIT, NativeFunction(NATIVE_ETHER_INIT));
675 > #if !EMULATED_PPC
676 >        WriteMacInt32(XLM_TOC, (uint32)TOC);                                                            // TOC pointer of emulator
677 > #endif
678 >        WriteMacInt32(XLM_ETHER_INIT, NativeFunction(NATIVE_ETHER_INIT));       // DLPI ethernet driver functions
679          WriteMacInt32(XLM_ETHER_TERM, NativeFunction(NATIVE_ETHER_TERM));
680          WriteMacInt32(XLM_ETHER_OPEN, NativeFunction(NATIVE_ETHER_OPEN));
681          WriteMacInt32(XLM_ETHER_CLOSE, NativeFunction(NATIVE_ETHER_CLOSE));
682          WriteMacInt32(XLM_ETHER_WPUT, NativeFunction(NATIVE_ETHER_WPUT));
683          WriteMacInt32(XLM_ETHER_RSRV, NativeFunction(NATIVE_ETHER_RSRV));
684          WriteMacInt32(XLM_VIDEO_DOIO, NativeFunction(NATIVE_VIDEO_DO_DRIVER_IO));
683 #else
684        WriteMacInt32(XLM_TOC, (uint32)TOC);                                                    // TOC pointer of emulator
685        WriteMacInt32(XLM_ETHER_INIT, (uint32)InitStreamModule);                // DLPI ethernet driver functions
686        WriteMacInt32(XLM_ETHER_TERM, (uint32)TerminateStreamModule);
687        WriteMacInt32(XLM_ETHER_OPEN, (uint32)ether_open);
688        WriteMacInt32(XLM_ETHER_CLOSE, (uint32)ether_close);
689        WriteMacInt32(XLM_ETHER_WPUT, (uint32)ether_wput);
690        WriteMacInt32(XLM_ETHER_RSRV, (uint32)ether_rsrv);
691        WriteMacInt32(XLM_VIDEO_DOIO, (uint32)VideoDoDriverIO);
692 #endif
685          D(bug("Low Memory initialized\n"));
686  
687          // Start 60Hz thread
# Line 958 | Line 950 | void Execute68kTrap(uint16 trap, M68kReg
950          uint16 proc[2] = {trap, M68K_RTS};
951          Execute68k((uint32)proc, r);
952   }
961
962
963 /*
964 *  Execute PPC code from EMUL_OP routine (real mode switch)
965 */
966
967 void ExecutePPC(void (*func)())
968 {
969        uint32 tvect[2] = {(uint32)func, 0};    // Fake TVECT
970        SheepRoutineDescriptor desc(0, (uint32)tvect);
971        M68kRegisters r;
972        Execute68k(desc.addr(), &r);
973 }
953   #endif
954  
955  
# Line 1049 | Line 1028 | void MakeExecutable(int dummy, void *sta
1028  
1029   void PatchAfterStartup(void)
1030   {
1052 #if EMULATED_PPC
1031          ExecuteNative(NATIVE_VIDEO_INSTALL_ACCEL);
1054 #else
1055        ExecutePPC(VideoInstallAccel);
1056 #endif
1032          InstallExtFS();
1033   }
1034  
# Line 1394 | Line 1369 | static void sigusr2_handler(int sig, sig
1369                                          if (InterruptFlags & INTFLAG_VIA) {
1370                                                  ClearInterruptFlag(INTFLAG_VIA);
1371                                                  ADBInterrupt();
1372 <                                                ExecutePPC(VideoVBL);
1372 >                                                ExecuteNative(NATIVE_VIDEO_VBL);
1373                                          }
1374                                  }
1375   #endif

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines