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

Comparing SheepShaver/src/emul_op.cpp (file contents):
Revision 1.1 by cebix, 2002-02-04T16:58:13Z vs.
Revision 1.4 by gbeauche, 2003-10-26T08:48:48Z

# Line 67 | Line 67 | static uint32 *MakeExecutableTvec;
67  
68   void EmulOp(M68kRegisters *r, uint32 pc, int selector)
69   {
70
70          D(bug("EmulOp %04x at %08x\n", selector, pc));
71          switch (selector) {
72                  case OP_BREAK:                          // Breakpoint
# Line 258 | Line 257 | void EmulOp(M68kRegisters *r, uint32 pc,
257                          // Install drivers
258                          InstallDrivers();
259  
261 #if !EMULATED_PPC
260                          // Patch MakeExecutable()
261                          MakeExecutableTvec = (uint32 *)FindLibSymbol("\023PrivateInterfaceLib", "\016MakeExecutable");
262                          D(bug("MakeExecutable TVECT at %p\n", MakeExecutableTvec));
263 + #if EMULATED_PPC
264 +                        MakeExecutableTvec[0] = htonl(POWERPC_NATIVE_OP_FUNC(NATIVE_MAKE_EXECUTABLE));
265 + #else
266   #ifdef __BEOS__
267                          MakeExecutableTvec[0] = ((uint32 *)MakeExecutable)[0];
268   #else
# Line 271 | Line 272 | void EmulOp(M68kRegisters *r, uint32 pc,
272   #endif
273  
274                          // Patch DebugStr()
275 <                        static const uint16 proc[] = {
276 <                                M68K_EMUL_OP_DEBUG_STR,
277 <                                0x4e74,                 // rtd  #4
278 <                                0x0004
275 >                        static const uint8 proc[] = {
276 >                                M68K_EMUL_OP_DEBUG_STR >> 8, M68K_EMUL_OP_DEBUG_STR & 0xff,
277 >                                0x4e, 0x74,                     // rtd  #4
278 >                                0x00, 0x04
279                          };
280                          WriteMacInt32(0x1dfc, (uint32)proc);
281                          break;
# Line 311 | Line 312 | void EmulOp(M68kRegisters *r, uint32 pc,
312   #if !PRECISE_TIMING
313                                          TimerInterrupt();
314   #endif
315 + #if EMULATED_PPC
316 +                                        ExecuteNative(NATIVE_VIDEO_VBL);
317 + #else
318                                          ExecutePPC(VideoVBL);
319 + #endif
320  
321                                          static int tick_counter = 0;
322                                          if (++tick_counter >= 60) {
# Line 329 | Line 334 | void EmulOp(M68kRegisters *r, uint32 pc,
334                                  }
335                                  if (InterruptFlags & INTFLAG_ETHER) {
336                                          ClearInterruptFlag(INTFLAG_ETHER);
337 + #if EMULATED_PPC
338 +                                        ExecuteNative(NATIVE_ETHER_IRQ);
339 + #else
340                                          ExecutePPC(EtherIRQ);
341 + #endif
342                                  }
343                                  if (InterruptFlags & INTFLAG_TIMER) {
344                                          ClearInterruptFlag(INTFLAG_TIMER);

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines