[comp.sys.mac.programmer] Writing a SCSI driver

news@cvbnet2.UUCP (news) (09/01/88)

	A while ago I built myself a homebrew SCSI hard disk based on the
series of acticles published in MacTutor. (By the way, the only problem I
had was finding a supplier for the Centronics 50 pin connectors. I couldn't,
and finally sabotaged a block from an old telephone patch panel.) Anyway,
the disk works fine and I am now in the process of trying to rewrite the
sample Apple driver to support multiple hard partitions. I have 2 issues
I'm not sure how to deal with.

1)	My current plan is to have each individual partition be a separate
	drive in the drive queue. I use the technique described in Tech Note
	xx (The one describing the interfaces to DrvrInstall, AddDrive, etc)
	to find a unique drive # and add it to the queue. I assume I have to
	post the Disk Inserted event for each drive added. Is this kosher?
	I know that the .sony driver somehow manages 2 drives but I can't
	for the life of me separate the drive # id code from the rest of
	the spagetti.

2)	I also intend to add a special drive to the drive queue that I can
	use to represent the "raw drive", ie: the entire hard disk. I
	obviously can't mount this drive and I will flag it as not a mac
	drive.

3)	How do I remove a drive from the drive queue - and how do I know
	that it is safe to do so?

4)	I am implementing this driver on a mac plus (128k ROMS). Can I
	boot from my disk if I use the new DPM described in IM V or do
	I need to use the DPM described in IM IV.

5)	What system version do I need to use to assume the new 64+ entry
	unittable and at what point in the boot process is the table size
	(and expandability process) available. I am assuming that I may
	need to temporarily install a second copy of a driver for my SCSI
	target id and I don't want to wipe the original. In fact, what
	will the system do to me if I try to open a second driver with
	the same name as an already open one.

6)	Finally, I would like to make my driver asynchronous if there would
	be some advantage to it. IM II does some hand waving about whats
	needed to do this but there is no description anywhere I can find
	that provides any help. Where's a good place to look. (The sample
	driver from Apple is completely synchronous).

	Thanks for whatever answers I get, and if I get enough usefull info
	I'll of course summarize for the net.
		Peter Colby

UUCP: {sun,decvax}!cvbnet!pcolby
UUCP: pcolby@cvbnet.prime.com
CSNET: pcolby@cvbnet.prime.com