Article View: comp.sys.mac
Article #19743Re: DIY SCSI... It's done!
From: Stuart Lynne
Date: Mon, 28 Sep 1987 08:55
Date: Mon, 28 Sep 1987 08:55
58 lines
2762 bytes
2762 bytes
In article <2081@sfsup.UUCP> shap@sfsup.UUCP (J.S.Shapiro) writes:
>In article <1355@van-bc.UUCP>, sl@van-bc.UUCP writes:
>>
>> Given the level of knowledge available about the subject matter, and
>> availability of misc. bits of software I don't think that anyone with
>> reasonable programming skills shouldn't attempt this *if* they want to have
>> some fun and learn something about how drivers work with the Mac.
>>
>
>On the other hand, while I also encourage people to give things a try, and
>hardware being what it is it is quite difficult to really
>screw things up, I don't recommend doing it unless you are
>really comfortable in assembler. The complexity of doing the
>job right is still considerable.
>
Well no...
I just went and had a peek at my SCSI driver. Very *little* assembler
involved. Mostly Aztec C. Basically only three small bits in assembler.
First, the driver host. Usually you will find something like this in a demo
desk accessory or RAM disk demo.
Second was two things to correct some bugs in the original Mac Plus ROMS.
First the stat routine didn't work. Secondly the Blind I/O routines did not
work reliably. Both of these are fixed in current ROMS.
Finally at the same time I fixed the Blind I/O routines to work I did some
small optimizing to allow a 2:1 interleave to be used on the disk. Simply
unrolling the i/o loops does the trick.
Something along the lines of:
lsr.l #3,d5 # divide count by 8
beq.s done # is there anything left
subq #1,d5 # predecrement count register
loop
move.b (a0),(a2)+
move.b (a0),(a2)+
move.b (a0),(a2)+
move.b (a0),(a2)+
move.b (a0),(a2)+
move.b (a0),(a2)+
move.b (a0),(a2)+
move.b (a0),(a2)+
dbf d5,loop
bra.s done
....
The easy way to see how where to put this is to use MacNosy on the old ROM
patch for fixing SCSI.
Anyhow the assembler stuff is pretty well optional with the exception of the
host which you link into, and that's usually provided for you in some form.
--
{ihnp4!alberta!ubc-vision,uunet}!van-bc!Stuart.Lynne Vancouver,BC,604-937-7532
Technical Details
Message-ID:
<1408@van-bc.UUCP>Path:
arc1-ca.pugleaf.net!utzoo!mnetor!uunet!seismo!sundc!pitstop!sun!amdcad!ames!hc!beta!cmcl2!husc6!mit-eddie!uw-beaver!ubc-vision!van-bc!slReferences:
<1479@imagen.UUCP> <3898@sdcsvax.UCSD.EDU> <1355@van-bc.UUCP> <2081@sfsup.UUCP>Show Full Headers
Complete Article Headers
Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Path: arc1-ca.pugleaf.net!utzoo!mnetor!uunet!seismo!sundc!pitstop!sun!amdcad!ames!hc!beta!cmcl2!husc6!mit-eddie!uw-beaver!ubc-vision!van-bc!sl From: sl@van-bc.UUCP (Stuart Lynne) Newsgroups: comp.sys.mac Subject: Re: DIY SCSI... It's done! Message-ID: <1408@van-bc.UUCP> Date: Mon, 28-Sep-87 04:55:41 EDT Article-I.D.: van-bc.1408 Posted: Mon Sep 28 04:55:41 1987 Date-Received: Sun, 4-Oct-87 21:12:33 EDT References: <1479@imagen.UUCP> <3898@sdcsvax.UCSD.EDU> <1355@van-bc.UUCP> <2081@sfsup.UUCP> Reply-To: sl@van-bc.UUCP (Stuart Lynne) Organization: Public Access Network, Vancouver, BC. Lines: 58