131 |
|
(parcel_type >> 8) & 0xff, parcel_type & 0xff, &parcel_data[6])); |
132 |
|
if (parcel_type == FOURCC('r','o','m',' ')) { |
133 |
|
uint32 lzss_offset = ntohl(parcel_data[2]); |
134 |
< |
uint32 lzss_size = ((uint32)src + parcel_offset) - ((uint32)parcel_data + lzss_offset); |
134 |
> |
uint32 lzss_size = ((uintptr)src + next_offset) - ((uintptr)parcel_data + lzss_offset); |
135 |
|
decode_lzss((uint8 *)parcel_data + lzss_offset, dest, lzss_size); |
136 |
|
} |
137 |
|
parcel_offset = next_offset; |
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; |
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() |