From a9086a8165cb12d46ec606f271384fe648c19a19 Mon Sep 17 00:00:00 2001 From: asvitkine <> Date: Sat, 28 Jun 2008 18:36:18 +0000 Subject: [PATCH] [patch from Kelvin Delbarre] The CDROM status call "WhoIsThere" (csCode 97) is now implemented. Apart from eliminating "WARNING: Unknown CDROMStatus(97)" complaints from the console log, this does not appear to have had any effects whatsoever. A typo in the implementation of the CDROM status call "GetCDFeatures" has been corrected per Technical Note DV22: http://developer.apple.com/technotes/dv/dv_22.html --- BasiliskII/src/cdrom.cpp | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) diff --git a/BasiliskII/src/cdrom.cpp b/BasiliskII/src/cdrom.cpp index abb4df23..10e9bfe9 100644 --- a/BasiliskII/src/cdrom.cpp +++ b/BasiliskII/src/cdrom.cpp @@ -910,6 +910,17 @@ int16 CDROMStatus(uint32 pb, uint32 dce) } return noErr; } + + case 97: { // WhoIsThere + uint8 drives_present = 0; + drive_vec::iterator info, end = drives.end(); + for (info = drives.begin(); info != end; ++info) { + if (info->num <= 6) + drives_present |= (1 << info->num); + } + WriteMacInt8(pb + csParam + 1, drives_present); + return noErr; + } } // Drive valid? @@ -961,7 +972,7 @@ int16 CDROMStatus(uint32 pb, uint32 dce) case 121: // Get CD features WriteMacInt16(pb + csParam, 0x0200); // 300 KB/s - WriteMacInt16(pb + csParam, 0x0300); // SCSI-2, stereo + WriteMacInt16(pb + csParam + 2, 0x0c00); // SCSI-2, stereo return noErr; default: