725 |
|
else |
726 |
|
return false; |
727 |
|
|
728 |
+ |
// Check that other ROM addresses point to really free regions |
729 |
+ |
if (ntohl(*(uint32 *)(ROM_BASE + CHECK_LOAD_PATCH_SPACE)) != 0x6b636b63) |
730 |
+ |
return false; |
731 |
+ |
if (ntohl(*(uint32 *)(ROM_BASE + PUT_SCRAP_PATCH_SPACE)) != 0x6b636b63) |
732 |
+ |
return false; |
733 |
+ |
if (ntohl(*(uint32 *)(ROM_BASE + GET_SCRAP_PATCH_SPACE)) != 0x6b636b63) |
734 |
+ |
return false; |
735 |
+ |
if (ntohl(*(uint32 *)(ROM_BASE + ADDR_MAP_PATCH_SPACE)) != 0x6b636b63) |
736 |
+ |
return false; |
737 |
+ |
|
738 |
|
// Apply patches |
739 |
|
if (!patch_nanokernel_boot()) return false; |
740 |
|
if (!patch_68k_emul()) return false; |
1852 |
|
*wp = htons(M68K_RTS); |
1853 |
|
|
1854 |
|
// Don't install Time Manager task for 60Hz interrupt (Enable60HzInts, via 0x2b8) |
1855 |
< |
if (ROMType == ROMTYPE_NEWWORLD) { |
1855 |
> |
if (ROMType == ROMTYPE_NEWWORLD || ROMType == ROMTYPE_GOSSAMER) { |
1856 |
|
static const uint8 tm_task_dat[] = {0x30, 0x3c, 0x4e, 0x2b, 0xa9, 0xc9}; |
1857 |
< |
if ((base = find_rom_data(0x2e0, 0x320, tm_task_dat, sizeof(tm_task_dat))) == 0) return false; |
1857 |
> |
if ((base = find_rom_data(0x2a0, 0x320, tm_task_dat, sizeof(tm_task_dat))) == 0) return false; |
1858 |
|
D(bug("tm_task %08lx\n", base)); |
1859 |
< |
wp = (uint16 *)(ROM_BASE + base + 28); // FIXME: this is not right for all nw ROMs |
1859 |
> |
wp = (uint16 *)(ROM_BASE + base + 28); |
1860 |
|
*wp++ = htons(M68K_NOP); |
1861 |
|
*wp++ = htons(M68K_NOP); |
1862 |
|
*wp++ = htons(M68K_NOP); |
1863 |
|
*wp++ = htons(M68K_NOP); |
1864 |
|
*wp++ = htons(M68K_NOP); |
1865 |
|
*wp = htons(M68K_NOP); |
1856 |
– |
} else if (ROMType == ROMTYPE_GOSSAMER) { |
1857 |
– |
static const uint8 tm_task_dat[] = {0x30, 0x3c, 0x4e, 0x2b, 0xa9, 0xc9}; |
1858 |
– |
if ((base = find_rom_data(0x2a0, 0x2e0, tm_task_dat, sizeof(tm_task_dat))) == 0) return false; |
1859 |
– |
D(bug("tm_task %08lx\n", base)); |
1860 |
– |
wp = (uint16 *)(ROM_BASE + base + 22); |
1861 |
– |
*wp++ = htons(M68K_NOP); |
1862 |
– |
*wp++ = htons(M68K_NOP); |
1863 |
– |
*wp++ = htons(M68K_NOP); |
1866 |
|
} else { |
1867 |
|
static const uint8 tm_task_dat[] = {0x20, 0x3c, 0x73, 0x79, 0x73, 0x61}; |
1868 |
|
if ((base = find_rom_data(0x280, 0x300, tm_task_dat, sizeof(tm_task_dat))) == 0) return false; |
2240 |
|
uint8 pb[SIZEOF_IOParam]; |
2241 |
|
|
2242 |
|
// Install floppy driver |
2243 |
< |
if (ROMType == ROMTYPE_NEWWORLD) { |
2243 |
> |
if (ROMType == ROMTYPE_NEWWORLD || ROMType == ROMTYPE_GOSSAMER) { |
2244 |
|
|
2245 |
< |
// Force installation of floppy driver with NewWorld ROMs |
2245 |
> |
// Force installation of floppy driver with NewWorld and Gossamer ROMs |
2246 |
|
r.a[0] = ROM_BASE + sony_offset; |
2247 |
|
r.d[0] = (uint32)SonyRefNum; |
2248 |
|
Execute68kTrap(0xa43d, &r); // DrvrInstallRsrvMem() |