240 |
|
r.a[0] = PutScrapPatch; |
241 |
|
Execute68kTrap(0xa647, &r); // SetToolTrap() |
242 |
|
|
243 |
+ |
// Install GetScrap() patch |
244 |
+ |
if (GetScrapPatch) { |
245 |
+ |
r.d[0] = 0xa9fd; |
246 |
+ |
r.a[0] = GetScrapPatch; |
247 |
+ |
Execute68kTrap(0xa647, &r); // SetToolTrap() |
248 |
+ |
} |
249 |
+ |
|
250 |
|
// Setup fake ASC registers |
251 |
|
if (ROMVersion == ROM_VERSION_32) { |
252 |
|
r.d[0] = 0x1000; |
510 |
|
break; |
511 |
|
} |
512 |
|
|
513 |
+ |
case M68K_EMUL_OP_GET_SCRAP: { // GetScrap() patch |
514 |
+ |
void **scrap_handle = (void **)Mac2HostAddr(ReadMacInt32(r->a[7] + 4)); |
515 |
+ |
uint32 type = ReadMacInt32(r->a[7] + 8); |
516 |
+ |
int32 length = ReadMacInt32(r->a[7] + 12); |
517 |
+ |
GetScrap(scrap_handle, type, length); |
518 |
+ |
break; |
519 |
+ |
} |
520 |
+ |
|
521 |
|
case M68K_EMUL_OP_CHECKLOAD: { // vCheckLoad() patch (resource loader) |
522 |
|
uint32 type = r->d[1]; |
523 |
|
int16 id = ReadMacInt16(r->a[2]); |