[Date Prev][Date Next][Thread Prev][Thread Next] [Search] [Date Index] [Thread Index]

Re: [MacPerl] Looking for Low level non-HFS XCMD/XFCN's




On Mon, 2 Dec 1996, Danny Thomas wrote:

> 
> >What I'm looking to do is to read/write individual sectors on a SCSI
> >device.  Any help in directing me to my options for for 68K machines
> >is appreciated.
> some of the FS routines allow access to individual sectors, but I think
> that's only for a particular HFS volume. As you suggest, it's probably not
> a good idea using them unless you're sure they work even in the presence of
> a damaged directory. 

I'm still trying to figure out how the FS routines work.  It doesn't
seem like there is a clear mapping of how the File Manager calls the
Device Manager which (I think?) calls the SCSI Manager, and then... of
how the SCSI Manager interacts with the disk controller.

Lots of the information I'm finding in "Inside Macintosh" doesn't
really give a "poor man's" understanding of what is happening where,
and then there's always the problem with IM errata, too.

> Access to sector in a mac volume is probably all you
> need, but I think you have to make direct SCSI Manager calls to access
> arbitrary sectors, eg the partition map, driver partitions, etc. or to
> interact with the SCSI drive to read device geometry, defect sector lists,
> etc. 

I don't know anything about "device geometry" or defect sector lists,
but I'm slowly trying to come up to speed.  I've find some code from
Apple (which was it's original SCSI code), but don't know where to go
from here.

(I knew I was in trouble, when I read a back articles out of Byte
that explained the SCSI bus... when it said "the intent of SCSI was to
make computer peripherals as easy to interconnect as stereo
equipment", I knew I was in serious trouble!!)

Are there any guides to cross-compiling for the 68000 using gcc?  I've
got access to gcc 2.6.3 and 2.7.2 on a variety of platforms
(decosf3.2, solaris2.4, hpux10.01, aix4.1.4.0) but have very little
familiarity with using gcc, or with putting together an XFCN/XCMD so
that MacPerl can load it.

This sure isn't JCL.  ;-)

> I've got some C code to do these, but you'd have to wrap these within
> XS to access from perl. An interesting and enriching experience.

Anything you can provide helps me to climb the learning curve.  

I find that I understand stuff better if I have access to multiple
approaches to explain something ... things like well-documented Source
code, so that the logic of something is clear combined with articles
from Byte as an example, that explain how SCSI "really" is a LAN with
its own protocol.

Thanks for any pointers to anything.



Istvan.