reptile7's JavaScript blog
Monday, January 12, 2009
The SheepShaver Chronicles, Part 6
Blog Entry #133

Reading CDs in the SheepShaver environment

Data CDs
(For the purposes of this post, a "data CD" is a CD-R, CD-RW, or CD-ROM with a Mac OS Standard (HFS) or Mac OS Extended (HFS+) file system.)

SheepShaver will unproblematically mount a data CD containing a single volume written in a single session - you don't need to do anything special in this case - check out this screen shot from Blog Entry #131, for example.

According to the Disk First Aid utility, data CD volumes that are automatically mounted by SheepShaver interface with the emulated environment via an "external floppy drive" whereas the startup disk is held by an "internal floppy drive", as shown by the following and later screen shots:

Disk First Aid startup and CD disk descriptions in the SheepShaver environment

A data CD with several volumes written in several sessions is another kettle of fish, however; for a multisession CD, SheepShaver's default behavior on my computer is to only mount the volume written in the first session. For example, I have a CD-RW that contains "Tulane", "Tulane Stuff", and "Microsoft Office 98" volumes respectively written in "Session 1", "Session 2", and "Session 3" - only the "Tulane" volume appears on the SheepShaver desktop. How might we get SheepShaver to mount the other volumes?

Leaving the SheepShaverGUI Volumes tab's Unix Root field at its / default setting allows us to use the SheepShaver Unix disk interface to peek at the Unix /Volumes directory; none of the CD's volumes seems to be there:

No CD volumes in the /Volumes directory

Nonetheless, the OS X Terminal utility shows that the "Tulane", "Tulane Stuff", and "Microsoft Office 98" volumes are indeed in the /Volumes directory:

$ ls /Volumes Classic HD Microsoft Office 98 Tulane Stuff Macintosh HD Tulane

You'd think, then, that bringing "Tulane Stuff" and "Microsoft Office 98" into the SheepShaver environment would be a simple matter of adding /Volumes/Tulane Stuff/ and /Volumes/Microsoft Office 98/ to the SheepShaverGUI Volumes menu, right? But it doesn't work that way. For each of these added volumes, the SheepShaver boot pops up the following box:

Another 'this disk is unreadable by this computer' message!

The box's Format control toggles between a ProDOS 0K option and a blank option - helpful, huh? For either Format option, typing in a name and clicking the Initialize button pops up an "Initializing will erase all information on this disk" box; clicking the latter box's Continue button pops up a "Disk initialization failed because the disk is locked!" box.

As you would expect, after I respectively click the "initialization failed" boxes' OK buttons, "Tulane Stuff" and "Microsoft Office 98" are not mounted on the SheepShaver desktop, nor do they show up in the Apple System Profiler's Devices and Volumes tab - this is also the case if I click the Cancel button on each "this disk is unreadable" box. But whether I Initialize or Cancel, Disk First Aid curiously now lists two new "unknown" disks; an attempt to verify them gives a "Problems were found, but Disk First Aid cannot repair them" result for each disk:

Attempted verification of 'unknown' SheepShaver disks

There is a second, non-/Volumes Unix-based way to reference the volumes of a multivolume data CD. Disk Utility reveals via its Get Info command that the "Tulane", "Tulane Stuff", and "Microsoft Office 98" volumes have "disk identifiers" of disk3s1s2, disk3s2s2, and disk3s3s2, respectively; similarly, "Session 1", "Session 2", and "Session 3" have disk identifiers of disk3s1, disk3s2, and disk3s3, respectively; lastly, the CD as a whole has a disk identifier of disk3. These various identifiers all correspond to files in the Unix /dev directory:
$ df
Filesystem     512-blocks     Used Available Capacity  Mounted on
/dev/disk0s2    487725344 88677104 398536240    19%    /
devfs                 225      225         0   100%    /dev
fdesc                   2        2         0   100%    /dev
map -hosts              0        0         0   100%    /net
map auto_home           0        0         0   100%    /home
/dev/disk3s3s2     165312   165312         0   100%    /Volumes/Microsoft Office 98
/dev/disk3s2s2     515352   515352         0   100%    /Volumes/Tulane Stuff
/dev/disk3s1s2      77952    77952         0   100%    /Volumes/Tulane
$ ls /dev/disk3*
/dev/disk3    /dev/disk3s1s1  /dev/disk3s2    /dev/disk3s2s2  /dev/disk3s3s1
/dev/disk3s1  /dev/disk3s1s2  /dev/disk3s2s1  /dev/disk3s3    /dev/disk3s3s2
(As far as I know, there is no up-to-date, comprehensive Unix guide for Leopard users currently available on the Web - I'm sure someone out there is working on one - in the meantime, the OSXFAQ Mac OS X Unix Tutorial page is not a bad place to get your Unix education under way.)

After a bit of trial and error, I can report that "Tulane Stuff" and "Microsoft Office 98" can be brought into the SheepShaver environment by adding the /dev/disk3s2 and /dev/disk3s3 session references, but not the corresponding volume references or CD-as-a-whole reference, to the SheepShaverGUI Volumes menu (it's not necessary to add /dev/disk3s1 because, as noted above, SheepShaver mounts the first-session "Tulane" volume by default); in the emulated environment, all three CD volumes now appear on the desktop, in the Apple System Profiler, and in Disk First Aid:

Disk First Aid multivolume CD disk descriptions in the SheepShaver environment

To my understanding, the /dev/disk3* files themselves correspond to individual partitions of the CD; here's what the Unix diskutil list command says about them:
$ diskutil list disk3
   #:                       TYPE NAME                    SIZE       IDENTIFIER
   0:        CD_partition_scheme                        *753.8 Mi   disk3
   1:        Apple_partition_map                         1024.0 B   disk3s1s1
   2:        Apple_partition_map                         1024.0 B   disk3s3s1
   3:        Apple_partition_map                         1024.0 B   disk3s2s1
   4:     Apple_partition_scheme                         42.1 Mi    disk3s1
   5:                  Apple_HFS Tulane Stuff            251.6 Mi   disk3s2s2
   6:                  Apple_HFS Tulane                  38.1 Mi    disk3s1s2
   7:     Apple_partition_scheme                         46.0 Mi    disk3s2
   8:                  Apple_HFS Microsoft Office 98     80.7 Mi    disk3s3s2
   9:     Apple_partition_scheme                         41.4 Mi    disk3s3
Note that the actionable partitions have an "Apple_partition_scheme" type name.

Audio CDs

As great as iTunes is, I also think that the AppleCD Audio Player is a really cool little program. I spent countless hours listening to audio CDs with the AppleCD Audio Player on my G3 iMac, and naturally I was interested in having a go at playing an audio CD with the AppleCD Audio Player in the SheepShaver environment, even if only for nostalgia's sake. (Forget for a moment the choppy playback of Liquid Audio tracks discussed in the previous post.) The AppleCD Audio Player is part of the Software Restore iMac HD.img package that we installed on the Classic HD disk in Blog Entry #131 - it's sitting right there in the Applications folder - so all we now need is an audio CD to try it out with.

Disappointingly, my attempts to mount audio CDs in the SheepShaver environment have been uniformly unsuccessful. For the discussion below, we'll use as our 'test CD' a CD copy of Jonatha Brooke's 2001 release, Steady Pull (whose opening track, "Linger", was featured in a February 1, 2001 Liquid Audio newsletter - man, it feels like déjà vu all over again...). Unlike a single-session data CD, SheepShaver would not automatically mount the Steady Pull CD. À la the preceding section, here's what else I tried:

(1) Upon adding /Volumes/Steady Pull/ to the SheepShaverGUI Volumes menu, the SheepShaver boot again pops up a "This disk is unreadable by this Computer" box - this time the Format control toggles between Mac OS Standard 3K and ProDOS 3K options - as before, attempted disk initialization pops up "Initializing will erase all information on this disk" and "Disk initialization failed because the disk is locked" boxes. For all initialization choices, when the boot is finished the CD does not appear on the SheepShaver desktop or in the Apple System Profiler; Disk First Aid shows a "(name unknown)" disk whose verification indicates that it has problems that cannot be repaired.

(2) Terminal df execution shows that the CD is assigned to "disk1" in the /dev directory; diskutil list disk1 execution gives:
$ diskutil list disk1
   #:                       TYPE NAME                    SIZE       IDENTIFIER
   0:        CD_partition_scheme Steady Pull            *471.0 Mi   disk1
   1:                      CD_DA                         43.8 Mi    disk1s1
   2:                      CD_DA                         40.8 Mi    disk1s2
   3:                      CD_DA                         48.1 Mi    disk1s3
   4:                      CD_DA                         35.7 Mi    disk1s4
   # etc. 
From their sizes, it is clear that the zeroth partition, disk1, corresponds to the CD as a whole, whereas the other CD_DA partitions (at least diskutil info disk1 execution suggests that they're partitions, but I'm not totally sure) correspond to the individual CD tracks. Adding /dev/disk1 to the SheepShaverGUI Volumes menu gives no new disk on the desktop, in the Apple System Profiler, or in Disk First Aid in the emulated environment; without getting into the details, supplementing the /dev/disk1 reference with the /dev/disk1s* track references does not help the situation.

(3) In the absence of a mounted audio CD, an attempt to launch the AppleCD Audio Player generates the following alert( ):

'The Apple CD-ROM drive is not responding' alert message

I drag out my old Iomega USB ZipCD 650 drive and hook it up to my Intel iMac, whose optical drive is obviously not doing the trick. Without installing any drivers and without a CD in place, the Iomega drive immediately shows up in Disk Utility's "disk, volume, or image" menu; the Burn Support field in the drive's Disk Utility Get Info window reads "Apple Supported", so the drive should qualify as an "Apple CD-ROM drive", yes? I launch SheepShaver and then install Toast 4.1.1 on the Classic HD disk via the Iomega drive's accompanying "Solutions" CD.

Installing Toast - more specifically, installation of the "Toast CD Reader" and "Toast USB Support" extensions in the System Folder's Extensions folder - does not cause the Iomega drive to appear in the Apple System Profiler's Devices and Volumes tab - not a good sign:

No CD drive in the Apple System Profiler

(For comparison, check out this Mac OS 9.1 Apple System Profiler screen shot.)

Ever the optimist, I load the Steady Pull CD into the Iomega drive; the CD is promptly mounted on the OS X desktop. I restart SheepShaver, giving in the emulated environment...nothing: no Steady Pull disc on the desktop, in the Apple System Profiler, or in Disk First Aid.

Even if we could bring Steady Pull as a volume into the SheepShaver environment, however, it's unlikely that SheepShaver would recognize it as belonging to a compact disc, given that SheepShaver apparently sees a single-session data CD as a floppy disk (its icon notwithstanding). Relatedly, in the emulated environment Steady Pull does show up in the via-the-Unix-interface Volumes folder, but as a generic folder containing a set of generic documents:

The Steady Pull folder in the Unix interface's Volumes folder

FWIW: The Steady Pull folder can be dragged onto the Classic HD disk but, even with their .aiff extensions, the Steady Pull files are not recognized by QuickTime Player 4.0.1 and are played as static by RealPlayer 8 Basic. QuickTime Player will play the Steady Pull files if they are brought into the SheepShaver environment via a Disk Utility volume, but I fail to see the point in doing this.

I'm sure that someone with a detailed knowledge of the CD Audio file system, Red Book vs. Orange/Yellow Book CD architecture, and/or Unix could get SheepShaver to recognize an audio CD as an audio CD, but I am not that person.

We'll talk about SheepShaver and floppy disks in the next entry.


I thіnk that what you ѕaid was actually very lοgical.
But, thіnk abοut this, suppoѕе you wrotе a catсhier tіtle?
I am not saying your іnformation isn't good., but what if you added a post title that makes people desire more? I mean "The SheepShaver Chronicles, Part 6" is a little plain. You should look at Yahoo's hοme pagе and watch
hоw thеy create post titlеs tο get
people to open the linκs. You might add a vidеo oг a related pic or two to gгab people excited about everything've got to say. In my opinion, it could make your website a little livelier.

My blog ...
My site bucket trucks
Post a Comment

<< Home

Powered by Blogger

Actually, reptile7's JavaScript blog is powered by Café La Llave. ;-)