--- BasiliskII/src/rom_patches.cpp 1999/10/05 14:59:44 1.2 +++ BasiliskII/src/rom_patches.cpp 1999/10/19 17:41:18 1.5 @@ -30,6 +30,7 @@ #include "disk.h" #include "cdrom.h" #include "video.h" +#include "extfs.h" #include "prefs.h" #include "rom_patches.h" @@ -45,9 +46,9 @@ uint32 UniversalInfo; // ROM offset of UniversalInfo uint32 PutScrapPatch; // Mac address of PutScrap() patch -static uint32 sony_offset; // ROM offset of .Sony driver -static uint32 serd_offset; // ROM offset of SERD resource (serial drivers) -static uint32 microseconds_offset; // ROM offset of Microseconds() replacement routine +static uint32 sony_offset; // ROM offset of .Sony driver +static uint32 serd_offset; // ROM offset of SERD resource (serial drivers) +static uint32 microseconds_offset; // ROM offset of Microseconds() replacement routine static uint32 memory_dispatch_offset; // ROM offset of MemoryDispatch() replacement routine // Prototypes @@ -146,7 +147,7 @@ again: static const uint8 sony_driver[] = { // Replacement for .Sony driver // Driver header - SonyDriverFlags >> 8, SonyDriverFlags & 0xff, SonyDriverDelay >> 8, SonyDriverDelay & 0xff, 0x00, 0x00, 0x00, 0x00, + SonyDriverFlags >> 8, SonyDriverFlags & 0xff, 0, 0, 0, 0, 0, 0, 0x00, 0x18, // Open() offset 0x00, 0x1c, // Prime() offset 0x00, 0x20, // Control() offset @@ -194,7 +195,7 @@ static const uint8 sony_driver[] = { // static const uint8 disk_driver[] = { // Generic disk driver // Driver header - DiskDriverFlags >> 8, DiskDriverFlags & 0xff, DiskDriverDelay >> 8, DiskDriverDelay & 0xff, 0x00, 0x00, 0x00, 0x00, + DiskDriverFlags >> 8, DiskDriverFlags & 0xff, 0, 0, 0, 0, 0, 0, 0x00, 0x18, // Open() offset 0x00, 0x1c, // Prime() offset 0x00, 0x20, // Control() offset @@ -242,7 +243,7 @@ static const uint8 disk_driver[] = { // static const uint8 cdrom_driver[] = { // CD-ROM driver // Driver header - CDROMDriverFlags >> 8, CDROMDriverFlags & 0xff, CDROMDriverDelay >> 8, CDROMDriverDelay & 0xff, 0x00, 0x00, 0x00, 0x00, + CDROMDriverFlags >> 8, CDROMDriverFlags & 0xff, 0, 0, 0, 0, 0, 0, 0x00, 0x1c, // Open() offset 0x00, 0x20, // Prime() offset 0x00, 0x24, // Control() offset @@ -555,7 +556,6 @@ void InstallDrivers(uint32 pb) uint32 dce = ReadMacInt32(r.a[0]); WriteMacInt32(dce + dCtlDriver, ROMBaseMac + sony_offset + 0x100); WriteMacInt16(dce + dCtlFlags, DiskDriverFlags); - WriteMacInt16(dce + dCtlDelay, DiskDriverDelay); // Open disk driver WriteMacInt32(pb + ioNamePtr, ROMBaseMac + sony_offset + 0x112); @@ -574,7 +574,6 @@ void InstallDrivers(uint32 pb) dce = ReadMacInt32(r.a[0]); WriteMacInt32(dce + dCtlDriver, ROMBaseMac + sony_offset + 0x200); WriteMacInt16(dce + dCtlFlags, CDROMDriverFlags); - WriteMacInt16(dce + dCtlDelay, CDROMDriverDelay); // Open CD-ROM driver WriteMacInt32(pb + ioNamePtr, ROMBaseMac + sony_offset + 0x212); @@ -648,6 +647,9 @@ void PatchAfterStartup(void) r.a[0] = ROMBaseMac + memory_dispatch_offset; r.d[0] = 0xa05c; Execute68kTrap(0xa247, &r); // SetOSTrapAddress() + + // Install external file system + InstallExtFS(); } @@ -837,6 +839,7 @@ static bool patch_rom_classic(void) // ROM patches for 32-bit clean Mac-II ROMs (version $067c) static bool patch_rom_32(void) { + uint32 *lp; uint16 *wp; uint8 *bp; uint32 base;