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.10 by gbeauche, 2004-05-31T09:04:42Z vs.
Revision 1.15 by gbeauche, 2004-11-13T14:09:15Z

# Line 59 | Line 59
59  
60  
61   // TVector of MakeExecutable
62 < static uint32 *MakeExecutableTvec;
62 > static uint32 MakeExecutableTvec;
63  
64  
65   /*
# Line 259 | Line 259 | void EmulOp(M68kRegisters *r, uint32 pc,
259                          InstallDrivers();
260  
261                          // Patch MakeExecutable()
262 <                        MakeExecutableTvec = (uint32 *)FindLibSymbol("\023PrivateInterfaceLib", "\016MakeExecutable");
263 <                        D(bug("MakeExecutable TVECT at %p\n", MakeExecutableTvec));
264 <                        MakeExecutableTvec[0] = htonl(NativeFunction(NATIVE_MAKE_EXECUTABLE));
262 >                        MakeExecutableTvec = (uint32)FindLibSymbol("\023PrivateInterfaceLib", "\016MakeExecutable");
263 >                        D(bug("MakeExecutable TVECT at %08x\n", MakeExecutableTvec));
264 >                        WriteMacInt32(MakeExecutableTvec, NativeFunction(NATIVE_MAKE_EXECUTABLE));
265   #if !EMULATED_PPC
266 <                        MakeExecutableTvec[1] = (uint32)TOC;
266 >                        WriteMacInt32(MakeExecutableTvec + 4, (uint32)TOC);
267   #endif
268  
269                          // Patch DebugStr()
# Line 272 | Line 272 | void EmulOp(M68kRegisters *r, uint32 pc,
272                                  PW(0x4e74),                     // rtd  #4
273                                  PW(0x0004)
274                          };
275 <                        WriteMacInt32(0x1dfc, (uint32)proc);
275 >                        WriteMacInt32(0x1dfc, Host2MacAddr((uint8 *)proc));
276                          break;
277                  }
278  
# Line 288 | Line 288 | void EmulOp(M68kRegisters *r, uint32 pc,
288                          MacOSUtilReset();
289                          AudioReset();
290  
291 <                        // Enable DR emulator from NewWorld ROMs
292 <                        if (ROMType == ROMTYPE_NEWWORLD) {
291 >                        // Enable DR emulator
292 >                        if (PrefsFindBool("jit68k")) {
293                                  D(bug("DR activated\n"));
294                                  WriteMacInt32(KernelDataAddr + 0x17a0, 3);              // Prepare for DR emulator activation
295                                  WriteMacInt32(KernelDataAddr + 0x17c0, DR_CACHE_BASE);
# Line 297 | Line 297 | void EmulOp(M68kRegisters *r, uint32 pc,
297                                  WriteMacInt32(KernelDataAddr + 0x1b04, DR_CACHE_BASE);
298                                  WriteMacInt32(KernelDataAddr + 0x1b00, DR_EMULATOR_BASE);
299                                  memcpy((void *)DR_EMULATOR_BASE, (void *)(ROM_BASE + 0x370000), DR_EMULATOR_SIZE);
300 <                                MakeExecutable(0, (void *)DR_EMULATOR_BASE, DR_EMULATOR_SIZE);
300 >                                MakeExecutable(0, DR_EMULATOR_BASE, DR_EMULATOR_SIZE);
301                          }
302                          break;
303  
# Line 433 | Line 433 | void EmulOp(M68kRegisters *r, uint32 pc,
433                          D(bug("%d %d\n", ReadMacInt16(r->a[2]), ReadMacInt16(r->a[2] + 6)));
434                          if (ReadMacInt16(r->a[2]) == 11 && ReadMacInt16(r->a[2] + 6) == 17)
435                                  PatchNativeResourceManager();
436 +                        break;
437 +
438 +                case OP_NTRB_17_PATCH4:
439 +                        r->d[0] = ReadMacInt16(r->a[7]);
440 +                        r->a[7] += 2;
441 +                        D(bug("%d %d\n", ReadMacInt16(r->a[2]), ReadMacInt16(r->a[2] + 6)));
442 +                        if (ReadMacInt16(r->a[2]) == 11 && ReadMacInt16(r->a[2] + 6) == 17)
443 +                                PatchNativeResourceManager();
444                          break;
445  
446                  case OP_CHECKLOAD: {            // vCheckLoad() patch

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines