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.12 by gbeauche, 2004-11-13T14:09:15Z vs.
Revision 1.16 by gbeauche, 2005-07-02T17:51:43Z

# Line 1 | Line 1
1   /*
2   *  rsrc_patches.cpp - Resource patches
3   *
4 < *  SheepShaver (C) 1997-2004 Christian Bauer and Marc Hellwig
4 > *  SheepShaver (C) 1997-2005 Christian Bauer and Marc Hellwig
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 168 | Line 168 | void CheckLoad(uint32 type, int16 id, ui
168                                          p[5] = htons(0x6010);   // bra
169                                          D(bug(" patch 7 applied\n"));
170                                  }
171 +                        } else if (PM(0,0x2f3c) && PM(1,0x7665) && PM(2,0x7273) && PM(3,0x3f3c) && PM(4,0x0001) && PM(10,0x2041) && PM(11,0x2248) && PM(12,0x2050) && PM(20,0x7066) && PM(21,0xa9c9)) {
172 +                                // Check when vers 1 is installed (for safe abort if MacOS < 8.1 is used with a NewWorld ROM)
173 +                                p[10] = htons(M68K_EMUL_OP_CHECK_SYSV);
174 +                                p[11] = htons(0x4a81);  // tst.l        d1
175 +                                p[12] = htons(0x670e);  // beq.s        <SysError #dsOldSystem>
176 +                                D(bug(" patch 9 applied\n"));
177                          }
178                          p++;
179                  }
# Line 451 | Line 457 | void CheckLoad(uint32 type, int16 id, ui
457                          p[(0x378 + 0x6c0) >> 1] = htons(0x4e80);                // blr
458                          p[(0x37a + 0x6c0) >> 1] = htons(0x0020);
459                          D(bug(" patch 2 applied\n"));
460 +                } else if (p[(0x374 + 0x510) >> 1] == htons(0x7c08) && p[(0x376 + 0x510) >> 1] == htons(0x02a6)) {
461 +                        // Don't overwrite our serial drivers (9.0)
462 +                        p[(0x374 + 0x510) >> 1] = htons(0x4e80);                // blr
463 +                        p[(0x376 + 0x510) >> 1] = htons(0x0020);
464 +                        D(bug(" patch 3 applied\n"));
465                  }
466  
467          } else if (type == FOURCC('c','i','t','t') && id == 45) {
# Line 549 | Line 560 | void CheckLoad(uint32 type, int16 id, ui
560                          p[(base + 0x06) >> 1] = htons(0x0020);
561                          D(bug(" patch 2 applied\n"));
562                  }
563 +
564 +        } else if (type == FOURCC('C','O','D','E') && id == 27 && size == 25024) {
565 +                D(bug("CODE 27 found [Apple Personal Diagnostics]\n"));
566 +
567 +                // Don't access FCBs directly in Apple Personal Diagnostics (MacOS 9)
568 +                // FIXME: this should not be called in the first place, use UTResolveFCB?
569 +                static const uint8 dat[] = {0x2d, 0x78, 0x03, 0x4e, 0xff, 0xf8, 0x20, 0x6e, 0xff, 0xf8};
570 +                base = find_rsrc_data((uint8 *)p, size, dat, sizeof(dat));
571 +                if (base
572 +                        && ReadMacInt16(0x3f6) == 4 /* FSFCBLen */
573 +                        && p[(base + 0x1a) >> 1] == htons(0x605e)
574 +                        && p[(base + 0x80) >> 1] == htons(0x7000))
575 +                {
576 +                        p[(base + 0x1a) >> 1] = htons(0x6064);
577 +                        D(bug(" patch1 applied\n"));
578 +                }
579          }
580   }
581  

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines