• Updated 2023-07-12: Hello, Guest! Welcome back, and be sure to check out this follow-up post about our outage a week or so ago.

SCSI2SD V3 hard drive and CD-ROM simultaneously

Phipli

Well-known member
In the original post...
> If I have the CD-ROM emulation enabled, it seems to always win during the boot process for some reason
Yeah, some macs do that. Can be a pain. I think some PPCs do it, we didn't have many 040s in the period and I remember it happening. 630s and 475 were our only 040s - I can't remember which machines do it though.

Sorry, should have noticed. I thought people were complaining about crashes.

Interesting... I guess they added it when CDs became 'a thing'? ...or after Apple introduced their own (external) ones.
Seem likely
 

Arbee

Well-known member
The original AppleCD drive came out in 1987 or 1988. The Apple CD-ROM Explorer disc is 1988, at least.
 

Arbee

Well-known member
I'm wondering, though, if at least some of the (older driver) scenarios where the CD boots first regardless of SCSI ID / Startup Disk settings may actually be by design? IIRC, weren't there some scenarios where a CD came with instructions to 'insert CD and reboot your Mac'? I can think of some situations where this behaviour might be desirable.
I was thinking possibly the 1.7.3 change was to match common PC behavior where a bootable CD-ROM would always override the HDD, which was sometimes useful for OS upgrades. But barring disassembling the drivers it's hard to know for sure.
 

Phipli

Well-known member
I was thinking possibly the 1.7.3 change was to match common PC behavior where a bootable CD-ROM would always override the HDD, which was sometimes useful for OS upgrades. But barring disassembling the drivers it's hard to know for sure.
Wouldn't it be more likely a ROM behaviour?

If it was in the HD driver, the driver would have to be good for it to work, so you couldn't rely on it. Plus youl'd have to load the HD driver, effectively starting the boot process, then abort and switch to the CD?
 

Arbee

Well-known member
Changing the driver on the disk changes the behavior, so it's not directly a ROM thing. That means in the 1.7.3 case the driver is loading and saying "nope" for some reason.
 

Phipli

Well-known member
Changing the driver on the disk changes the behavior, so it's not directly a ROM thing. That means in the 1.7.3 case the driver is loading and saying "nope" for some reason.
That's crazy, not the sort of feature I'd expect to roll out with a driver for another bit of hardware. Guess they must have thought it was important. Perhaps it helped with burn in testing at the factory.
 

joevt

Well-known member
I'm curious, did you look at the first couple of sectors and could you tell what was wrong with them? When I was playing with this recently, it seemed about 50/50 whether a "CD-ROM image" from Macintosh Garden would be a device image with a partition map, or just an HFS volume image.
A third type of image (ignoring compressed images and different versions of Disk Copy) is like a device image but it also includes the CD data so that blocks are 2352 bytes.
Code:
 * Sector Areas, Sector Types
 *
 * Bytes Per Type      CDDA       Mode1      Mode2   Mode2Form1 Mode2Form2
 *       Per Area  +----------+----------+----------+----------+----------+
 * Sync            | 0        | 12       | 12       | 12       | 12       |
 * Header          | 0        | 4        | 4        | 4        | 4        |
 * SubHeader       | 0        | 0        | 0        | 8        | 8        |
 * User            | 2352     | 2048     | 2336     | 2048     | 2328     |
 * Auxiliary       | 0        | 288      | 0        | 280      | 0        |
 * ErrorFlags      | 294      | 294      | 294      | 294      | 294      |
 * SubChannel      | 96       | 96       | 96       | 96       | 96       |
 *                 +----------+----------+----------+----------+----------+
Usually it's Mode1 with these sector areas: 12+4+2048+288 = 2352.

You can get this image type from macOS Disk Utility.app if you image the CD_partition_scheme device (e.g. disk20) instead of the Apple_partition_scheme device (disk20s1).

Code:
diskutil list disk20
/dev/disk20 (internal, physical):
   #:                       TYPE NAME                    SIZE       IDENTIFIER
   0:        CD_partition_scheme                        *752.6 MB   disk20
   1:     Apple_partition_scheme ⁨⁩                        655.4 MB   disk20s1
   2:        Apple_partition_map ⁨⁩                        32.3 KB    disk20s1s1
   3:             Apple_Driver43 ⁨⁩                        28.7 KB    disk20s1s2
   4:          Apple_Driver43_CD ⁨⁩                        71.7 KB    disk20s1s3
   5:         Apple_Driver_ATAPI ⁨⁩                        28.7 KB    disk20s1s5
   6:         Apple_Driver_ATAPI ⁨⁩                        71.7 KB    disk20s1s6
   7:              Apple_Patches ⁨⁩                        262.1 KB   disk20s1s7
   8:                  Apple_HFS ⁨Mac OS X Install Disc 1⁩ 654.6 MB   disk20s1s9

The sync bytes at the start of the CD are 00ff ffff ffff ffff ffff ff00. The APM starts at offset 16 with ER signature.

An HFS image is created if you image disk20s1s9.

To create the 2048 byte block (without CD data), use dd to image the Apple partition scheme data like this:
sudo dd if=/dev/disk20s1 of="Mac OS X Jaguar 10.2 Install Disc 1.dmg" bs=1M

Using bs=1M makes dd more efficient at copying disk data because the default is only 512 bytes (which is still faster than using bs=1 byte).
 

dougg3

Well-known member
That's crazy, not the sort of feature I'd expect to roll out with a driver for another bit of hardware. Guess they must have thought it was important. Perhaps it helped with burn in testing at the factory.

I still think it might just be a mistake that wasn't caught until now because real hard drives take a while to start up. If I set my SCSI2SD to have a power-on delay of 10 seconds, it boots just fine from the hard drive and no longer prefers the CD-ROM drive, even with the Drive Setup 1.7.3 driver installed.

I can't imagine it's intentional behavior. I would be willing to accept that it was an intentional change if the hard drives still mounted properly after it booted from the CD, but the hard drives don't even show up on the desktop...

@dougg3 @Arbee - great testing / sleuthing guys! Really interesting reading and glad @dougg3's made progress!

