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.17 by gbeauche, 2000-09-22T17:17:21Z vs.
Revision 1.18 by cebix, 2000-10-09T17:45:58Z

# Line 1240 | Line 1240 | static bool patch_rom_32(void)
1240   #endif
1241  
1242   #if !ROM_IS_WRITE_PROTECTED
1243 < #if defined(AMIGA) || defined(USE_SCRATCHMEM_SUBTERFUGE)
1243 > #if defined(USE_SCRATCHMEM_SUBTERFUGE)
1244          // Set fake handle at 0x0000 to scratch memory area (so broken Mac programs won't write into Mac ROM)
1245          extern uint8 *ScratchMem;
1246          const uint32 ScratchMemBase = Host2MacAddr(ScratchMem);
# Line 1462 | Line 1462 | static bool patch_rom_32(void)
1462          if (ROMSize > 0x80000) {
1463  
1464                  // BlockMove()
1465 <                static const uint8 ptest_dat[] = {0xa0, 0x8d, 0x0c, 0x81, 0x00, 0x00, 0x0c, 0x00, 0x6d, 0x06, 0x4e, 0x71, 0xf4, 0xf8};
1466 <                base = find_rom_data(0x87000, 0x87800, ptest_dat, sizeof(ptest_dat));
1467 <                D(bug("ptest %08lx\n", base));
1465 >                static const uint8 bmove_dat[] = {0x20, 0x5f, 0x22, 0x5f, 0x0c, 0x38, 0x00, 0x04, 0x01, 0x2f};
1466 >                base = find_rom_data(0x87000, 0x87800, bmove_dat, sizeof(bmove_dat));
1467 >                D(bug("block_move %08lx\n", base));
1468                  if (base) {             // ROM15/22/23/26/27/32
1469 <                        wp = (uint16 *)(ROMBaseHost + base + 8);
1470 <                        *wp = htons(M68K_NOP);
1469 >                        wp = (uint16 *)(ROMBaseHost + base + 4);
1470 >                        *wp++ = htons(M68K_EMUL_OP_BLOCK_MOVE);
1471 >                        *wp++ = htons(0x7000);
1472 >                        *wp = htons(M68K_RTS);
1473                  }
1474  
1475                  // SANE
# Line 1599 | Line 1601 | static bool patch_rom_32(void)
1601          *wp++ = htons(base >> 16);
1602          *wp = htons(base & 0xffff);
1603  
1602 #if EMULATED_68K
1603        // Replace BlockMove()
1604        wp = (uint16 *)(ROMBaseHost + find_rom_trap(0xa02e));   // BlockMove()
1605        *wp++ = htons(M68K_EMUL_OP_BLOCK_MOVE);
1606        *wp++ = htons(0x7000);
1607        *wp = htons(M68K_RTS);
1608 #endif
1609
1604          // Look for double PACK 4 resources
1605          if ((base = find_rom_resource(FOURCC('P','A','C','K'), 4)) == 0) return false;
1606          if ((base = find_rom_resource(FOURCC('P','A','C','K'), 4, true)) == 0 && FPUType == 0)

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines