Classic Computer Magazine Archive COMPUTE! ISSUE 56 / JANUARY 1985 / PAGE 124


High-Speed Tape Utility For Commodore 64 And VIC-20

Harrie De Ceukelaire

COMPUTE! has published many breakthrough pro­grams over the years. "TurboTape" takes its place among the very best of them. Though it sounds impossible, this clever and powerful utility actually allows a tape drive to save, load, and verify as fast as a disk drive! You simply type TSAVE instead of SAVE and your computer stores any program on tape at lightning speed. What's even more amazing, any Turbosaved program can be loaded without the special TurboTape utility in the computer. Even after you've used TurboTape for weeks, you'll still find it hard to believe that your cassettes can save and load this fast. It works on any Commodore 64 or VIC-20. (At least 8K memory expansion is re­quired to enter the program into the VIC.)

There are very few absolute rules in computing, but one of them has always been that tape drives are inherently slower than disk drives. Long programs that take only seconds to load into the computer with a disk drive have always required many minutes of waiting with a tape drive.

Until now.

"TurboTape" rewrites the rules. It's a utility program that turbocharges tape saving, loading, and verifying on your Commodore 64 or VIC-20. It requires no modifications to your computer or tape drive. It works with BASIC programs and machine language programs. It's easy enough for anyone to use, including beginners. It even lets you load Turbosaved tapes at TurboTape speeds without using the utility. And it's yours for the typing after reading these instructions. (Next month we'll publish the technical details explain­ing how TurboTape seizes control of the com­puter and makes it perform these startling tricks.)

If you're still as skeptical as we were, try TurboTape. Try the speed tests mentioned at the end of this article. You'll find that TurboTape is everything it claims to be.

Typing TurboTape

TurboTape is written entirely in machine language. The BASIC programs presented here create a copy of TurboTape on either disk or tape. Be sure to type in the correct program for your computer (Program 1 for the Commodore 64 or Program 2 for the VIC-20). We recommend that you enter the program with "The Automatic Proofreader" found elsewhere in this issue and save the TurboTape generator before running it for the first time, since the program resets important memory pointers as it runs. That way, if a typing error causes your computer to lock up, you can reset the computer by turning it off then on again, and start checking for the typo.

Since the TurboTape data goes into the area of memory where BASIC programs normally reside, you'll need to reconfigure memory before loading and running the TurboTape generator programs. For the 64, type:

POKE 44,14 : POKE 14*256,0 : NEW

Then hit RETURN and load Program 1.

To use Program 2 on the VIC, you'll need at least 8K of memory expansion. Before loading the program, enter the following lines in direct mode (no line number), hitting RETURN after each line:

POKE 44,32 : POKE 32*256,0 : NEW

POKE 648,30 : SYS 58648

Before running, check line 10. In both Programs 1 and 2, the contents of FI$ determines the name of the copy of TurboTape that will be created. Change this if you prefer a different name. Also, if you want to create your copy of TurboTape on disk instead of tape, change the D = l in that line to D = 8. Be sure that the tape or disk on which you wish TurboTape to be stored is in the drive before you run the generator program.

Once you have used the generator program to create a copy of TurboTape on tape or disk, you do not need the generator program again. The version of TurboTape you create (called TURBO/64 or TURBO/VIC, unless you change the names in line 10 of the generator programs) can be loaded and run like a BASIC program. It is not necessary to use the, 1 suffix (as in LOAD "filename",8,1 or, 1,1) when loading TurboTape. Once created, VIC TurboTape can be loaded and run on a VIC with any memory configuration.

Easy To Use

Here are the main features of TurboTape:

  • It will store itself safely out of the way of your normal BASIC programs.
  • It protects any memory configurations you might be using. Only during the Turbosaving and Turboverifying is the Commodore 64's BASIC ROM exchanged for BASIC RAM. Following these operations, your previous configuration is restored.
  • TurboTape can be used with other programming aids such as Simons' BASIC, Supermon, and PAL
  • TurboTape safely handles very large programs (up to 49K on the Commodore 64). However, some programs which barely fit into memory before may not fit when using TurboTape (it subtracts 639 bytes of available RAM from the VIC and 642 bytes from the 64).
  • Filenames can be the usual 16 characters long.
  • In addition to handling BASIC programs, TurboTape will save, load, or verify data from any part of RAM memory you wish, except for the RAM hidden beneath the Kernal ROM on the 64. RAM beneath the 64's BASIC ROM can even be saved.
  • A normal LOAD command will load any Turbosaved program at TurboTape speed.

It's quite simple to use TurboTape. Reset your computer by turning it off, then on. If you want to use some additional utility like Simons' BASIC, load and run it first. Then type NEW.

