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.12 by cebix, 1999-10-31T23:18:33Z vs.
Revision 1.15 by cebix, 2000-07-22T16:07:17Z

# Line 1 | Line 1
1   /*
2   *  rom_patches.cpp - ROM patches
3   *
4 < *  Basilisk II (C) 1997-1999 Christian Bauer
4 > *  Basilisk II (C) 1997-2000 Christian Bauer
5   *
6   *  This program is free software; you can redistribute it and/or modify
7   *  it under the terms of the GNU General Public License as published by
# Line 270 | Line 270 | static void list_universal_infos(void)
270                                  printf("Universal Table at %08x:\n", q);
271                                  printf("Offset\t ID\tHWCfg\tROM85\tModel\n");
272                                  printf("------------------------------------------------\n");
273 <                                while (ofs = ReadMacInt32(ROMBaseMac + q)) {
273 >                                while ((ofs = ReadMacInt32(ROMBaseMac + q))) {
274                                          print_universal_info(ROMBaseMac + ofs + q);
275                                          q += 4;
276                                  }
# Line 693 | Line 693 | static const uint8 adbop_patch[] = {   //
693  
694   void InstallDrivers(uint32 pb)
695   {
696 <        D(bug("InstallDrivers\n"));
696 >        D(bug("InstallDrivers, pb %08x\n", pb));
697          M68kRegisters r;
698  
699          // Install Microseconds() replacement routine
# Line 1215 | Line 1215 | static bool patch_rom_32(void)
1215   #endif
1216  
1217   #if !ROM_IS_WRITE_PROTECTED
1218 < #if defined(AMIGA)
1218 > #if defined(AMIGA) || defined(__NetBSD__)
1219          // Set fake handle at 0x0000 to scratch memory area (so broken Mac programs won't write into Mac ROM)
1220          extern uint32 ScratchMem;
1221          wp = (uint16 *)(ROMBaseHost + 0xccaa);
# Line 1461 | Line 1461 | static bool patch_rom_32(void)
1461          }
1462  
1463          // Patch .EDisk driver (don't scan for EDisks in the area ROMBase..0xe00000)
1464 <        uint32 edisk_offset = find_rom_resource('DRVR', 51);
1464 >        uint32 edisk_offset = find_rom_resource(FOURCC('D','R','V','R'), 51);
1465          if (edisk_offset) {
1466                  static const uint8 edisk_dat[] = {0xd5, 0xfc, 0x00, 0x01, 0x00, 0x00, 0xb5, 0xfc, 0x00, 0xe0, 0x00, 0x00};
1467                  base = find_rom_data(edisk_offset, edisk_offset + 0x10000, edisk_dat, sizeof(edisk_dat));
# Line 1474 | Line 1474 | static bool patch_rom_32(void)
1474          }
1475  
1476          // Replace .Sony driver
1477 <        sony_offset = find_rom_resource('DRVR', 4);
1477 >        sony_offset = find_rom_resource(FOURCC('D','R','V','R'), 4);
1478          D(bug("sony %08lx\n", sony_offset));
1479          memcpy(ROMBaseHost + sony_offset, sony_driver, sizeof(sony_driver));
1480  
# Line 1493 | Line 1493 | static bool patch_rom_32(void)
1493          memcpy(ROMBaseHost + sony_offset + 0xa00, CDROMIcon, sizeof(CDROMIcon));
1494  
1495          // Install SERD patch and serial drivers
1496 <        serd_offset = find_rom_resource('SERD', 0);
1496 >        serd_offset = find_rom_resource(FOURCC('S','E','R','D'), 0);
1497          D(bug("serd %08lx\n", serd_offset));
1498          wp = (uint16 *)(ROMBaseHost + serd_offset + 12);
1499          *wp++ = htons(M68K_EMUL_OP_SERD);
# Line 1570 | Line 1570 | static bool patch_rom_32(void)
1570   #endif
1571  
1572          // Look for double PACK 4 resources
1573 <        if ((base = find_rom_resource('PACK', 4)) == 0) return false;
1574 <        if ((base = find_rom_resource('PACK', 4, true)) == 0 && FPUType == 0)
1573 >        if ((base = find_rom_resource(FOURCC('P','A','C','K'), 4)) == 0) return false;
1574 >        if ((base = find_rom_resource(FOURCC('P','A','C','K'), 4, true)) == 0 && FPUType == 0)
1575                  printf("WARNING: This ROM seems to require an FPU\n");
1576  
1577          // Patch VIA interrupt handler

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines