diff --git a/BasiliskII/src/emul_op.cpp b/BasiliskII/src/emul_op.cpp index b51c0e4a..da55c5ab 100644 --- a/BasiliskII/src/emul_op.cpp +++ b/BasiliskII/src/emul_op.cpp @@ -236,9 +236,11 @@ void EmulOp(uint16 opcode, M68kRegisters *r) // Install PutScrap() patch M68kRegisters r; - r.d[0] = 0xa9fe; - r.a[0] = PutScrapPatch; - Execute68kTrap(0xa647, &r); // SetToolTrap() + if (PutScrapPatch) { + r.d[0] = 0xa9fe; + r.a[0] = PutScrapPatch; + Execute68kTrap(0xa647, &r); // SetToolTrap() + } // Install GetScrap() patch if (GetScrapPatch) { diff --git a/BasiliskII/src/rom_patches.cpp b/BasiliskII/src/rom_patches.cpp index 32528af6..f11b1a1c 100644 --- a/BasiliskII/src/rom_patches.cpp +++ b/BasiliskII/src/rom_patches.cpp @@ -40,7 +40,7 @@ // Global variables uint32 UniversalInfo; // ROM offset of UniversalInfo -uint32 PutScrapPatch; // Mac address of PutScrap() patch +uint32 PutScrapPatch = 0; // Mac address of PutScrap() patch uint32 GetScrapPatch = 0; // Mac address of GetScrap() patch uint32 ROMBreakpoint = 0; // ROM offset of breakpoint (0 = disabled, 0x2310 = CritError) bool PrintROMInfo = false; // Flag: print ROM information in PatchROM()