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

Comparing BasiliskII/src/rsrc_patches.cpp (file contents):
Revision 1.4 by cebix, 2000-07-22T16:00:33Z vs.
Revision 1.5 by cebix, 2000-07-22T16:07:18Z

# Line 22 | Line 22
22  
23   #include "sysdeps.h"
24   #include "cpu_emulation.h"
25 + #include "macos_util.h"
26   #include "main.h"
27   #include "emul_op.h"
28   #include "audio.h"
# Line 67 | Line 68 | void CheckLoad(uint32 type, int16 id, ui
68   {
69          uint16 *p16;
70          uint32 base;
71 <        D(bug("vCheckLoad %c%c%c%c (%08lx) ID %d, data %08lx, size %ld\n", (char)(type >> 24), (char)((type >> 16) & 0xff), (char )((type >> 8) & 0xff), (char )(type & 0xff), type, id, p, size));
71 >        D(bug("vCheckLoad %c%c%c%c (%08x) ID %d, data %08x, size %d\n", (char)(type >> 24), (char)((type >> 16) & 0xff), (char )((type >> 8) & 0xff), (char )(type & 0xff), type, id, p, size));
72  
73 <        if (type == 'boot' && id == 3) {
73 >        if (type == FOURCC('b','o','o','t') && id == 3) {
74                  D(bug(" boot 3 found\n"));
75  
76                  // Set boot stack pointer (7.5, 7.6, 7.6.1, 8.0)
# Line 104 | Line 105 | void CheckLoad(uint32 type, int16 id, ui
105                          D(bug("  patch 2 applied\n"));
106                  }
107  
108 <        } else if (type == 'boot' && id == 2) {
108 >        } else if (type == FOURCC('b','o','o','t') && id == 2) {
109                  D(bug(" boot 2 found\n"));
110  
111                  // Set fake handle at 0x0000 to some safe place (so broken Mac programs won't write into Mac ROM) (7.5, 8.0)
# Line 129 | Line 130 | void CheckLoad(uint32 type, int16 id, ui
130                  }
131   #endif
132  
133 <        } else if (type == 'PTCH' && id == 630) {
133 >        } else if (type == FOURCC('P','T','C','H') && id == 630) {
134                  D(bug("PTCH 630 found\n"));
135  
136                  // Don't replace Time Manager (Classic ROM, 6.0.3)
# Line 156 | Line 157 | void CheckLoad(uint32 type, int16 id, ui
157                          D(bug("  patch 1 applied\n"));
158                  }
159  
160 <        } else if (type == 'ptch' && id == 26) {
160 >        } else if (type == FOURCC('p','t','c','h') && id == 26) {
161                  D(bug(" ptch 26 found\n"));
162  
163                  // Trap ABC4 is initialized with absolute ROM address (7.5, 7.6, 7.6.1, 8.0)
# Line 170 | Line 171 | void CheckLoad(uint32 type, int16 id, ui
171                          D(bug("  patch 1 applied\n"));
172                  }
173  
174 <        } else if (type == 'ptch' && id == 34) {
174 >        } else if (type == FOURCC('p','t','c','h') && id == 34) {
175                  D(bug(" ptch 34 found\n"));
176  
177                  // Don't wait for VIA (Classic ROM, 6.0.8)
# Line 195 | Line 196 | void CheckLoad(uint32 type, int16 id, ui
196                  }
197  
198   #if !EMULATED_68K
199 <        } else if (CPUIs68060 && (type == 'gpch' && id == 669 || type == 'lpch' && id == 63)) {
199 >        } else if (CPUIs68060 && (type == FOURCC('g','p','c','h') && id == 669 || type == FOURCC('l','p','c','h') && id == 63)) {
200                  D(bug(" gpch 669/lpch 63 found\n"));
201  
202                  static uint16 ThPatchSpace[1024];       // Replacement routines are constructed here
# Line 454 | Line 455 | void CheckLoad(uint32 type, int16 id, ui
455                  }
456   #endif
457  
458 <        } else if (type == 'gpch' && id == 750) {
458 >        } else if (type == FOURCC('g','p','c','h') && id == 750) {
459                  D(bug(" gpch 750 found\n"));
460  
461                  // Don't use PTEST instruction in BlockMove() (7.5, 7.6, 7.6.1, 8.0)
# Line 467 | Line 468 | void CheckLoad(uint32 type, int16 id, ui
468                          D(bug("  patch 1 applied\n"));
469                  }
470  
471 <        } else if (type == 'lpch' && id == 24) {
471 >        } else if (type == FOURCC('l','p','c','h') && id == 24) {
472                  D(bug(" lpch 24 found\n"));
473  
474                  // Don't replace Time Manager (7.0.1, 7.1, 7.5, 7.6, 7.6.1, 8.0)
# Line 484 | Line 485 | void CheckLoad(uint32 type, int16 id, ui
485                          D(bug("  patch 1 applied\n"));
486                  }
487  
488 <        } else if (type == 'lpch' && id == 31) {
488 >        } else if (type == FOURCC('l','p','c','h') && id == 31) {
489                  D(bug(" lpch 31 found\n"));
490  
491                  // Don't write to VIA in vSoundDead() (7.0.1, 7.1, 7.5, 7.6, 7.6.1, 8.0)
# Line 510 | Line 511 | void CheckLoad(uint32 type, int16 id, ui
511                  }
512  
513   #if !EMULATED_68K
514 <        } else if (CPUIs68060 && type == 'scod' && (id == -16463 || id == -16464)) {
514 >        } else if (CPUIs68060 && type == FOURCC('s','c','o','d') && (id == -16463 || id == -16464)) {
515                  D(bug(" scod -16463/-16464 found\n"));
516  
517                  // Correct 68060 FP frame handling in Process Manager task switches (7.1, 7.5, 8.0)
# Line 538 | Line 539 | void CheckLoad(uint32 type, int16 id, ui
539                  }
540   #endif
541  
542 <        } else if (type == 'thng' && id == -16563) {
542 >        } else if (type == FOURCC('t','h','n','g') && id == -16563) {
543                  D(bug(" thng -16563 found\n"));
544  
545                  // Set audio component flags (7.5, 7.6, 7.6.1, 8.0)
546                  *(uint32 *)(p + componentFlags) = htonl(audio_component_flags);
547                  D(bug("  patch 1 applied\n"));
548  
549 <        } else if (type == 'sift' && id == -16563) {
549 >        } else if (type == FOURCC('s','i','f','t') && id == -16563) {
550                  D(bug(" sift -16563 found\n"));
551  
552                  // Replace audio component (7.5, 7.6, 7.6.1, 8.0)
# Line 562 | Line 563 | void CheckLoad(uint32 type, int16 id, ui
563                  FlushCodeCache(p, 32);
564                  D(bug("  patch 1 applied\n"));
565  
566 <        } else if (type == 'inst' && id == -19069) {
566 >        } else if (type == FOURCC('i','n','s','t') && id == -19069) {
567                  D(bug(" inst -19069 found\n"));
568  
569                  // Don't replace Microseconds (QuickTime 2.0)
# Line 575 | Line 576 | void CheckLoad(uint32 type, int16 id, ui
576                          D(bug("  patch 1 applied\n"));
577                  }
578  
579 <        } else if (type == 'DRVR' && id == -20066) {
579 >        } else if (type == FOURCC('D','R','V','R') && id == -20066) {
580                  D(bug("DRVR -20066 found\n"));
581  
582                  // Don't access SCC in .Infra driver
# Line 588 | Line 589 | void CheckLoad(uint32 type, int16 id, ui
589                          D(bug("  patch 1 applied\n"));
590                  }
591  
592 <        } else if (type == 'ltlk' && id == 0) {
592 >        } else if (type == FOURCC('l','t','l','k') && id == 0) {
593                  D(bug(" ltlk 0 found\n"));
594  
595                  // Disable LocalTalk (7.0.1, 7.5, 7.6, 7.6.1, 8.0)

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines