Classic Computer Magazine Archive COMPUTE! ISSUE 20 / JANUARY 1982 / PAGE 156

Tape Load Test And Head Alignment

Louis F. Sander Pittsburgh, PA

This article shows how to prepare and use a special test tape for the cassette recorder of any PET or CBM. When the tape is LOADed, its contents appear on the screen, allowing the user to see any tape errors as they occur. The tape error display is a sensitive indicator of the overall quality of the tape reading process, and one which can be used in curing such mysterious and aggravating problems as defective tapes and dirty or magnetized heads. The test tape can also be used as a working standard for head alignment.

Making The Load Test Tape

The first step in creating your tape is to enter and SAVE the "Test Tape Maker" program that appears later in the article. Then RUN it and follow the instructions on the screen, but be sure you understand the material in this section first.

The instructions ask you to use your Machine Language Monitor. Don't worry if you've never used it before — it's easy. If you have an older PET with Original ROMs, LOAD your monitor from tape and RUN it, being careful not to lose the "Test Tape Maker" instructions from the screen. With any other ROMs, you have a built-in monitor. Activate it by entering SYS 1024.

Once the monitor is running, it will prompt you with a dot. Mount a fully rewound tape, and save the 1st pass program by entering the indicated line exactly as it appears in the "Test Tape Maker" instructions. Then rewind the tape again, and prepare to do something unusual — you are going to record a new header on top of the one already on the tape, but you're going to leave the rest of the tape unchanged! You will do it by initiating another machine language SAVE, this time hitting STOP as soon as the header has been recorded on the tape. Knowing when to hit STOP is the tricky part, but the following paragraphs will teach you the trick.

If you can hear your tapes as they save, your task is easy. Some CB2 amplifiers amplify tape sounds, too, and you're in luck if yours works this way. If it doesn't, just connect your amplifier temporarily to pin eight of the user port connector, which is a convenient pickup point for the Tape Write signal. When you initiate your save, you'll hear about ten seconds of leader tone, followed by three seconds of buzz, followed by two more seconds of leader and a lot more buzz. The three seconds of buzz is the tape header, so you'll want to hit STOP the instant you start hearing the second section of leader tone.

Even if you have no way of listening to your SAVEs, you can tell when to hit STOP in making this tape. First, SAVE any program into a fully rewound tape. Then fully rewind it again and LOAD it, using a stopwatch to time the interval between pressing PLAY and seeing the FOUND message on the screen. Then, when recording LOAD TEST, wait exactly this length of time between pressing PLAY & RECORD and hitting STOP. On my PET, this is just over 13 seconds, and it should be the same on yours, but you should use a stopwatch to be sure.

Now that you know when to hit STOP, let's go back to "Test Tape Maker." Use the Monitor to save LOAD TEST onto the rewound 1st pass tape, making the exact entries appearing on your screen. Press PLAY, and as soon as the header has been recorded (the right number of seconds, or the appearance of the second leader tone), hit STOP. The STOP key on the computer is preferable to the one on the recorder, but either one will work. The timing of this move is critical to a fraction of a second, so use your fastest finger.

As soon as you hit STOP, your tape is finished. To be sure you have a good one, rewind it and LOAD it. If all is well, you will see the FOUND LOAD TEST and LOADING messages; then your screen will begin to fill with solid green (or white) squares. Once the screen is full, these will be replaced one-by-one with a full screen of colons, then a screen of shaded squares, then one of minus signs. Finally, an OK will print at the bottom of your screen, and after about 30 seconds, a READY message will appear somewhere on screen. No other characters should appear at any time. The newer machines with dynamic RAMs will not show the last two screens, and 80 column machines will combine the first two on one screen. If you cannot get the perfect "LOAD" described above, either you have made a defective tape, or you have a problem with your recorder. Clean and demagnetize your heads1, and try a few more loads. If you still don't achieve perfection, try making a new LOAD TEST tape — you may have hit STOP too soon or too late, or you may be working with a defective cassette.

When you have a tape that loads perfectly at least once, load it several more times in succession. You should get perfect or near-perfect results every time. Anything other than smooth screen filling, with no unusual characters, is an indication of an imperfect load. If you fail to achieve perfection, refer to the material in the next section. Otherwise, consider your test tape ready for use. Mark it with the date it was made, and set it aside in a safe place. If you want a second copy, use "Test Tape Maker" to create one, since there is no way to copy a completed tape. It's a good idea to put a copy of "Test Tape Maker" immediately after LOAD TEST on your tape, so you will have both of them whenever you need them.

Using The Test Tape

Now, whenever you have trouble LOADing a tape, you can evaluate the situation by loading LOAD TEST. If the screen fills properly, you know that your PET worked perfectly during the LOAD. The trouble is probably with your tape — it may be defective, or it may have been made on a recorder whose head is not aligned with yours. Read the Head Alignment section below.

