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

Comparing SheepShaver/src/rsrc_patches.cpp (file contents):
Revision 1.17 by gbeauche, 2006-05-03T21:45:14Z vs.
Revision 1.18 by gbeauche, 2006-05-03T21:53:33Z

# Line 593 | Line 593 | void CheckLoad(uint32 type, const char *
593          // Don't modify resources in ROM
594          if ((uintptr)p >= (uintptr)ROMBaseHost && (uintptr)p <= (uintptr)(ROMBaseHost + ROM_SIZE))
595                  return;
596 +
597 +        if (type == FOURCC('D','R','V','R') && strncmp(&name[1], ".AFPTranslator", name[0]) == 0) {
598 +                D(bug(" DRVR .AFPTranslator found\n"));
599 +                
600 +                // Don't access ROM85 as it it was a pointer to a ROM version number (8.0, 8.1)
601 +                static const uint8 dat[] = {0x3a, 0x2e, 0x00, 0x0a, 0x55, 0x4f, 0x3e, 0xb8, 0x02, 0x8e, 0x30, 0x1f, 0x48, 0xc0, 0x24, 0x40, 0x20, 0x40};
602 +                base = find_rsrc_data(p, size, dat, sizeof(dat));
603 +                if (base) {
604 +                        p16 = (uint16 *)(p + base + 4);
605 +                        *p16++ = htons(0x303c);         // move.l       #ROM85,%d0
606 +                        *p16++ = htons(0x028e);
607 +                        *p16++ = htons(M68K_NOP);
608 +                        *p16++ = htons(M68K_NOP);
609 +                        D(bug("  patch 1 applied\n"));
610 +                }
611 +        }
612   }
613  
614  

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines