-
-
Notifications
You must be signed in to change notification settings - Fork 82
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
CD-ROM Emulation doesn't work with stock Apple drivers #1
Comments
FYI https://macintoshgarden.org/apps/cd-sunrise-v22b did not work with rascsi cd emulation |
For the record, the Toast CD Reader driver from https://macintoshgarden.org/apps/astarte-toast-256 does not work either. The extension just fails to load when testing on System 7.1 (Pro and P6) as well as Mac OS 7.6.1, even though a RaSCSI CD drive is attached. |
One observation right now, is that since ResExcellence's hack is the only known (?) solution, and the oldest version of Apple CD-ROM that the hack is proven to work with is 5.4.2, effectively the oldest Mac OS version that can be used right now with RaSCSI CD-ROM is 8.1. |
I've got some good news: After some research and testing today, I am glad to announce that I've found two 3rd party drivers that work well with RaSCSI: RapidCD and CD/DVD Drive TuneUp 2.0.3 My favorite is RapidCD, since it mounts CDs super fast, also can handle the DOS partitions, and is the only one that works on my stock Mac SE. It even works on System 6.0.7, which blew me away! |
@rdmark It would be helpful to have a log on trace level for those cases where software fails to use the emulated devices. |
@uweseimet This is an example when attaching an image and the system not being able to read the disk. Hacked Apple CD ROM 5.3.1, System 7.1.1 on a Mac SE. [2021-08-22 07:07:51.674] [info] Validating: cmd=ATTACH, id=4, unit=0, type=SCCD, filename='/home/pi/images/71.iso', device name='', params='' |
Thanks to Stinkerton18 on Discord, we now have a patched version of the Apple CD-ROM driver that works at least as far back as on System 6.0.7! I've uploaded both to the Garden: https://macintoshgarden.org/apps/apple-cd-rom-extension-patched BTW, I've fallen out of love slightly with RapidCD. While highly compatible, it's a major memory hog. On system 7.1.1 one attached CD drive takes up 680kb, while Apple's driver only uses 110kb per drive. On a memory limited system like a 4MB SE, RapidCD is almost unusable in real life. |
@rdmark Regarding the log above, does it stop (no further logging) after the CmdReadToc command? I would have expected more output. |
@uweseimet Oh no, a loop of similar looking sequences of log messages keep going at a very rapid pace while using a CD device. I can give you a few thousand lines worth if it helps! |
@rdmark :-) Please just some more lines until it is obvious that there is a loop. If I'm not mistaken CmdReadToc is only called once in the log above, i.e. the loop does not seem to have started. |
cd_trace.txt |
Now one can see that a MODE SELECT fails (see logfile excerpt below). Looks as if the CD-ROM software is trying to configure the device but RaSCSI doesn't allow that.
|
@rdmark The current uweseimet_develop branch contains additional debug output, which should reveal which code page MODE SELECT wants to change. Would be great if you provided updated logs whenever you have the time for it. |
@uweseimet Do I need to compile rascsi with debug symbols to get the right level of debug output? |
@rdmark Not anymore. One of my changes was to remove the coupling between compile options and logging. Note that you can also change the log level of an already running rascsi instance, e.g. with "rasctl -g trace". |
@uweseimet trace using b40c6b1 on my Mac SE, System 6.0.7, Apple CD-ROM driver. Up through booting the system off a non-RaSCSI hard drive, the system complaining that the CD file system can't be read, and me hitting the Eject button. |
@rdmark Thank you for providing updated logs. At least from the new logs we know now which mode page the driver tries to use:
When (and if) somebody starts investigating this issue thsi piece of information might be useful. |
There's also an issue with ModeSense6. When the Mac sends the ModeSense6 command, it specifies a size of 0x14 (20 decimal). This graphic shows that RaSCSI doesn't respond to the ModeSense6 for Page 1 request. It transitions to an error status 2. The current RaSCSI code calculates a response of size 24. This is too big, and I don't think RaSCSI is calculating the response size appropriately. The response size should be 20 bytes (as requested by the Mac).... 4 bytes (for the mode sense data header) + 8 bytes (for the block descriptor) + 8 bytes (for the error recovery parameters). @uweseimet - I'm curious about your opinions on the risk associated with this change. |
Another interesting observation - With the Apple CD drive I was using, I didn't ever see a ModeSelect6 (15h) command in the SCSI data capture. I'm going to do some more data captures from some other drives to make sure this wasn't a fluke. My wild theory? If the drivers get the data they expect from the Inquiry and/or ModeSense6 commands, it doesn't need to change anything using the ModeSelect command. |
@akuker Well, there is no risk if your change is compliant with the SCSI specification. If it is not the change will break a lot. In cases like this it is very important to check against the specification. In general, which commands and parameters drivers send can definitely depend on results from previous commands. It's not unusual that drivers fall back to different commands if they find (based on previous responses, typically from INQUIRY, MODE SENSE, or an SCSI error code) that a certain feature is not available.
Of course, all mandatory commands and parameters from the respective standard have to be supported, and each device signals in its INQUIRY data which level of the standard it supported. There are not that many mandatory commands, though. |
It appears you've got the wrong response for page 0x30 comparing it to the one in MAME (which does work with stock AppleCD drivers). See https://github.com/mamedev/mame/blob/badecba0e3aa372b75c738a4c53b2a7f8332064e/src/devices/bus/nscsi/cd.cpp#L427 |
@einstein95 Thanks for the tip! In addition to the MODE SENSE piece here, there seems to be an aspect of masquerading with a particular product string in the MAME solution: mamedev/mame@c58e4b2 |
The "stock" version of Apple's CD-ROM driver for MacOS 8.x (and probably all versions of "classic" Mac OSs) does not recognize the emulated CD-ROM of RaSCSI. At startup, the CD-ROM driver will send an unsupported command that is not supported by RaSCSI.
I believe this check was done to make sure that only CD-ROMs with Apple firmware were used.
There are a couple work-arounds:
The text was updated successfully, but these errors were encountered: