1 |
|
/* |
2 |
|
* rom_patches.cpp - ROM patches |
3 |
|
* |
4 |
< |
* SheepShaver (C) 1997-2002 Christian Bauer and Marc Hellwig |
4 |
> |
* SheepShaver (C) 1997-2004 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 |
319 |
|
size = (size + 3) & -4; |
320 |
|
for (int i = 0; i < size; i += 4) { |
321 |
|
uint32 x = ntohl(*(uint32 *)(ROM_BASE + base + i)); |
322 |
– |
printf("%08x\n", x); |
322 |
|
if (x != 0x6b636b63 && x != 0) |
323 |
|
return false; |
324 |
|
} |
871 |
|
lp[8] = htonl(0x00800002); // TLB total size/TLB assoc |
872 |
|
break; |
873 |
|
// case 11: // X704? |
874 |
< |
case 12: // ??? |
874 |
> |
case 12: // 7400, 7410 |
875 |
> |
case 0x800c: |
876 |
|
lp[0] = htonl(0x1000); // Page size |
877 |
|
lp[1] = htonl(0x8000); // Data cache size |
878 |
|
lp[2] = htonl(0x8000); // Inst cache size |
2228 |
|
lp = (uint32 *)(ROM_BASE + ntohl(*lp)); |
2229 |
|
lp[0xa9fd & 0x3ff] = htonl(GET_SCRAP_PATCH_SPACE); |
2230 |
|
|
2231 |
– |
#if __BEOS__ |
2231 |
|
// Patch SynchIdleTime() |
2232 |
|
if (PrefsFindBool("idlewait")) { |
2233 |
|
wp = (uint16 *)(ROM_BASE + find_rom_trap(0xabf7) + 4); // SynchIdleTime() |
2234 |
|
D(bug("SynchIdleTime at %08lx\n", wp)); |
2235 |
< |
if (ntohs(*wp) == 0x2078) { |
2235 |
> |
if (ntohs(*wp) == 0x2078) { // movea.l ExpandMem,a0 |
2236 |
|
*wp++ = htons(M68K_EMUL_OP_IDLE_TIME); |
2237 |
|
*wp = htons(M68K_NOP); |
2238 |
< |
} else { |
2238 |
> |
} |
2239 |
> |
else if (ntohs(*wp) == 0x70fe) // moveq #-2,d0 |
2240 |
> |
*wp++ = htons(M68K_EMUL_OP_IDLE_TIME_2); |
2241 |
> |
else { |
2242 |
|
D(bug("SynchIdleTime patch not installed\n")); |
2243 |
|
} |
2244 |
|
} |
2243 |
– |
#endif |
2245 |
|
|
2246 |
|
// Construct list of all sifters used by sound components in ROM |
2247 |
|
D(bug("Searching for sound components with type sdev in ROM\n")); |
2306 |
|
WriteMacInt16(dce + dCtlFlags, SonyDriverFlags); |
2307 |
|
} |
2308 |
|
|
2309 |
< |
#if DISABLE_SCSI && 0 |
2309 |
> |
#if DISABLE_SCSI && HAVE_SIGSEGV_SKIP_INSTRUCTION |
2310 |
|
// Fake SCSIGlobals |
2311 |
|
WriteMacInt32(0xc0c, SheepMem::ZeroPage()); |
2312 |
|
#endif |