--- BasiliskII/src/rom_patches.cpp 1999/10/12 20:00:45 1.4 +++ BasiliskII/src/rom_patches.cpp 1999/10/22 15:08:12 1.7 @@ -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 @@ -646,6 +647,11 @@ void PatchAfterStartup(void) r.a[0] = ROMBaseMac + memory_dispatch_offset; r.d[0] = 0xa05c; Execute68kTrap(0xa247, &r); // SetOSTrapAddress() + +#if SUPPORTS_EXTFS + // Install external file system + InstallExtFS(); +#endif } @@ -662,7 +668,7 @@ bool CheckROM(void) // Real addressing mode requires a 32-bit clean ROM return ROMVersion == ROM_VERSION_32; #else - // Virtual addressing mode works with 32-bit clean Mac II ROMs and Classic ROMs (experimental) + // Virtual addressing mode works with 32-bit clean Mac II ROMs and Classic ROMs return (ROMVersion == ROM_VERSION_CLASSIC) || (ROMVersion == ROM_VERSION_32); #endif } @@ -1397,6 +1403,14 @@ static bool patch_rom_32(void) *wp++ = htons(M68K_EMUL_OP_MEMORY_DISPATCH); *wp = htons(M68K_RTS); +#if EMULATED_68K + // Replace BlockMove() + wp = (uint16 *)(ROMBaseHost + find_rom_trap(0xa02e)); // BlockMove() + *wp++ = htons(M68K_EMUL_OP_BLOCK_MOVE); + *wp++ = htons(0x7000); + *wp = htons(M68K_RTS); +#endif + // Patch VIA interrupt handler wp = (uint16 *)(ROMBaseHost + 0x9bc4); // Level 1 handler *wp++ = htons(0x7002); // moveq #2,d0 (always 60Hz interrupt)