) (09/13/88)
I will do better than that!!!! Here is the complete article, posted to USENET awhile back, about how to do the disk. After reading it, if you have any questions, just let me know!!! Phil Hunt ================================================================================ Subject: Build an ST506 hard disk system (long) Posted: 11 Jul 88 06:42:29 GMT Organization: Harvard Center for Hardware Hacking, Cambridge, MA Here is the (much requested) article which will tell you how to build your own hard disk system for the mac using the following components: - An ST506 compatible drive (the standard used on the IBM PC). - An Adaptec controller board. - A power supply, a case, some cables, some hardware. - Software which will cost you $10 or a pint of blood. - A Mac with a SCSI port. I have listed some sources for these items at the end of the ar- ticle. There have been quite a few successful homebuilt hard disk sys- tems built, several by people on the net who have replied to my requests for information. There already have been articles writ- ten on the subject; in particular, a series of MacTutor articles (around April 1986) describe a system very similar to what I describe here. The MacTutor articles are a bit more complicated; my scheme was simplified by using less cabling and by using a version of Ephraim Vishniac's SF&I program which has been tay- lored for the particular board I am using. I got into this project when I bought a 10 Meg drive from Eli Heffron's, an electronic surplus dealer in Cambridge. The drive cost me $75, and I figured that for such a price I didn't have much to loose. Eli's drives had been tested out on a PC; they were ST506 compatible and had come from GCC, where they had been used in the original Hyperdrive. I was determined to use this drive with my mac, and was surprised to find out how easy this was to do (although several people had told me it could not be done). The system I have works without any problems. It's not a terribly high performance drive, but it's a lot faster than a floppy. The cost of the system came in several hundred dollars below what I would have had to pay for a retail system. This was in part due to the bargain I got on the drive, but even without that I would have done well. WHY USE AN ST-506 DRIVE? A bit of terminology first: the ST506 standard (I have also seen this referred to as the "ST506/412" and "ST506/415") was created by Seagate; these drives were used in the PC XT system. I don't understand the hardware aspects of the standard, but that's not really important. The Macintosh world didn't adopt this stan- dard, but went with the SCSI interface instead. The SCSI inter- face is a more general purpose interface (not just for hard drives), and it supports a more intelligent operating scheme than does ST506. Under the SCSI scheme, devices ideally have the con- troller imbedded in the actual device; thus there are many disk drives out there which have SCSI controllers built in, rather than ST506 controllers. To hook an ST506 drive to the Mac we need an interface board which talks to an ST506 drive on one end and to a SCSI port on the other. Using a SCSI drive would seem to make more sense than using an ST506 drive, as it can be hooked directly to the Mac. It can be done; many people have done it. My scheme offers two advantages: - ST506 drives are more available and cheaper than the SCSI drives. Almost all PC types have ST506 drives in them, and as a result there are a lot of decent used/surplus drives floating around (like mine) for little money. Even a new 40 Meg Seagate drive of reasonable performance can be bought for under $400. - Using the Adaptec controller board makes software configuration trivial. I used a version of SF&I (SCSI Formatter and Installer) which was already taylored to the board. I only had to enter two drive parameters (using ResEdit), plug in the drive, and fire it up. A generic SCSI drive might have had me looking up SCSI com- mands and possibly even writing my own driver. - It is easy to upgrade this system to a bigger drive. Only the drive need be purchased; the software is reconfigured just slightly for a new drive, and the drive in many cases will fit right into the old case. HOW TO CHOOSE A DRIVE: The July issue of Byte has a good article on 40 Meg hard drives. It evaluates several ST506 models, and makes the important point that the performance statistic of the manufacturer don't neces- sarily have a lot to do with the actual performance of the drive. My drive has a 65 ms. access time, which is pretty terrible by today's standards, but it still seems pretty fast to me. Remember that you can pay a large factor in price for a small factor in performance with these drives. You can help out the performance of any disk (even a floppy) quite a bit by preventing fragmentation. Fragmentation happens when files are read and written when the disk is near capacity, and as a result a given file ends up as blocks which are not con- tiguous, but scattered all over the disk. Prevent it by keeping your disks below 70% capacity, and fix it by clearing the disk and copying the files back on. If you're buying a used drive, you probably want to test it out first. You can plug an ST506 drive into your friend's PC (assum- ing the PC already has a controller card for a hard drive). Have your friend format the drive and either run some test utility on it or dump a lot of files to it. When hard drives break, they tend to do so by crashing their head on the platter, making a nasty scraping sound. That's too bad, I don't think there is any way to recover anything from a crashed drive. My disk has 8 Meg of applications and system things on it (all I will ever need), and I keep files I create (or copies of them) on floppy, so I don't really need to back up anything. So I don't really worry about reliability. If my drive breaks, I'll get another. There is sense in getting a good drive, but there may not be a lot of sense for paying a lot of money for one which is supposed to be more reliable. You may, though, have your own reasons for buying a high quality drive. There are more issues to consider when looking for a drive (see the Byte article). Getting a drive which "parks" its heads (moves them to a place where they will not crash) when the power is shut off is probably a good idea. Mine doesn't do that. RLL drives: a more recent method of recording data on a drive is called "Run Length Limited." The traditional standard is called "Modified Frequency Modulation." I don't understand the inter- nals of these two methods completely. RLL packs 50% more data on a drive, but requires a drive with very high quality magnetic media. I think that the disk interface (ST506) is actually the same for RLL drives. I've seen a bit of discussion on RLL vs. MFM. Several people have suggested that RLL be avoided. My suggestion is to stick with MFM unless you are really sure you have a drive which is good enough to support RLL. RLL will re- quire a different model of the controller board, which costs just a bit more. THE ST506 TO SCSI INTERFACE: There are several boards on the market which hook ST506 drives to SCSI ports. I've heard of boards made by the following manufac- turers: Adaptec (4000A and 4070 models) Scientific Microsystems (OMTI 3100 and 3127 models) Western Digital (WD1003A-SCS model) Xybec The models most popular with Mac users are the Adaptec boards. The 4070 board supports RLL encoding, and the 4000A board sup- ports MFM encoding. The 4000A board used to be two separate boards, the 4000 and the 4010. To my knowledge, you cannot use the 4070 board to do the less advanced MFM encoding, so you must buy the right board with the right drive. Computer Surplus Store in Milpitas CA sells the 4000A board for $89 and the 4070 for $98. Another $8 gets you a very detailed manual for the boards. I bought my board from Computer Surplus, and had no trouble with the order. They were fairly helpful on the phone, and the board arrived within a few days. They give a 90 day warranty on the board. The Adaptec board is packed full of hardware. It has an 8085 processor, a SCSI controller chip, and even a few custom chips. It includes removable terminators on the SCSI line. Adaptec do- cumentation claims that this board is optomized for high perfor- mance. I don't know to what extent the Mac takes advantage of this. The documentation is extensive, and the board has some self-test functionality. The Adaptec boards actually support two hard drives! The SCSI protocol allows several "logical devices" to be addressable on one SCSI address, and the board takes advantage of this allowing logical device 0 and 1 to be two separate drives. But unfor- tunately the Mac is not completely happy to cooperate here. Ac- cording to Ephraim Vishniac (who wrote the driver software I am using) making the second drive work would require a fair bit of work on the software end. Carl Nelson of Carl Nelson and Associ- ates sells software which he says will work with two drives which makes the Mac think they are one drive. His software can be bought for $50. Computer Surplus uses his software to test their boards, but they didn't mention anything about using two drives. POWER SUPPLY AND OTHER HARDWRE: Beyond the disk drive, you'll be needing a power supply, cables, and a case with a fan. All of the disks I've seen require a sup- ply which provides regulated +12 and +5 volts. The Adaptec board also requires these voltages, and specifies a maximum current re- quirement of 1.5 amps for +5 volts, and 300 ma for +12 volts. Add these figures to your drive requirements, and you have the minimum power requirements for your power supply. "Switching" power supplies are small and run cool. They are more complicated than the older generation of regulating power sup- plies, and more difficult to repair. They sometimes introduce high frequency noise to their outputs (this usually doesn't af- fect digital electronics), but they are more immune to power line noise and spikes. Often switching supplies will not regulate properly unless they are loaded on some or all of their outputs. I bought a switching supply from Horizon Sales in Framingham MA for $10 (a real bargain). I built my own case and wired the sup- ply myself. But unless you also take some sort of perverted pleasure in doing this kind of thing, a much easier solution is to buy a case which has been built to mount a disk drive and which has a built-in power supply and fan. These can be found where PC accessories are sold (check the backs of those PC maga- zines). Horizon offers such a thing for $65, but I have not seen it. The power connectors, if they are the standard PC type, will mate to the drive and to the Adaptec board. You'll need to do a bit of fooling around to mount the Adaptec board inside the case. You'll need two sets of cables: one set to connect the disk drive to Adaptec board, and one set to connect the Adaptec board to the Mac. You can buy ribbon cable and connectors which attach to the cable, and assemble everything yourself. The cables should be long enough to provide comfortable installation, but should not get excessively long. The disk drive set requires one 34 conductor ribbon cable with IDE edge connectors on each end and one 20 conductor ribbon cable with an IDE edge connector on the drive end and an IDC socket on the board end (mates to a dual line of pins on the board). The Mac SCSI connector is nonstandard; it uses a 25 pin D-type connector where SCSI standards call for a 50 pin connector. The proper way to deal with this is to buy a Mac "SCSI System Cable" for an outrageous $40 or so, and to build a cable to connect that to the Adaptec board. (The alternative is to hand-wire your own equivalent of a SCSI system cable, which unfortunately is a com- plicated job.) The SCSI system cable terminates in a standard SCSI 50 pin connector, which happens to be the same connector used on multi-line telephone systems (you can look for yourself, but please don't try to plug them together). You will need a connector which mates to this and which connects to a 50 conduc- tor ribbon cable (this may be Amphenol part 57F-50, but I'm not sure; it might be hard to find). The other end of the ribbon ca- ble should be a 50 pin IDC socket. Connecting the ribbon cable to these connectors is ideally done with a special tool, but can be done adequately in a vise. I used a pair of pliers and was careful not to damage the connec- tors. Ribbon cable usually has a red stripe on one side; by con- vention this is pin 1 of the connector (look for the little numbers on the connectors). You can buy a length of 50 conductor ribbon cable and tear off the extra leads to create 34 or 20 con- ductor cables. If you have never put together cables before, you might want to get a bit more advice from someone who has. It's really pretty easy, though. With these cables, there is nothing special (no cutting or rewriring) to worry about. SOFTWARE: The software which is required to configure and use a hard drive on the mac is a program which formats the drive (checking for bad blocks) and installs software on the drive which will enable it to be booted. Most commercial drives come pre-formatted or with their own formatting program. These programs are normally drive specific, but I have heard of cases where people have been able to use them to format other drives. Ephraim Vishniac, however, has written a generic formatter and installer program called "SF&I." There is a version of this pro- gram available from Info-Mac (can be downloaded via ftp to sumex-aim.stanford.edu), and I will be posting to comp.binaries.mac two more recent versions of this. The first is a generic program which with a bit of work can be configured to many drives, and the second is a version which is specific to the Adaptec 4000A and 4070 boards. There is documentation with these programs. The command set used to communicate with SCSI devices varies between devices. This is what makes writing a generic driver difficult. Ephraim has done a good job of pulling this off. His generic SF&I program must be configured using ResEdit; this con- figuration involves specifying the SCSI command set and drive parameters. But to do this, you need to know a fair amount about the workings of the drive. This is why the Adaptec project is so appealing: because the SCSI commands for the Adaptec board do not depend on what kind of drive is being used, an already taylored version of SF&I can be made available for these boards. There is still some configura- tion which needs to be done which involves specifying parameters of the drive. In my case I simply needed to specify the number of cylinders and the number of heads on the drive. As mentioned before, Carl Nelson sells software which does what SF&I does. He claims that his software is easy to configure (you don't need ResEdit) and that it works with two drives on one con- troller board. Ephraim Vishniac requires that you either donate blood to the Red Cross or send him $10 upon successful use of his software. Un- fortunately, he cannot make the source code available, as he has sold the source to Jasmine. The articles in MacTutor give source code for a driver which uses the Adaptec board. The driver is written in Forth. MacTutor sells disks with source code and executable for articles which appear in their magazine. I believe they also sell back issues. PUTTING IT ALL TOGETHER: Once you have acquired all of the parts necessary for your sys- tem, getting it running is fairly straightforward. Manufacturers of all of the involved equipment here will warn you to no end about damage to equipment by static electricity. You can buy all kinds of equipment to help you do this, but it is my opinion that this is overkill. You can ground yourself safely and cheaply by attaching a wire to yourself and to a (metal) wa- ter pipe. Touching the ground circuit on equipment you are work- ing with before touching any other part of that equipment is also effective. The ribbon cables need to be cut to the right length and assem- bled. There are two ways you can orient a connector on the rib- bon cable; the right way has pin 1 of the connector attached to the first lead of the ribbon cable. Ditto with plugging the ca- bles into the board and drives: the edge connectors on the drive usually have pin 1 marked. If you are attaching two drives to the Adaptec board, one of the cables becomes a bus for both drives, and the other cable must be wired separately for each drive. The instructions for the Adaptec board describe how to do this. A single drive should be hooked to J0 on the Adaptec board, not to J1. Adaptec board configuration: there are a few options on the Adap- tec board which can be set by installing jumpers on the board. Most of these are options which you probably will not want; my system works without any jumpers. Three jumpers are used to set the SCSI address of the board, which is zero if no jumpers are installed. The Mac SE uses the zero address for its internal hard drive, and all Macs use seven as their own SCSI address. If you are hooking you drive to equipment where the zero address is used, you will have to set the jumpers to another address. Lit- tle plastic jumpers are the right things to use for this, but wirewrapping the pins together should also work. Drive configuration: ST506 drives are also addressable, usually set by jumpers. If you are hooking one drive to your Adaptec board, it should be set to address zero. If you have a manual for your drive you can check this, but since most PC folks only use one drive with their controller, the drive will probably be set to the zero address already. Terminators: terminators are used on computer cables where sig- nals are being transmitted at high speed. A terminator is typi- cally a pair of resistors which connect between the signal line, ground, and a power supply (or simply a resistor between the sig- nal line and ground). A good real-world analogy is the following: a long hallway is used to transmit messages; a person stands at some point in the hallway and shouts to everyone else standing in the hallway. If the hallway is infinitely long (you may claim that this isn't real-world, but folks at MIT have actually built such a thing) everyone hears the message eventually, but if there are walls at the end, the voice is hard to hear because it gets scrambled with the echo of the voice off of the wall. If you don't believe that, have someone shout to you from very far away while you are standing near a wall. Putting a sound absorbing material on the ends of the hallway solves the problem; now no sound reflects back and it sounds like the infinite corridor situation. That's exactly what a termina- tor does: it absorbs the electrical signal and prevents it from reflecting back. Without getting further sidetracked, here is the bottom line: on a long computer bus such as the SCSI bus, you want two termina- tors, one at each end of the bus. Don't worry about where exact- ly the end of the bus is (inside the disk or outside); that doesn't matter. You can buy expensive little things which plug into you SCSI cable and act as terminators, but that won't be necessary. The Adaptec board has a terminator built in. It can serve as the termination on one end of your SCSI bus. If you don't want ter- mination there (because you have other SCSI devices hooked to the Mac and your Adaptec board is not on the end of the bus), you can unplug the terminator from the board. The Mac SE and, I believe, the Mac Plus, do not have terminators built into their SCSI port. The Mac SE internal hard drive DOES have a terminator built in. Typically your Mac will be one end of the SCSI bus, and it ideally should have a terminator on it. Some of the Mac SCSI system cables have termination built into them; this can serve as the terminator on that end of the SCSI bus. But the Mac SE manual recommends that you don't worry about it if you don't have a SCSI terminator on that end of the bus, and to just have a terminator on the other end. Take a good look at the Mac SE manual. My mac is a 512e, which has been expanded to 1 Meg plus SCSI with the Dove MacSnap kit. I recommend that kit by the way; it works just fine and was straightforward to install. The MacSnap SCSI port has a terminator on it, a sensible decision on the part of the Dove engineers. The terminator can be removed by cutting (ouch) it off, but I left mine on. With the MacSnap terminator at one end and the terminator at the Adaptec end, I have a prop- erly terminated SCSI bus. Disk terminators: Since the control lines for disks are hooked up as a bus (two disks may share the same control lines), these lines also require termination. The Adaptec controller board has one terminator built in, and the last drive on the bus (the only drive, for single drive systems) should also have a terminator. Many ST-506 drives will come already terminated since they are frequently used in single drive PCs. CONFIGURATION: The Adaptec version of SF&I is pretty straightforward. The docu- mentation with that program explains how to configure the program for your particular drive. After that is done, run the software and it will go ahead and format the drive, check it for bad blocks, and mount the drive. From there it works just like any other disk - copy a system onto it and you can boot from it. Bad Blocks: hard disks normally have some media defects on them. This means that certain blocks on the drive will not be able to be used for storage. Disks usually come with "Media Defect Lists" which tell which areas on the disk are bad. I think that there may be a way to give a media defect list to the SF&I pro- gram, but it doesn't appear to be necessary. SF&I tests each block on the disk by writing and reading data, and creates its own defect list for the disk. Ephraim Vishniac says, "It was a real pain to write, but it seems to be quite effective." BUGS: I have only found one problem with my Adaptec setup: the computer will not mount the hard disk if the system has been powered off and then powered on within about thirty seconds. This doesn't cause me any trouble when using the disk, but it puzzled me for a while when I was testing it. TROUBLESHOOTING: If the system doesn't work, the first step is to isolate the trouble to a certain component. Problems could be in the drive, controller, cables, or power supply. Here are some tricks to isolate these areas: Drive: test the drive on an IBM PC, as described above. Format- ting it on the IBM will, of course, destroy any data on the drive. Make sure the drive is properly configured. Controller board: the Adaptec board has self-test functionality. Connecting one jumper will cause the board to light its LED in a certain way. The Adaptec manual describes how to do this. Try it in different configurations: plugged into the disk, plugged into the Mac, not plugged in at all. Cables: Assuming that the connectors are put on the right way, cables will probably work fine. The connections made by these connectors to ribbon cables are pretty reliable. You can, howev- er, carefully check continuity and shorts with a multimeter if you are suspicious. The edge card connectors can make bad connections if the contacts are dirty. The gold card edges can be cleaned with a pencil eraser. Power Supply: Check the power supply voltages with a digital voltmeter while everything is running. The outputs should be very close to their rated voltages. If they are not, the power supply may not be properly loaded, or it may simply not be power- ful enough. An oscilloscope is also useful for checking for variations (ripple, noise, spikes) on the power supply outputs. MAC II? I don't know of anyone who has actually hooked one of these sys- tems to a Mac II. I'm not sure if the software would work correctly, particularly SF&I. I don't see any reason why this could not be made to work, though. The SCSI interface should be the same for both computers. SUPPLIERS: Accessories Plus 65 Mount Auburn Street Cambridge, MA 02138 (617) 497-0262 A+ retails a lot of little computer gadgets, including a fair selection of Mac accessories. They sold me a SCSI system cable for $40, not exactly a bargain. Their prices on the Dove MacSnap upgrades are competitive with mail-order outfits, though. Save $50 and install it yourself. Adaptec, Inc. 580 Cottonwood Drive Milpitas, CA 95035 (408) 945-8600 MA sales office: (617) 686-7274 Adaptec makes the 4000A and 4070 boards discussed above. I don't believe they retail any of their equipment. They were not too helpful when I called them. Horizon Sales, Inc P.O. Box 646 59 Fountain Street Framingham, MA 01701 (617) 875-4433 Horizon was very helpful and had exceptional prices on small parts and connectors. They have an excellent selection of small parts, and their prices are quite reasonable. Their large parts are mostly IBM things. Eli Heffron and Sons Solid State Sales 139 Hampshire Street Cambridge, MA (617) 547-7053 Eli's is an electronic surplus store where I bought my disk drive. They have an incredible selection of some computer equip- ment you thought you would never see again. Their prices some- times are steep, but they are fairly friendly and helpful. Carl Nelson Associates (206) 252-6897 Carl Nelson sells a formatter and installer program which works with the Adaptec board. The software sells for $50. Walker Electronics 2351 Hacienda Dallas, TX 75233 (214)-339-4916 Rich Straka recommends Walker ("Tiny outfit, but seems pretty reputable") as a supplier of Scientific Microsystems controllers, and case/power supply boxes. DISCLAIMER: I am only offering advice from personal experience. I am not responsible for anything which may result from following this ad- vice. The advice may not be correct. I am receiving no money or benefit from anyone for giving this advice. THANK YOU: To all of the netters who offered or requested information. They are too numerous to mention here. -david gingold (gingold@endor.harvard.edu) Received: by decwrl.dec.com (5.54.4/4.7.34) id AA13147; Mon, 11 Jul 88 01:12:45 PDT
anderson@watdcsu.waterloo.edu (G.Anderson - Computing Services) (09/29/88)
RE: GIF PICTURE FORMATS 1) Is there a newer version of GIFFER program than 1.0? 2) Is there a program that will display GIF picture files on the MAC+ or SE?