Atari Drives And Disk Operating Systems
Richard Kushner
High Bridge, NJ
It's now the tenth time that you've waited five minutes for your program to load from tape on your Atari and you have begun to wonder if there isn't a better way. Even though the Atari tape recorder seems to load flawlessly, the waiting time becomes a nuisance, not to mention the fact that you must be careful to set the recorder to just the right spot on the tape in order to give the computer just the right length of silence before the data comes streaming in.
And how many times have you lost a program during development because you didn't want to "waste" the time required to save it on tape? The answer, of course, is to get a floppy disk drive, in particular the Atari 810. There are not yet any non-Atari disk drives available for your computer. It isn't an easy decision to make when the disk drive costs more than half the cost of the computer. Let's try to cover the things that you need to know in order to make an intelligent purchase and also include an analysis of the two disk operating systems (DOS) that Atari has released: the original DOS I and the updated and improved DOS II.
Care And Feeding Of The 810
The 810 disk drive comes in a case measuring 4.5 H × 9.5W × 12D, attractively designed to match your computer. It comes with a separate power supply, just like the one that runs the computer. (A mild complaint: If each of the peripherals comes with one of these power supplies, where do we put them all?) With the 810's two input/output connectors, it is a simple matter to interconnect whatever items you have feeding into or out of your computer. There are two slide switches in the back which you set to tell the computer which drive it is addressing (#1-#14). With only one drive (and that covers nearly all of us) you set it for # 1.
You must always power up the drive before the computer or else the computer will not be aware that there is a disk drive on the line. You also want to be sure that you do not have a diskette inserted when you power up, as this is an easy way to destroy any information on it. Keep in mind that the drive unit must be placed a minimum of 12 inches from the TV or telephone or anything else that generates a magnetic field. This is another easy way to wipe out a diskette.
As for diskettes, you can use soft or hard sectored ones because the Atari doesn't use the timing holes at all, but rather writes the timing information on the disk during formatting. You will quickly learn the do's and don'ts of physically handling diskettes. Be sure to use only felt-tipped pens when writing on labels attached to the diskettes. Failure to do this can ruin a diskette. Each side of a diskette will store about 92K [92 kilobytes, or 92 × 1024 bytes] which is roughly equivalent to four C-10 cassette tapes.
The power of the disk drive comes into play in the rate of reading and writing data and programs from and to the disk (6000 bits per second) and the identification of each file on a diskette by name. To run a program you simply type RUN "Dl :TESTPROG.EXT", where Dl is the drive number, TESTPROG is the name of the program (up to eight characters, beginning with an alphanumeric, containing no spaces and using any letters or numbers) and .EXT is an extension that can be used to identify programs by type (i.e., .BAS for BASIC, .DAT for DATA, etc.). The DOS (much more on that later) searches the diskette for the program, loads it, and then begins to execute it. All the other Atari I/O commands are also available (SAVE, LIST, ENTER, PUT, GET, LOAD, PRINT, INPUT, etc.)
The time required to SAVE a program to diskette is longer than the time required to LOAD the program from the diskette because, during SAVE, the computer checks to be sure that the data has been correctly transferred. You can override this "write with verify" feature if you wish. For us former tape recorder users, the transfer rate is still so fast that there is no longer any time to go and get a snack while a program LOADs or SAVEs.
As the Atari software field matures, more and more programs are appearing only on diskettes, either because of length or because they need to make frequent access to disk stored data during execution. I have seen advertisements for Adventure-type programs that use up to six diskettes and database programs that are only practical on disk. There is even a magazine for the Atari that appears only on diskette. It has been reported that 90% of all Apple owners have disk drives. As a final argument, for those who are still holding onto their money, the purchase of a disk drive gives you the opportunity to turn your Cadillac of personal computers into a Ferrari. Enough said?
Atari DOS I Versus DOS II, Or Vas 1st DOS?
Just as the computer requires an operating system in order to function, so, too, does the disk drive. The disk operating system (DOS) comes recorded on a diskette and is the first thing that the computer looks for when it is powered up. I will be concentrating on DOS II in this article, referring to DOS I when it seems appropriate to point out the improvements that DOS II brought about.
DOS II consists of three files; DOS.SYS, DUP.SYS, and AUTORUN.SYS. DOS.SYS boots when the computer is turned on. You can then direct all BASIC commands to the disk drive. DUP.SYS contains the utilities to run the DOS menu and is called from BASIC by typing DOS. AUTORUN.SYS is intended to boot automatically after DOS.SYS and can be modified to perform any function that the user feels should automatically come on line. It currently looks for the 850 Interface Module handler and, if it finds it, the computer loads it. This corrects one of the flaws in DOS I. Any file may be named AUTORUN.SYS, thus booting automatically on initialization.
Speaking of flaws, DOS I has several, all of which are corrected in DOS II. Those with DOS I may be unaware of some of these flaws (and therefore blame themselves or their computer for some odd happenings), so here is a list of the more significant problems:
1. The DUPLICATE DISC command occasionally has trouble with the first eight sectors and, if DOS is in these sectors, you will get a diskette that will not boot.
2. AUTO.SYS loads files, but won't execute them.
3. COPY FILE and DUPLICATE FILE commands allow illegal use of wildcards and this causes problems.
4. If FORMATting finds bad sectors, the user is not informed.
5. In some instances, full length filenames are not accepted.
6. Sectors on diskettes are sometimes taken out of user availability when they shouldn't be.
DOS II boots in seven seconds. You are then in BASIC and can use all the I/O commands to communicate with the disk drive. In order to use the DOS menu commands, you must type DOS. After about nine seconds you get a menu [a list of choices]. The reason for this method is that then it is unnecessary to use active computer memory to hold the menu functions unless they are specifically needed.
DOS I has the menu automatically boot and this consumes a considerable amount of memory (about 6K) which is then unavailable for program storage unless you dump DOS. DOS II could potentially get you in trouble when you called for the menu, since it requires a portion of memory that you might also be using and, hence, you would lose your program. This has been neatly taken care of by allowing the user to create a MEM.SAV file on his diskette. MEM.SAV is a place for the computer to put that part of memory that DUP.SYS needs for the menu. Thus, the computer automatically saves your program before going to the menu and restores your program after you release the menu. The penalty here is time, since MEM.SAV takes about 30 seconds to operate. The alternative is to SAVE any resident programs before calling the menu and not use MEM.SAV at all. There is a tradeoff here since MEM.SAV provides a nice degree of protection. Anyone who has lost a program after hours of typing will appreciate this feature.
The rest of the menu commands relate to operations on the diskette-stored files, and their names are pretty much self-explanatory. Their implementation is well described in the instruction manual. An area of major concern is the compatibility of DOS I and DOS II formatted diskettes. All diskettes must be formatted before they can be used and the DOS I and DOS II formatting is not the same. Using DOS I on DOS II formatted diskettes will destroy files, whereas using DOS II on DOS I formatted diskettes will either work or else give an error message. Therefore, the rule of thumb is to always use DOS II, especially if you are not sure of the diskette formatting.
There is a bug in DOS II for those who have an 850 Interface Module with something attached to a serial port on it. The COPY command, which allows you to copy a file disk-to-disk, disk-to printer, or disk-to-whatever, does not allow you to copy to the serial port. This is because the Interface Module handler, which boots at the same time as DOS, occupies the same space in memory as DOS and, thus, gets garbled. The result of a COPY to the serial port is that the computer goes off to never-never-land and you have to turn it off and reboot to regain control (losing any programs in memory). As I write this, Atari is working on the problem of relocating the Interface Module handler out of harm's way.
The Dark Side Of The Force
The 810 Disk Drive and/or DOS II have some "sometimes" bugs. There are occasions when disks from my drive will not run on other drives and vice versa. This was traced to speed variations in the drives. In fact, Atari redesigned their disk drive to incorporate an external data separator. This has effectively cleared up this problem. For those with older disk drives, Atari will be offering to upgrade those drives.
An alternative is a do-it-yourself installation that has been promoted by Atari Users' Groups and which is easy to do. Also available from either of these two sources is a fast formatting chip modification that speeds up the read-write operations. On the horizon are double density and dual disk drives from other suppliers. The latest Atari computers being sold also have a modified operating system board in them. The most significant change when using these will be the elimination of the annoying pauses that occur during communication with the disk drive.
[For a third alternative to disk speed adjustment, see "Getting Your Atari Disk Drive Up To Speed," COMPUTE!, May, 1982, #24.]
Atari Disk Menu With DOS II
The "Atari Disk Menu" program in COMPUTE!, January, 1981, #8, is a very useful program which enables the user to access programs on disk without having to remember their names or their exact spelling. This program will not, however, run on DOS II. However, it is easy to fix the program and add the feature of printing out the free sectors available on the disk.
With DOS II there is a difference in format for the "free sectors file" between DOS I and DOS II. In DOS I this file is simply a number indicating the sectors that are unused, while in DOS II this file has the number of sectors available plus the phrase "free sectors." Therefore, when line 130 tests for the length of the file (looking for < 5 if the file is the DOS I "free sectors" file) it fails in DOS II (which has a longer file length) and gives an "end of file" error and stops.
A consideration of the file format makes a fix very easy. All program name files consist of two spaces plus a file name of up to eight characters plus an optional decimal point and three character extender. For example, a file name may be TEST-RUN4.BAS where the length of the file name may be less than this. The filename that holds the free sector information, however, is made up of the number of free sectors plus the phrase "free sectors." The key is the absence of the leading spaces. Therefore, if line 130 becomes
130 IF FILE $(2,2) < > " " THEN PRINT FILE$: GOTO 500
When the program encounters the free sectors file it will print it out, thus giving the number of sectors, and go on to ask which program you wish to run. FILE$(2,2) is used rather than (1,1) because if the file is locked, FILE $ (1,1) will have a "*" in it. This small change makes a useful program even more useful.