--- BasiliskII/src/cdrom.cpp 2000/07/22 16:07:15 1.7 +++ BasiliskII/src/cdrom.cpp 2000/10/11 17:40:07 1.10 @@ -185,16 +185,12 @@ static void find_hfs_partition(DriveInfo if (Sys_read(info->fh, map, i * 512, 512) != 512) break; - // Skip driver descriptor - uint16 sig = ntohs(((uint16 *)map)[0]); - if (sig == 0x4552) - continue; - - // No partition map? Then look at next block + // Not a partition map block? Then look at next block + uint16 sig = (map[0] << 8) | map[1]; if (sig != 0x504d) continue; - // Partition map found, Apple HFS partition? + // Partition map block found, Apple HFS partition? if (strcmp((char *)(map + 48), "Apple_HFS") == 0) { info->start_byte = ntohl(((uint32 *)map)[2]) << 9; D(bug(" HFS partition found at %d, %d blocks\n", info->start_byte, ntohl(((uint32 *)map)[3]))); @@ -878,7 +874,7 @@ int16 CDROMStatus(uint32 pb, uint32 dce) WriteMacInt32(pb + csParam + 4, FOURCC('c','d','r','m')); break; case FOURCC('i','n','t','f'): // Interface type - WriteMacInt32(pb + csParam + 4, FOURCC('b','a','s','i')); + WriteMacInt32(pb + csParam + 4, EMULATOR_ID_4); break; case FOURCC('s','y','n','c'): // Only synchronous operation? WriteMacInt32(pb + csParam + 4, 0x01000000); @@ -921,6 +917,16 @@ int16 CDROMStatus(uint32 pb, uint32 dce) // Drive-specific codes switch (code) { + case 6: // Return format list + if (ReadMacInt16(pb + csParam) > 0) { + uint32 adr = ReadMacInt32(pb + csParam + 2); + WriteMacInt16(pb + csParam, 1); // 1 format + WriteMacInt32(adr, SysGetFileSize(info->fh) / 512); // Number of blocks + WriteMacInt32(adr + 4, 0); // heads/track/sectors + return noErr; + } else + return paramErr; + case 8: // DriveStatus Mac2Mac_memcpy(pb + csParam, info->status, 22); return noErr;