From fb42e00b8d72ca21208905dbacace14ef4ee48b8 Mon Sep 17 00:00:00 2001 From: gbeauche <> Date: Sat, 5 Mar 2005 15:44:03 +0000 Subject: [PATCH] Don't require an instruction skipper to fake SCSI globals --- SheepShaver/src/rom_patches.cpp | 14 +++++++++----- 1 file changed, 9 insertions(+), 5 deletions(-) diff --git a/SheepShaver/src/rom_patches.cpp b/SheepShaver/src/rom_patches.cpp index f5180fbe..91d79bd3 100644 --- a/SheepShaver/src/rom_patches.cpp +++ b/SheepShaver/src/rom_patches.cpp @@ -2344,6 +2344,15 @@ void InstallDrivers(void) SheepArray pb_var; const uintptr pb = pb_var.addr(); +#if DISABLE_SCSI + // Setup fake SCSI Globals + r.d[0] = 0x1000; + Execute68kTrap(0xa71e, &r); // NewPtrSysClear() + uint32 scsi_globals = r.a[0]; + D(bug("Fake SCSI globals at %08lx\n", scsi_globals)); + WriteMacInt32(0xc0c, scsi_globals); // Set SCSIGlobals +#endif + // Install floppy driver if (ROMType == ROMTYPE_NEWWORLD || ROMType == ROMTYPE_GOSSAMER) { @@ -2358,11 +2367,6 @@ void InstallDrivers(void) WriteMacInt16(dce + dCtlFlags, SonyDriverFlags); } -#if DISABLE_SCSI && HAVE_SIGSEGV_SKIP_INSTRUCTION - // Fake SCSIGlobals - WriteMacInt32(0xc0c, SheepMem::ZeroPage()); -#endif - // Open .Sony driver SheepString sony_str("\005.Sony"); WriteMacInt8(pb + ioPermssn, 0);