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

Comparing BasiliskII/src/rom_patches.cpp (file contents):
Revision 1.3 by cebix, 1999-10-05T19:10:24Z vs.
Revision 1.6 by cebix, 1999-10-21T22:39:54Z

# Line 30 | Line 30
30   #include "disk.h"
31   #include "cdrom.h"
32   #include "video.h"
33 + #include "extfs.h"
34   #include "prefs.h"
35   #include "rom_patches.h"
36  
# Line 45 | Line 46
46   uint32 UniversalInfo;   // ROM offset of UniversalInfo
47   uint32 PutScrapPatch;   // Mac address of PutScrap() patch
48  
49 < static uint32 sony_offset;              // ROM offset of .Sony driver
50 < static uint32 serd_offset;              // ROM offset of SERD resource (serial drivers)
51 < static uint32 microseconds_offset;      // ROM offset of Microseconds() replacement routine
49 > static uint32 sony_offset;                              // ROM offset of .Sony driver
50 > static uint32 serd_offset;                              // ROM offset of SERD resource (serial drivers)
51 > static uint32 microseconds_offset;              // ROM offset of Microseconds() replacement routine
52   static uint32 memory_dispatch_offset;   // ROM offset of MemoryDispatch() replacement routine
53  
54   // Prototypes
# Line 146 | Line 147 | again:
147  
148   static const uint8 sony_driver[] = {    // Replacement for .Sony driver
149          // Driver header
150 <        SonyDriverFlags >> 8, SonyDriverFlags & 0xff, SonyDriverDelay >> 8, SonyDriverDelay & 0xff, 0x00, 0x00, 0x00, 0x00,
150 >        SonyDriverFlags >> 8, SonyDriverFlags & 0xff, 0, 0, 0, 0, 0, 0,
151          0x00, 0x18,                                                     // Open() offset
152          0x00, 0x1c,                                                     // Prime() offset
153          0x00, 0x20,                                                     // Control() offset
# Line 194 | Line 195 | static const uint8 sony_driver[] = {   //
195  
196   static const uint8 disk_driver[] = {    // Generic disk driver
197          // Driver header
198 <        DiskDriverFlags >> 8, DiskDriverFlags & 0xff, DiskDriverDelay >> 8, DiskDriverDelay & 0xff, 0x00, 0x00, 0x00, 0x00,
198 >        DiskDriverFlags >> 8, DiskDriverFlags & 0xff, 0, 0, 0, 0, 0, 0,
199          0x00, 0x18,                                                     // Open() offset
200          0x00, 0x1c,                                                     // Prime() offset
201          0x00, 0x20,                                                     // Control() offset
# Line 242 | Line 243 | static const uint8 disk_driver[] = {   //
243  
244   static const uint8 cdrom_driver[] = {   // CD-ROM driver
245          // Driver header
246 <        CDROMDriverFlags >> 8, CDROMDriverFlags & 0xff, CDROMDriverDelay >> 8, CDROMDriverDelay & 0xff, 0x00, 0x00, 0x00, 0x00,
246 >        CDROMDriverFlags >> 8, CDROMDriverFlags & 0xff, 0, 0, 0, 0, 0, 0,
247          0x00, 0x1c,                                                     // Open() offset
248          0x00, 0x20,                                                     // Prime() offset
249          0x00, 0x24,                                                     // Control() offset
# Line 555 | Line 556 | void InstallDrivers(uint32 pb)
556          uint32 dce = ReadMacInt32(r.a[0]);
557          WriteMacInt32(dce + dCtlDriver, ROMBaseMac + sony_offset + 0x100);
558          WriteMacInt16(dce + dCtlFlags, DiskDriverFlags);
558        WriteMacInt16(dce + dCtlDelay, DiskDriverDelay);
559  
560          // Open disk driver
561          WriteMacInt32(pb + ioNamePtr, ROMBaseMac + sony_offset + 0x112);
# Line 574 | Line 574 | void InstallDrivers(uint32 pb)
574                  dce = ReadMacInt32(r.a[0]);
575                  WriteMacInt32(dce + dCtlDriver, ROMBaseMac + sony_offset + 0x200);
576                  WriteMacInt16(dce + dCtlFlags, CDROMDriverFlags);
577                WriteMacInt16(dce + dCtlDelay, CDROMDriverDelay);
577  
578                  // Open CD-ROM driver
579                  WriteMacInt32(pb + ioNamePtr, ROMBaseMac + sony_offset + 0x212);
# Line 648 | Line 647 | void PatchAfterStartup(void)
647          r.a[0] = ROMBaseMac + memory_dispatch_offset;
648          r.d[0] = 0xa05c;
649          Execute68kTrap(0xa247, &r);             // SetOSTrapAddress()
650 +
651 + #if SUPPORTS_EXTFS
652 +        // Install external file system
653 +        InstallExtFS();
654 + #endif
655   }
656  
657  
# Line 664 | Line 668 | bool CheckROM(void)
668          // Real addressing mode requires a 32-bit clean ROM
669          return ROMVersion == ROM_VERSION_32;
670   #else
671 <        // Virtual addressing mode works with 32-bit clean Mac II ROMs and Classic ROMs (experimental)
671 >        // Virtual addressing mode works with 32-bit clean Mac II ROMs and Classic ROMs
672          return (ROMVersion == ROM_VERSION_CLASSIC) || (ROMVersion == ROM_VERSION_32);
673   #endif
674   }

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines