266 |
|
p[-3] = htons(M68K_NOP); |
267 |
|
p[0] = htons(0x6018); |
268 |
|
D(bug(" patch 2 applied\n")); |
269 |
+ |
} else if (PM(0,0x6660) && PM(1,0x2278) && PM(2,0x0134)) { |
270 |
+ |
// We don't have SonyVars (7.5.3 Revision 2.2) |
271 |
+ |
p[-6] = htons(M68K_NOP); |
272 |
+ |
p[-3] = htons(M68K_NOP); |
273 |
+ |
p[0] = htons(0x6060); |
274 |
+ |
D(bug(" patch 3 applied\n")); |
275 |
|
} else if (PM(0,0x666e) && PM(1,0x2278) && PM(2,0x0134)) { |
276 |
|
// We don't have SonyVars (7.5.5) |
277 |
|
p[-6] = htons(M68K_NOP); |
278 |
|
p[-3] = htons(M68K_NOP); |
279 |
|
p[0] = htons(0x606e); |
280 |
< |
D(bug(" patch 3 applied\n")); |
280 |
> |
D(bug(" patch 4 applied\n")); |
281 |
|
} else if (PM(0,0x6400) && PM(1,0x011c) && PM(2,0x2278) && PM(3,0x0134)) { |
282 |
|
// We don't have SonyVars (7.6.1, 8.0, 8.1, 8.5, 8.6, 9.0) |
283 |
|
p[0] = htons(0x6000); |
284 |
< |
D(bug(" patch 4 applied\n")); |
284 |
> |
D(bug(" patch 5 applied\n")); |
285 |
|
} else if (PM(0,0x6400) && PM(1,0x00e6) && PM(2,0x2278) && PM(3,0x0134)) { |
286 |
|
// We don't have SonyVars (7.6) |
287 |
|
p[0] = htons(0x6000); |
288 |
< |
D(bug(" patch 5 applied\n")); |
288 |
> |
D(bug(" patch 6 applied\n")); |
289 |
|
} |
290 |
|
p++; |
291 |
|
} |
445 |
|
|
446 |
|
} else if (type == FOURCC('n','s','r','d') && id == 1) { |
447 |
|
D(bug("nsrd 1 found\n")); |
448 |
< |
if (p[(0x378 + 0x570) >> 1] == htons(0x7c08) && p[(0x37a + 0x570) >> 1] == htons(0x02a6)) { |
448 |
> |
if (p[(0x378 + 0x460) >> 1] == htons(0x7c08) && p[(0x37a + 0x460) >> 1] == htons(0x02a6)) { |
449 |
> |
// Don't overwrite our serial drivers (7.5.3 Revision 2.2) |
450 |
> |
p[(0x378 + 0x460) >> 1] = htons(0x4e80); // blr |
451 |
> |
p[(0x37a + 0x460) >> 1] = htons(0x0020); |
452 |
> |
D(bug(" patch 1 applied\n")); |
453 |
> |
} else if (p[(0x378 + 0x570) >> 1] == htons(0x7c08) && p[(0x37a + 0x570) >> 1] == htons(0x02a6)) { |
454 |
|
// Don't overwrite our serial drivers (8.0, 8.1) |
455 |
|
p[(0x378 + 0x570) >> 1] = htons(0x4e80); // blr |
456 |
|
p[(0x37a + 0x570) >> 1] = htons(0x0020); |
457 |
< |
D(bug(" patch 1 applied\n")); |
457 |
> |
D(bug(" patch 2 applied\n")); |
458 |
|
} else if (p[(0x378 + 0x6c0) >> 1] == htons(0x7c08) && p[(0x37a + 0x6c0) >> 1] == htons(0x02a6)) { |
459 |
|
// Don't overwrite our serial drivers (8.5, 8.6) |
460 |
|
p[(0x378 + 0x6c0) >> 1] = htons(0x4e80); // blr |
461 |
|
p[(0x37a + 0x6c0) >> 1] = htons(0x0020); |
462 |
< |
D(bug(" patch 2 applied\n")); |
462 |
> |
D(bug(" patch 3 applied\n")); |
463 |
|
} else if (p[(0x374 + 0x510) >> 1] == htons(0x7c08) && p[(0x376 + 0x510) >> 1] == htons(0x02a6)) { |
464 |
|
// Don't overwrite our serial drivers (9.0) |
465 |
|
p[(0x374 + 0x510) >> 1] = htons(0x4e80); // blr |
466 |
|
p[(0x376 + 0x510) >> 1] = htons(0x0020); |
467 |
< |
D(bug(" patch 3 applied\n")); |
467 |
> |
D(bug(" patch 4 applied\n")); |
468 |
|
} |
469 |
|
|
470 |
|
} else if (type == FOURCC('c','i','t','t') && id == 45) { |
579 |
|
p[(base + 0x1a) >> 1] = htons(0x6064); |
580 |
|
D(bug(" patch1 applied\n")); |
581 |
|
} |
582 |
+ |
|
583 |
+ |
} else if (type == FOURCC('i','n','f','n') && (id == 129 || id == 200)) { |
584 |
+ |
D(bug("infn %d found\n", id)); |
585 |
+ |
size >>= 1; |
586 |
+ |
while (size--) { |
587 |
+ |
if (PM(0,0x203c) && PM(1,0xf800) && PM(2,0x0000) && PM(4,0x2040) && PM(5,0x1028) && PM(6,0x0090)) { |
588 |
+ |
// Don't read from 0xf8000090 during MacOS (8.5, 9.0) installation |
589 |
+ |
p[0] = htons(M68K_NOP); |
590 |
+ |
p[1] = htons(M68K_NOP); |
591 |
+ |
p[2] = htons(M68K_NOP); |
592 |
+ |
p[3] = htons(M68K_NOP); |
593 |
+ |
p[4] = htons(M68K_NOP); |
594 |
+ |
p[5] = htons(M68K_NOP); |
595 |
+ |
p[6] = htons(0x7000); // moveq #0,d0 |
596 |
+ |
D(bug(" patch 1 applied\n")); |
597 |
+ |
break; |
598 |
+ |
} |
599 |
+ |
p++; |
600 |
+ |
} |
601 |
+ |
|
602 |
|
} |
603 |
|
} |
604 |
|
|