![]() |
Disks & Disk Images |
Sweet16 supports real disks, such as hard disks or floppy disks, and it also supports a concept common in emulation: disk images. A disk image is a file that contains a copy of an entire disk, be it a hard disk or a floppy disk. This image file is then used by the emulator to simulate access to an entire disk.
Disk images are the primary type of disk used in Sweet16 because they're typically faster and easier to use than real disks.
To use a physical disk in Sweet16, you must first keep in mind a few basic rules:
The Golden Orchard CD, for example, can be mounted easily; in fact, you can mount all of its partitions at the same time!
To mount a physical disk into Sweet16, insert it into a drive on your BeOS system (if it's a floppy). If the disk is already mounted, unmount it. If BeOS is configured to automount inserted disks, wait for it to mount, then unmount it. This is done by right-clicking (or Control-clicking) the disk icon on your desktop, then choosing the Unmount option:
Once the disk is inserted but not mounted in BeOS, you can select the Mount Physical Disk option in the File menu in Sweet16. This will produce the "Mount Physical Disks" window, which looks something like this:
This list shows all the disks you can attempt to mount (not including disks BeOS is currently using). In this case, the Golden Orchard CD-ROM is in the drive; note how both ProDOS and HFS partitions are listed.
Once you've selected the devices to mount, click the Mount button to mount them. If mounting is successful, the disk will show up on the emulated IIGS. If not, an alert will tell you what happened.
You can mount disks from any type of device that BeOS supports.
By default, disks are mounted read-only (whether they're write-protected or not). If you want to be able to write to the disk, toggle off the Mount as read-only checkbox.
When you're done picking and mounting disks, just click the close box to put away the window, although you can leave it open if you want to. Click Rescan to scan online disks again to see what's available. This is handy if you've swapped CDs in your CD-ROM drive, or disks in the floppy drive. Sweet16 doesn't automatically repoll your drives, since it would slow down performance, and more importantly, it could miss disks not recognized by BeOS, such as ProDOS volumes.
If you want to mount a 1.4 MB floppy disk, there's a shortcut. Just choose the "Mount Floppy" image from the File menu. This will mount the disk in /dev/disk/floppy/raw. Hold down the control key while selecting this option if you want to mount the disk read-only.
Sweet16 caches floppy disks (up to 1.4 MB). When you mount the disk, a thread is created to gradually read the entire disk into the cache, so that future disk accesses will be faster. This thread keeps running until the entire disk is loaded into the cache, but it pauses automatically whenever you try to read or write from the disk, so that these requests are filled immediately, as fast as possible. The result is reasonably-fast floppy disk access, especially once the cache has been filled.
Additionally, disk writes are also cached (if you enable this feature in the preferences), and a thread is used to write the changes to the disk gradually, over time, in the background. Be sure you don't eject the floppy from the drive until you've told Sweet16 to eject it. Then wait until you hear the ejecting disk sound effect; if you eject the disk from the drive before then, it may be corrupted. During this period, Sweet16 is writing out cached changes to the floppy.
BeOS 5 supports mounting raw disk images so you can use them from BeOS. This is really useful when you're transferring files to and from Sweet16 from BeOS. Here's how it works.
You can use either raw or DiskCopy 6 image files -- they're functionally identical. You can create the file using the dd command on BeOS, or, easier, you can use the Create Disk Image option in the Sweet16 File menu. Be sure to reformat the image using a file system BeOS recognizes (HFS is best).
Once you have the disk image, you can mount it on BeOS by following these directions:
mkdir /boot/tr
mount -t hfs /boot/transfer.raw /boot/tr
At this point, anything you copy into the directory /boot/tr will actually be placed on the mounted disk image, and you can likewise copy files off the disk image, or open them, read them, edit them, and so forth, as if they were a regular disk.
When you're done with the image, be sure to unmount it, using the unmount command. For example:
unmount /boot/tr
This is very important. Don't have the same image mounted on both Sweet16 and BeOS at the same time, or corruption will almost certainly occur. Sweet16 will try very hard not to let you do this, but there are ways to circumvent its protection, so be cautious.
You can delete the mount point directory at this point if you want to. Note that you can mount multiple disk images, but each has to have its own mount point directory.
The Disks option in the Window menu brings up a window that shows a list of all the disks you have mounted, including information about them, whether or not they're currently running, and provides some control over them.
Each disk is shown with a representative icon next to it. The disk activity indicator lights in green on SmartPort and IWM 3.5" disks (both represented by the 3.5" disk icon) when active, and the red lamp on 5.25" disk drives lights when those disks are accessed.
Next to each item in this list is the name of the image file (or physical disk device), and below that is the device number, disk image type, and disk size. You can mount disks by dragging them into this window, and you can eject disks by right-clicking one and choosing Eject from the popup menu that appears.
Disks that are locked, or are read-only, have a lock icon in the lower-right corner of the disk drive image.
Disks with device numbers from 1 to 12 are SmartPort devices. Device numbers 13 and 14 are 3.5" IWM images. Devices 15 and 16 are 5.25" images.
If you need to create a new disk image, choose the Create Disk Image option in the File menu. A BeOS Save filepanel will appear, with two extra menus. The first, Format, lets you choose the disk image format to save in. The second, Size, lets you pick a size for the disk image you want to create.
Choose where you'd like to save the new disk image, the type and size of the image, then type the name of the image file.
Sweet16 uses BeOS MIME types to tag disk image files as to what type of image they are; however, if you'll be sharing your images with users of other emulators, or might transfer the image through a medium that doesn't preserve the file type information (such as via FTP without using the zip tool), you might want to include the appropriate file extension so the file can be identified by other software:
Device | Image Format | File Extension | Image File Size |
---|---|---|---|
3.5" disk | DiskCopy 4.1/4.2 | .dc | 800KB |
DiskCopy 6 | .dc6 | 800KB | |
Hard drive | .hdv | 800KB | |
Raw data | .raw | 800KB | |
Universal Disk Image | .2mg | 800KB |
Device | Image Format | File Extension | Image File Size |
---|---|---|---|
5.25" disk | DSK | .dsk | 140KB |
DOS 3.3 order | .do | 140KB | |
ProDOS order | .po | 140KB |
Device | Image Format | File Extension | Image File Size |
---|---|---|---|
Hard disk | DiskCopy 4.1/4.2 | .dc | any (other than 800KB) |
DiskCopy 6 | .dc6 | any (other than 800 KB) | |
Hard drive | .hdv | any (other than 800KB) | |
Raw data | .raw | any (other than 800KB) | |
Universal Disk Image | .2mg | any (other than 800KB) |
Note: DiskCopy 6 files are identical in format to Raw formatted files, but Sweet16 differentiates just to help avoid confusion on the part of Mac users who might want to mount DiskCopy 6 files on their Mac desktops.
The default image type is Universal Disk Image format, and the default size is 800KB.
Once you've created the disk image, it will automatically mount on the emulated IIGS. Sweet16 has already formatted the image as a ProDOS disk, but you can erase it to another format if you want to using the Erase Disk option in the IIGS Finder.
DiskCopy 4.1/4.2 and DiskCopy 6 images can be mounted on Macintosh computers using Apple's DiskCopy software. However, because BeOS doesn't use the same file type system as the Mac, these files won't automatically be recognized by DiskCopy. You'll have to fix the type and creator codes so DiskCopy will read them.
Image Type | Type Code | Creator Code |
---|---|---|
DiskCopy 4.1/4.2 (.dc) | dImg | ddsk |
DiskCopy 6 (.dc6) | dimg | ddsk |
Since DiskCopy 6 and Raw format files are internally identical, you can interchange the .raw and .dc6 extensions if you want to "convert" a raw image into a DiskCopy 6 image.
Once you have a disk image that you'd like to mount (whether it's one you created yourself using Sweet16 or downloaded from a web site), there are two ways you can mount it:
The disk image will be mounted in an appropriate device on Sweet16, if there are empty devices. If there aren't, an alert will explain this to you.
800KB images are, by default, mounted in one of the two IWM 3.5" devices. You can override this behavior by holding down the option key while mounting them; this causes them to be mounted as SmartPort devices instead. This can be really useful, especially if you're installing System 6.0.1, which is six disk images, or playing a game that's on multiple disks (like Space Ace).
140KB floppy images (.dsk, .do, and .po formats) are always mounted in one of the two IWM 5.25" devices. Everything else is mounted in one of the eight CleverPort devices; these devices emulate the SmartPort protocol for disk accesses. When you do this, you need to also mount the disk on the IIGS, since it doesn't necessarily automatically mount 5.25" floppies. To do this, double-click the .APPLEDISK5.25A or .APPLEDISK5.25B icon in Finder that corresponds to the disk you want to mount.
If you have a 140KB disk image in DiskCopy 6 or raw format, the image will be mounted on the CleverPort. These are different from standard 5.25" drives, but work fine. A new 5.25" drive icon will appear on your desktop. Double-click that to mount the floppy on the IIGS.
Usually you'll have disks that you want to have online when you first launch Sweet16 (such as your boot disk). Sweet16 will automatically mount any disk image files in the Sweet16 directory when you launch Sweet16. Images are mounted into appropriate devices. The first device on the slot your IIGS control panel is configured to boot from will be your boot disk.
Slot 5 will contain your IWM 3.5" disks, Slot 6 contains the IWM 5.25" disks, and Slot 7 contains your CleverPort disks.
Disk images are mounted in alphabetical order. So your boot disk should be listed first in your Sweet16 directory when sorted by name in ascending order in the Tracker.
Sweet16 will resolve links to disk images, so you can organize your disk images in folders and just put links to them into the Sweet16 directory to select your startup disks.