Path: utzoo!utgpu!jarvis.csri.toronto.edu!mailrus!cs.utexas.edu!swrinde!zaphod.mps.ohio-state.edu!brutus.cs.uiuc.edu!apple!fox!portal!cup.portal.com!ts From: ts@cup.portal.com (Tim W Smith) Newsgroups: comp.sys.mac.programmer Subject: Re: Ram Disks... Message-ID: <25929@cup.portal.com> Date: 14 Jan 90 08:37:26 GMT References: <69382@tiger.oxy.edu> Organization: The Portal System (TM) Lines: 29 You don't patch anything. You write a device driver and install it, and then put an entry in the drive queue that references your driver. Then you post a disk insertion event. Probably the best way to go about this is to get the SCSI development package from APDA which contains a sample SCSI disk driver. Your driver will be similar, except that it doesn't make any SCSI calls. You will probably want an INIT to set up your RAM disk. This INIT would handle allocating the RAM and installing the driver and opening the driver. Be sure to write the part that transfers data in assembly language. I hacked up my SCSI driver to be a RAM disk driver one day, and for the first version I just did a byte-at-a-time copy from C, and the RAM disk was only about 4 times as fast as my Quantum drive! Tim Smith ps: once you have written a disk driver, you can then do all kinds of fun things. For example, I modified my RAM disk driver once to use my FastNet III card to talk to another Mac II which had a FastNet III card and a Surfboard. Each disk request caused an Ethernet packet to be sent to the other machine. My protocol handler on that machine would use the Surfboard to perform the requested action. Stick a CD-ROM on the Surfboard at this point, and you have a simple way to share a CD-ROM among multiple machines. Not bad for something that took less than two days to implement, eh?