[Coco] Sdc question

Darren A mechacoco at gmail.com
Tue May 26 18:45:59 EDT 2015


On Tue, May 26, 2015 at 2:20 PM, Barry Nelson wrote:

> >> Can anyone help with the issue I have opening the device? Will I have to
> >> talk to the hardware directly?
> >
> > Opening /sd0@ for reading should work.  Tim Lindner's latest version of
> > SDIR uses the following code to open the device:
> >
> > sdcPathName
> >     fcc    ./sd0 at .
> >     fcb    C$CR
> >
> > * open path to driver
> > * uses A, X
> > open_path_to_driver
> >     leax   sdcPathName,pc
> >     lda    READ.+PREAD.     open for reading
> >     os9    I$Open
> >     lbcs   noDriverError    Fail if not opened
> >     sta    pathnumber,u
> >     rts
> >
> > - Darren
>
> That only works if there is a "disk" inserted. If there is no media
> inserted, then that yields an error 246.
>


I'm very much a novice when it comes to OS9, so take everything written
here with a large grain of salt.

If there is no disk inserted in /sd0 then I assume you didn't boot the
system from the SDC or you booted from a "floppy disk" image. In the latter
case I would warn against using any SDC-specific tools since its unsafe to
have both a floppy descriptor and an sdc descriptor referencing the same
hardware.

If you have booted the system from some other device then there is the
question of whether or not the descriptor and driver modules for the SDC
are available and have been loaded as part of the boot process. If the
modules have been loaded and I$Open still fails, then perhaps a call to
I$Attach is needed to make sure the driver has been prepared for use.

- Darren


More information about the Coco mailing list