If your screen doesn't fill properly, there may be a problem with your machine, and you can use the screen display to evaluate it. Every improper or misplaced character on the screen represents a mishandled byte. By using the second program copy recorded on every tape, PET can automatically correct up to 31 of these. LOAD TEST, by the way, lets you see this as it happens, when "proper" characters appear on the screen in place of the "bad" ones during the 30 seconds just before the READY message. Normally, you should have very few, if any, mishandled bytes. The more you have, the greater your problem. If you have more than a very few, even though PET can correct them, something is awry with your machine's LOAD process, and corrective action is called for.

The first corrective action, of course, is to clean and demagnetize your tape heads1. The second is to clean the contacts on the connector and the circuit board where your recorder plugs into your computer. If these steps fail to improve your situation, try a head alignment. If that also fails, see your serviceman.

Head Alignment

For a tape to load properly, your PETs read/write head must be precisely aligned with the magnetic field on the tape. The tape's field is, of course, perfectly aligned with the head of the recorder that made it. A small amount of misalignment between tape and read head often shows up as mishandled bytes, a moderate amount as a ?LOAD ERROR, and a large amount as a complete failure to read the tape.

Misalignment can occur with one of your own tapes if your machine's alignment has changed since you made the tape. It also occurs if a tape you are trying to read was recorded on a machine whose head is out of line with yours. Imperfect alignment between two PETs is quite common, and is often the cause of inability to load other people's tapes.

You can use your LOAD TEST tape to bring any recorder's head into alignment with the head that made LOAD TEST. Adjustment procedures have been published elsewhere2. Once you know how to make the adjustment, just load your test tape into the appropriate machine and adjust its head for perfect screen patterns. There is no need for any PEEKs to confirm the success of the LOAD, since you can see every mishandled byte right on the screen itself. You can even use LOAD TEST to adjust the head while the tape is loading, since it gives you 20–40 seconds of real-time feedback on the quality of your LOAD.

Always remember that you are adjusting the read head to the tape that it is reading. If the recorder which made it was misaligned from "standard," your test tape will be misaligned as well. Nevertheless, you should be able to get any recorder to read it. Now that you know how to make and use a "Load Test" tape, you need read no further. If you're interested in how and why it works, read on.

Theory Of Operation: Screen Images

Let us consider what is recorded on the Load Test tape. By a series of POKEs, "Test Tape Maker" created a machine language "program" of 1024 "square," 1024 colons, 1024 shaded squared, 997 minus signs, a space, an 'O' and a 'K', all in memory locations 2768 to 6839, (0AD0 – 1AB8 hex). When you saved that material as 1st pass, you made a tape whose header instructed PET to load it into those locations3. When you rewound the tape and did the second "computus interruptus" SAVE, you recorded a new header over the old one, but left the remaining material intact. The new header asks PET to load that material into memory locations 32768 – 36839, (8000 – 8FE8 hex), which are very interesting locations.

Experienced PET owners know that "screen memory" occupies the 1000 locations between 32768 and 33767. POKEs to those locations, (such as POKE 33000,42), cause characters to appear instantaneously on the screen. "Load Test" uses a less-well-known fact about screen memory: that POKEs to the screen memory locations plus 1024, (and on some machines 2048 or 3072), will also put characters on the screen. Clear your screen and POKE (33000 + 1024), 42 to see it for yourself. This multiple POKEability exists because of a peculiarity in PET's address decoding scheme; there really isn't any memory up there. These second, third, and fourth addresses for each screen position are sometimes called "images" of screen memory.

A little reflection on the above paragraphs will reveal that locations 32768 through 36839 include the screen memory plus its images, and that LOAIDing a program there will actually put the program material onto the screen up to four times in succession. There we can see the LOAD, and any errors, with our own two eagle eyes.


  1. "Getting the Most From Your PET Cassette Deck," COMPUTE!, #10, March, 1981, page 42.
  2. "Detecting Loading Problems and Correcting Alignment on Your PET,"'COMPUTE! #8, January 1981, page 1 14.
  3. "All About LOADing PET Cassettes," COMPUTE! #16, September, 1981, page 129.
110 FORI = 27 63TO37:POKEI, 160:NEXT
120 FORI = 379 2TO4815:POKEI,58:NEXT
130 FORI = 4816TO58 39:POKEI,102:NEXT
140 FORI = 5840TO68 36:POKEI,45:NEXT
150 POKEI,32:POKEI + 1,15:POKEH-2,11
180 IFPEEK(50003)=0THEN 310
190 PRINT". S"CHR$(34)"1ST PASS"CHR$(34)",01,0AD0,1AB8"
210 PRINT". S"CHR$(34)"LOAD TEST"CHR$ (34) " ,01 ,8000 ,8FE8"
310 PRINT" S 01,1ST PASS,0AD0,1A B8"
330 PRINT".S 01, LOAD TEST,8000,8FE8"
340 GOTO220