Thanks! I appreciate your (and everyone else's) advice on this! I'm still kind of puzzled about this, but I think it's starting to make sense. I feel like it might be possible to disassemble the driver to see what changed between the driver installed by Drive Setup 1.5 and Drive Setup 1.7.3, but I'm not sure I have the motivation to bother...
 

dougg3

Well-known member
Just for completeness, I tested with ZuluSCSI tonight. Kind of a pointless test at this point since it's already been confirmed that the problem happens in MAME. No surprises -- ZuluSCSI is also affected by the Drive Setup 1.7.3 issue.

I did find one issue that only seems to affect ZuluSCSI. If I reboot while I'm emulating a CD-ROM drive in my LC 475, I get a Sad Mac with 0000000F, 00000003 when the Mac comes back up, seemingly when it's iterating through the attached drives. Doesn't matter whether I booted from the CD or not. I didn't see this particular behavior with SCSI2SD, but SCSI2SD was also problematic after reboots with CDs in a different way. I might look into this later, but this is another thing that's not really a huge deal. Just thought I'd mention it since we're in the topic of issues involving CD-ROM emulation.
 
Last edited:

CC_333

Well-known member
I vaguely remember reading somewhere years ago that later Apple drivers, particularly those installed by Drive Setup, tended to be buggy and unreliable when installed to disks used on 68k Macs, and that they're optimized primarily for Power PC.

If I'm not inventing all this, could this buggy-ness be a manifestation of that?

To confirm, it might be worth testing to see if it happens on a Power Mac.

c
 

dougg3

Well-known member
To confirm, it might be worth testing to see if it happens on a Power Mac.

I think you may be onto something! I just redid the test in my 6100 with ZuluSCSI.

There was one variable I changed. I used the 08.99 System Recovery 1 ISO, which has Mac OS 8.1. Luckily the 475 also boots from this same CD so I can still do an apples-to-apples comparison. No pun intended.

Anyway, I formatted both emulated hard drives with Drive Setup 1.7.3 and did the full install process of 7.5.3 onto the ZuluSCSI in my 6100. Sure enough, everything works fine across multiple reboots. If I hold C, it boots from the CD. If I don't, it boots from the hard drive. All three drives always appear on the desktop and everything seems completely normal.

Then I put the ZuluSCSI back in my 475. Lo and behold, it booted from the CD and nothing showed up on the desktop. I opened Drive Setup 1.5 and updated the driver on both drives and rebooted. Now it boots from the hard drive and everything shows up just fine. Holding C works to boot from the CD.

@CC_333, it's looking like you're correct. Drive Setup 1.7.3's disk driver works okay on PowerPC machines. Well, the 6100 anyway.

Now I'm tempted to repeat this entire experiment with physical drives, if I have the patience. I haven't recapped any of my CD-ROM drives...

Also on a side note, I think I figured out the 0000000F/00000003 Sad Mac after reboot I was seeing with ZuluSCSI. It seems to have been caused by my (silly in hindsight) choice to emulate a Sony CDU-8001 CD-ROM drive, which is what I was doing on the SCSI2SD. If I just let ZuluSCSI use its default vendor/product strings in Mac mode for the Matshita CR-8004A instead, I don't get the Sad Mac anymore. It fixes that issue on both the 6100 and 475. Actually, the 6100 even gave me grief on the initial boot until I stopped overriding the strings.
 

Arbee

Well-known member
That makes sense. The "What Do I Use?" file on Legacy Recovery is confusing.

Drive Setup 1.5 is supported on computers running System Software 7.1.2 through Mac OS 8.1; Drive Setup 1.7.3 should be used with all computers running System Software 7.5 or later (except the PowerBook 2300 as noted above and the PowerBook 150 as noted below)
I'm not even sure what that's trying to say exactly given the obvious overlap. The Drive Setup release notes indicate 1.5 was released for the Gossamer G3s, and 1.7.3 was for the Blue & White G3, to give some idea how far past 68K Apple was at that point.
 

CC_333

Well-known member
@CC_333, it's looking like you're correct. Drive Setup 1.7.3's disk driver works okay on PowerPC machines.
Excellent! It looks like that vague memory fragment of mine is real then!

Drive Setup 1.5 is supported on computers running System Software 7.1.2 through Mac OS 8.1; Drive Setup 1.7.3 should be used with all computers running System Software 7.5 or later (except the PowerBook 2300 as noted above and the PowerBook 150 as noted below)
The Drive Setup release notes indicate 1.5 was released for the Gossamer G3s, and 1.7.3 was for the Blue & White G3, to give some idea how far past 68K Apple was at that point.
And this explains – quite obliquely and inexactly – one of the main reasons why, at least to me....

Note in particular that the note specifies System Software 7.1.2 – the first PowerPC release. This is a clue that suggests driver 1.7.3 was designed for PPC first and foremost.

It's very ambiguous though, because past that, they never explicitly specify whether "all computers" includes 68k or refers exclusively to PPC, except for the mention of the PowerBook 150 (note, however, that the PB150 is actually an IDE-based system. Another clue, perhaps? Perhaps driver 1.7.3 is buggy on some older SCSI-based machines? It works fine on the 6100, though....)

Nevertheless, based on @dougg3 's experience, there evidently is still 68k support in driver 1.7.3 because it works somewhat, but there's evidently some rot and breakage, particularly in the CD-ROM related code, because Apple likely wasn't testing it on anything pre-PPC by the B&W G3 era.

c
 

Phipli

Well-known member
I can't pull a source but Apple did used to say use Apple HD SC Setup for 68k SCSI disks and use Drive Setup for PPC and IDE Macs.

Drive Setup wouldn't even launch on most 68k macs for its early life and again late on. 1.7.3 won't even open on an 030 will it? Or am I thinking of even newer versions?

I feel like only the very mid era Drive Setups didn't include a "don't use on 68k" warning. I'm honestly surprised your not seeing dialogue boxes on launch. It must be suppressed on Quadras.
 

dougg3

Well-known member
I'm not even sure what that's trying to say exactly given the obvious overlap.

I agree, Apple's instructions on the Legacy CD are confusing about what should be used on what. "Drive Setup 1.7.3 should be used with all computers running System Software 7.5 or later" is just plain incorrect for them to say.

My IIci can't boot from or mount a disk that has that driver at all, CD inserted or not. Not even 1.5's driver works properly on my IIci, which is even worse than what I saw on the 475.

As soon as I opened Apple HD SC Setup on my IIci and clicked the Update button with the hard drive selected, it magically showed up on the desktop and then worked fine for booting too. Although now with the Apple HD SC Setup driver, booting from the Apple Legacy CD seems to hang right around the time it tries to mount the hard drives. Updating back to the Drive Setup 1.5 driver allows me to boot from the CD successfully, but then the hard drives don't show up on the desktop anymore. It's amazing how finicky stuff was back then.

1.7.3 won't even open on an 030 will it? Or am I thinking of even newer versions?

I think you're thinking of newer versions. It runs on my IIci, but yeah, it seems pretty pointless to use it on the IIci if it ends up formatting the disk in a way that it can't even mount. I have a similar memory of Apple HD SC Setup being intended more for 68k stuff and Drive Setup more for PPC stuff. Seems like Apple should have just said that on the legacy CD. I guess the IDE 68k Macs might be the exception there.
 
Top