ZX Hardware: ZX Microdrive
b) ZX MICRODRIVE
It is a small digital tape recorder. The cartridge is small and has a capacity of about 90 KB. It contains about 5 m of high-quality tape, which moves at high speed beneath the combined head.
Because of this, data access is fairly fast compared with using an ordinary tape recorder. Data is exchanged serially between the I-1 and the Microdrive over two lines. Odd bits travel on one line, and even bits on the other. The Microdrive itself has only one combined head for recording, playback and erasing.
The recording and playback parts of the head are designed so that even and odd bits can be recorded on separate tracks (just like the left and right channels on a stereo tape recorder). This arrangement means that, at the same speed, twice as much space on the tape is available for data, resulting in a higher-quality recording.
The recorded data is divided into 512-byte sectors. Each sector has its own header.
The disadvantage of the Microdrive compared with a real FLOPPY-DISK is that data access time depends on the position of the tape. If the requested program is directly in front of the head, the motor has to wind the whole tape so that this section passes behind the head.
In the Microdrive, a special electronic circuit drives the motor and combined head. It is mounted on two separate small printed circuit boards. The board carrying the motor electronics is called BASE BD. The other, for the combined-head electronics, is called HEAD BD.
A maximum of 8 Microdrives can be connected, giving a total capacity of about 700 Kb. For comparison, the C-64 computer stores about 170 Kb on one floppy disk, while one side of a C-60 cassette can hold about 300 Kb of data.
The Microdrive is connected to the left side of the Interface 1 via a 14-pin connector.
The connector carries the following signals:
- 0V, ground
- Negative supply, -9V
- Positive supply
- Two bidirectional data lines
- Read/write control line
- Erase line
- Two control lines
- Accidental-erasure protection lines
- Five unused lines (grounded)
The two control lines are used to select one of the 8 possible Microdrives and to switch the motor in that unit on and off.
COMMANDS FOR WORKING WITH THE MICRODRIVE
FORMAT
Used to format a microcassette.
General form:
FORMAT ;e; ..name..
where:
e— Microdrive number (1–8)name— cassette name, used to identify it; may be up to 10 characters long
Formatting a microcassette takes about 30 seconds. During this time, the BORDER flashes.
To be safe, format the cassette twice (with the same parameters?). Finally, check it with CAT e (e is the Microdrive unit number). After 10 seconds, the cassette name and a number representing the microcassette’s capacity in Kb appear on the screen.
CAT
Displays the contents (catalogue) of a microcassette.
General form:
CAT e
where:
e— Microdrive unit number
As well as sending the catalogue listing to the screen, it can be sent somewhere else, for example:
CAT #3,1
This sends the catalogue to the printer.
ERASE
Erases a program from the tape.
General form:
ERASE ;e; ..name..
The meanings of e and name were explained in the previous commands.
If you interrupt a recording with BREAK, that section can also be erased from the tape, but erasing it takes a little longer. Here is a BASIC program that makes erasing easier:
10 CAT 1
20 INPUT "Which program should I delete?"; LINE A$
30 IF LEN A$<1 OR LEN A$>10 THEN GO TO 20
40 ERASE ;1;A$
50 CAT 1
SAVE
Saves data to tape.
General form:
SAVE !
;e; ..name..
The command also has the following forms:
SAVE !
;e; name
SAVE !
ZX Hardware: ZX Microdrive
SAVE !"name" CODE 30000,100
SAVE !"name" SCREEN$
SAVE !"name" CODE USR ...
SAVE !"name" LINE 10
Saving a dimensioned array:
SAVE !"name" DATA A()
SAVE !"name" DATA A$()
If a name starts with the character 0, the CAT command will not delete it. This can be used for protection, but remember the name under which you saved the program. If you forget it, the program is lost forever (or until you remember its name).
Try the following:
A=0;B=1000 SAVE ! ;1;CHR$0+ CODE 1 CODE A,B:CAT 1
The VERIFY command checks the program just saved. Its forms are identical to those of the SAVE command.
It is important not to run BASIC programs after saving them and before verifying them. When saving, the program is saved with particular variable values. If you run the program before verification, those values will change, and verification will inevitably report an error. For example:
VERIFY !"PROBA"
This command compares the contents of the computer’s memory with the program named PROBA, saved on the cartridge in microdrive unit 1.
Example:
VERIFY !"KODOVI" CODE A,B
This compares the contents of the block saved under the name KODOVI with the contents of memory, starting at address A and for B bytes. If you omit the parameters A,B, verification is performed using the current contents of memory and the block named KODOVI. The starting address is the location from which saving began.
Example:
VERIFY !"SLIKA" SCREEN$
The previous command is correct, but an error may occur when it is executed because the message at the bottom of the screen corrupts the picture displayed there. Therefore, perform saving and verification from within the program itself. Here is the program:
10 FOR F=0 TO 351
20 PRINT PAPER RND*7;
30 NEXT F
40 SAVE !"SLIKA" SCREEN$
50 VERIFY !"SLIKA" SCREEN$
60 STOP
LOAD
Loads programs from a microdrive cartridge that were saved with SAVE. The current contents of memory are erased during execution. The forms of the commands are the same as for SAVE.
After switching on the power, or after typing RUN and pressing ENTER after the NEW command, the system executes:
LOAD !"RUN":RUN
This means that the program named RUN is loaded from the cartridge.
MERGE
Works just as it does with a cassette recorder. It is used to join BASIC programs. The only difference is that programs saved with:
SAVE !"PROBA" LINE 1
(with autostart) cannot be loaded with this command.
Blocks saved with CODE or DATA cannot be loaded with it either.
Contributed by:
Brada Jožef
Bajmočka 18
24220 čantivar
Press A to repeat; press B to continue:
ZX REVIJA; issue 4
ZX REVIJA; issue 4
THE FIRST CASSETTE MAGAZINE FOR SPECTRUM
NOW ALSO ON 3.5" DISKETTES
PRESS "ANY KEY" TO BROWSE ZX REVIJA
PRESS "BREAK" TO INTERRUPT ZX REVIJA
TO EXIT THE SCROLL ROUTINE, PRESS THE "C" KEY
LOADING ZX REVIJA
Share your thoughts about the article