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

Comparing SheepShaver/src/rom_patches.cpp (file contents):
Revision 1.4 by gbeauche, 2003-05-17T08:42:34Z vs.
Revision 1.6 by gbeauche, 2003-05-21T19:31:57Z

# Line 2013 | Line 2013 | static bool patch_68k(void)
2013          wp = (uint16 *)(ROM_BASE + base);
2014          if (ROMType == ROMTYPE_ZANZIBAR)
2015                  *wp = htons(M68K_RTS);
2016 <        else
2016 >        else if (ntohs(wp[-4]) == 0x61ff)
2017 >                *wp = htons(M68K_RTS);
2018 >        else if (ntohs(wp[-2]) == 0x6700)
2019                  wp[-2] = htons(0x6000); // bra
2020  
2021          // Patch PowerOff()
# Line 2135 | Line 2137 | void InstallDrivers(void)
2137          M68kRegisters r;
2138          uint8 pb[SIZEOF_IOParam];
2139  
2140 +        // Install floppy driver
2141 +        if (ROMType == ROMTYPE_NEWWORLD) {
2142 +
2143 +                // Force installation of floppy driver with NewWorld ROMs
2144 +                r.a[0] = ROM_BASE + sony_offset;
2145 +                r.d[0] = (uint32)SonyRefNum;
2146 +                Execute68kTrap(0xa43d, &r);             // DrvrInstallRsrvMem()
2147 +                r.a[0] = ReadMacInt32(ReadMacInt32(0x11c) + ~SonyRefNum * 4);   // Get driver handle from Unit Table
2148 +                Execute68kTrap(0xa029, &r);             // HLock()
2149 +                uint32 dce = ReadMacInt32(r.a[0]);
2150 +                WriteMacInt32(dce + dCtlDriver, ROM_BASE + sony_offset);
2151 +                WriteMacInt16(dce + dCtlFlags, SonyDriverFlags);
2152 +        }
2153 +
2154          // Open .Sony driver
2155          WriteMacInt8((uint32)pb + ioPermssn, 0);
2156          WriteMacInt32((uint32)pb + ioNamePtr, (uint32)"\005.Sony");

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines