While I have no statistics to back my thinking I believe that there are far more working with cassette than any other mass storage medium on either the ZX81 or the T/S 2068. While this is basically about the ZX81 there are some of the following that will also apply to the T/S 2068. I am trying to be as accurate as possible and if anyone has anything to contribute or suggestions or changes, please let me know. I do want this to be helpfull and only by being correct is this possible. After I got started I found that I had far more material than I realised and this will not fit into one issue, so there will be more material later.
We will start with theory or at least a little theory so that you will know what the computer is looking for when it is waiting for the cassette signal to LOAD. It may not make much sense to all but does help to point out some of the possible problem areas.
Source: “A PRACTICAL GUIDE TO MACHINE LANGUAGE PROGRAMMING ON THE TIMEX/SINCLAIR 1500 AND 1000 (AND ZX81)” by David B. Wood. The following material is from Chapter 15 starting page 135:
TAPE ENCODING
What does a bit look like on a T/S tape? A bit is composed of a series of 3.33 kilohertz pulses. It is high for 151 microseconds and low for 149 microseconds, so the total width (elapsed time) of 300 microseconds provides the 3.33 kilohertz tone.
A zero bit consists of a series of four of these pulses. The total width (time consumed) of a zero bit is 1.02 milliseconds. A one bit consists of a series of nine pulses. The total width of a one bit is 2.55 milliseconds.
A byte, as we all know, contains eight bits. The time between individual bits is 1.50 milliseconds.
The inter-byte spacing is virtually the same as the inter-bit spacing, so that if a bit is lost on tape read, every byte after will be out of step. The system simply assumes that each series of eight bits is a byte.
When tape LOAD is initiated, the system starts sampling the cassette input at 21 microsecond intervals. Note that this is almost exactly 1/3 of the horizontal scan rate of the TV. That is why this tape scan loop has such a distinctive fingerprint on your TV. The scan continues at this rate until a pulse is detected. Then after, 25 microseconds, the system starts sampling the tape at a higher rate: a little over 15 microseconds. The sampling frequency, once a pulse is detected, is about ten times the pulse width. An ideal pulse should thus provide about nine or ten sequential high samples. This should be followed by an equal number of low samples. The total number of sequential high, then low, then high, etc., are accumulated. A one bit should provide more than twice as many samples as a zero bit. If less than 62 high pulses plus low hits are accumulated, the bit is rejected as noise. If the number of hits is between 62 and 148, the bit is assumed to be zero. Between 148 and 214 is assumed to be a one bit. If more than 214 hits are detected, the bit is rejected.
During the low state between pulses, the system will scan for up to 400 microseconds to make sure that another pulse isn’t there. This means the interbit space of 1.5 milliseconds is more than a millisecond longer than is necessary for the tape read to work. Thus the tape read/write speed could be shortened by about 30 percent by cutting one millisecond off the interbit space.
In spite of how it may appear to someone having tape reading problems, this tape read algorithm is quite insensitive to moderate distortion and to tape speed errors. The relative width of the high and low states of the pulses can change quite a bit , since lost hits in one state can be compensated for by extra hits in the other state. The error is 26 succesive low hits.
Source: SYNCHRO-SETTE VOL. 1 #1 APRIL 1982
If you are loading a program and the volume is too high, the computer can receive distorted information and background noise may be picked up. The result of extreme high volume is that the screen goes blank.
If the volume is too low, some of the data can be missed. Even if the program seems to have loaded OK, the program will not run properly.
A proper load should be followed with (0/0) at the bottom of the screen.
Another factor that may affect loading is whether the recorder has a HIGH and LOW frequency switch. Computer data pulses are consistently of a high pitched frequency. This can be easily observed by unplugging the jack from the EAR socket of the recorder and listening to the sound the tape makes when played. If the switch is in the LOW position, the recorder is not allowed to emit the frequency of sound needed by the computer. The low pitched sounds however are sent to the computer and distort the input to the point where the program load is a failure.
If you think that your recorder may be the problem, try another recorder. Borrow one from a friend if you can.
No volume adjustment is required when saving programs however. The recorder has a condensor microphone that automatically adjusts itself to the volume that is being inputed. It takes a second or two for this to happen and that is the reason why when you save programs, the screen pattern does not appear immediately. The computer is giving the volume level device in the recorder a chance to reach the correct threshhold.
Never save a program at the beginning of the tape unless it is a leaderless tape. All other tapes have a beginning and ending portion made of none magnetic material. None magnetic material of course will not hold computer data.
Always make duplicate tapes. I cannot over stress the importance of back-ups, especially when writing programs.
If the program you are writing is long, a good proceedure is to write about 10 lines and then save it on one cassette twice. Then write 10 more lines and save it again, but on a second tape twice. Keep doing this proceedure back and forth between the two tapes until the program is finished. This way, if the computer bombs, the power fails or if there is a nuclear attack, the most you would have lost is 10 lines. I realize this can be time consuming but there comes a time in every programmer’s life when he wishes he did it.
SYNCHRO-SETTE VOL. 1 #2 MAY 1982
If a program was recorded from a computer other than your own or from computer duplicating equipment loads OK, but programs that were produced from your own computer do not load easily, it could be because:
1. The internal circuitry of the computer that controls the saving of the programs is defective. This is not usually the case but can happen. Since the programs that were produced from an outside source load all right, the programs you try to save can be recorded with various degrees of improper data pulses. Before blaming the problem on the computer, first investigate the procedures that follow.
2. The computer and/or cassette recorder are picking up excess noise from their Alternating Current power sources in the form of power spikes. These are caused by electrical machinery, fluoresent fixture transformers, air compressors, air conditioners, etc.
If you have the type of recorder that can be run by batteries, remove the AC power cord and insert the proper batteries. Write a short program and then save it on cassette. Try to reload it and see if this helps. It should make no difference if the recorder is on AC or DC when you are loading the program back into the computer. Some recorders may however, have a problem keeping the drive motor operationg at a constant RPM when they are powered by pure DC current from batteries, so make sure the batteries are fresh.
If this does not help, then the DC power input into the computer may be the culprit. There are different methods of achieving this. The problems may be the 9-VDC power supply itself but again this is not usually the case. I replaced the 9-VDC power source for the computer with a 9-VDC battery such as the EVEREADY #276, the RAY-O-VAC #1603 or the DURACELL #.1603. CAUTION – OBSERVE PROPER POLARITY when using this method. IMPROPER POLARITY MAY CAUSE DAMAGE TO THE COMPUTER.
Fortunately, the CRT (TV) does not have to be turned off while you are saving a program because it imparts no electrical input to the computer.