Now load TurboTape and run it. In the 64 version, a menu will appear, offering you two optional memory locations for TurboTape:

  1. In BASIC RAM. The ending address of the relocated TurboTape will be what's currently indicated as the limit of memory in the pointer in addresses 55 and 56. You may have to select this option if you want some utilities to coexist with TurboTape. Simons' BASIC, for example, is one. Any utility which makes use of the RAM between addresses 52606 and 53247 (for example, the "64 DOS Wedge") will require this option. (This is the only option possible on the VIC. The VIC version will always relocate to the top of memory.)
  2. In the 4K RAM buffer. Using this option, you can Turbosave all RAM from 0 to 52606 in one huge block (including the RAM hidden behind BASIC ROM).

To get accustomed to using TurboTape, however, let's avoid combining it with other utilities for now. Simply turn on the computer, load TurboTape, and type RUN (don't attempt to edit the BASIC portion of TurboTape). For the 64, select option 2.

Sit Back And Be Amazed

You will now see on screen where TurboTape has been located and the commands you use to activate TurboTape's features. Then type NEW to remove the TurboTape loader from memory. Write a program or load one into the computer. To Turbosave this program, type:

TURBOSAVE "filename" [press RETURN]

(Or you can abbreviate TURBOSAVE as TSAVE.) You'll then see the usual message:


Press those keys, then sit back and be amazed.

A header containing a special Turboload routine is written to tape. (On the 64, the screen will blank while the header is written.) Then rainbowlike colors will vibrate on screen as your program is flashed onto the tape. Finally, your screen will return to normal.

If you want to verify the TSAVEd program, rewind the tape and type:

TURBOVERIFY "filename" [press RETURN]

(TURBOVERIFY can be abbreviated TVERIFY.) You'll see the normal message:


Depress the PLAY key on the cassette drive. (On the 64, the screen will blank while the verification takes place.) If you should get an OUT OF MEMORY error message, simply type TVERIFY without a filename. As soon as the tape has passed the header, you get the usual message on screen. (For the 64, press the Commodore logo key.) If an error is found during TVERIFY, the screen will return to normal and you'll see the VERIFY ERROR message. If you're interested in knowing precisely where a mismatch was found, type:

?PEEK(172) + 256*PEEK(173)

If there was no problem during the TVERIFY, you'll see the message: VERIFY OK.

Lightning LOADs

You won't need the TurboTape utility to load programs which have been Turbosaved. Just type LOAD normally and everything will happen as it always does, except the program will zoom into your computer.

Here are a few additional notes about TurboTape. To save machine language programs, you'll need to specify the starting and ending addresses. For example, if your machine language program resides in memory from 864 to 890, save it in the following fashion:


Notice that you must use the ending address plus one. To save the entire contents of RAM on a 64, including the RAM hidden behind BASIC ROM, type:

TSAVE"ALL RAM",2049,52606

Most other programming utilities work well with TurboTape. If you use Simons' BASIC, however, you should avoid the RUN/STOP-RESTORE combination, and the COLD command has no effect. If you're also using the DOS wedge, choose option 1 to locate TurboTape into BASIC RAM memory to avoid conflicts on the 64.

Because of the high speeds, you might want to use only high-quality cassettes for reliable storage. TurboTape, like the normal SAVE/LOAD, will sometimes be unable to Turboload if a program was TSAVEd using a different cassette drive. This happens when a recording head on one of the drives is out of alignment. For very important programs, you may want to make a backup copy with the normal SAVE command. Although the standard SAVE is much slower, it is extremely reliable.

Another reason for making backup copies with the normal SAVE is that 64s cannot read tapes created by VIC TurboTape, and vice versa. This is a result of differences in the Turboload machine language routine, which we'll discuss next month.

You should use LOAD and the TurboTape commands only in direct mode, not from within a running program. Also, TurboTape cannot search through several files on a cassette in search of a certain filename. If you have several Turbosaved programs on a tape, you should fast-forward past any Turbosaved programs you don't wish to load. Use the cassette drive's counter for this purpose.

No Turbosaved program will relocate itself upon loading. The address in RAM memory from which you Turbosaved will be the address where the program will later load. In effect, all Turbosaved programs act as if you're using the nonrelocating command: LOAD "filename", 1,1. This is especially important if you're a VIC owner who uses several different memory configurations. For example, a BASIC program Turbosaved on an expanded VIC will not load normally into an unexpanded VIC.

How Fast Is It?

Tests here revealed that a 12K program took 34 seconds to load with a 1541 disk drive and 44 seconds to load with TurboTape. However, the TurboTape load time was actually only 28 seconds once the program header was located on the tape. We ran these tests by timing TurboTape with a completely rewound cassette, presuming that most people do not position the tape so that a program header is right in front of the tape head. If you do position your tapes exactly with the tape counter, TurboTape will indeed load programs faster than a 1541 disk drive.

Turbosaving the 12K program took 42 seconds; the 1541 disk drive took 40 seconds. Turboverify and disk verify took the same amount of time as loading a program.

TurboTape is one of the most interesting and useful utilities a cassette owner can possess. The story behind the TurboTape technique is fascinating as well. If you're interested in how TurboTape does its magic, look for "How TurboTape Works" next month in COMPUTE!.