554 |
|
p[(base + 0x06) >> 1] = htons(0x0020); |
555 |
|
D(bug(" patch 2 applied\n")); |
556 |
|
} |
557 |
+ |
|
558 |
+ |
} else if (type == FOURCC('C','O','D','E') && id == 27 && size == 25024) { |
559 |
+ |
D(bug("CODE 27 found [Apple Personal Diagnostics]\n")); |
560 |
+ |
|
561 |
+ |
// Don't access FCBs directly in Apple Personal Diagnostics (MacOS 9) |
562 |
+ |
// FIXME: this should not be called in the first place, use UTResolveFCB? |
563 |
+ |
static const uint8 dat[] = {0x2d, 0x78, 0x03, 0x4e, 0xff, 0xf8, 0x20, 0x6e, 0xff, 0xf8}; |
564 |
+ |
base = find_rsrc_data((uint8 *)p, size, dat, sizeof(dat)); |
565 |
+ |
if (base |
566 |
+ |
&& ReadMacInt16(0x3f6) == 4 /* FSFCBLen */ |
567 |
+ |
&& p[(base + 0x1a) >> 1] == htons(0x605e) |
568 |
+ |
&& p[(base + 0x80) >> 1] == htons(0x7000)) |
569 |
+ |
{ |
570 |
+ |
p[(base + 0x1a) >> 1] = htons(0x6064); |
571 |
+ |
D(bug(" patch1 applied\n")); |
572 |
+ |
} |
573 |
|
} |
574 |
|
} |
575 |
|
|