Classic Computer Magazine Archive CREATIVE COMPUTING VOL. 11, NO. 6 / JUNE 1985 / PAGE 96

Speed up your disk drive; protect your programs; and check your file space. (Commodore's port) Robert Alonso.

Speed Up Your Disk Drive; Protect Your Programs; and Check Your File Space/Robert Alonso

C64 owners tell me they are wondering if their machines will soon suffer the fate of the Vic 20. Many are afraid that the supply of software and hardware add-ons will dry up.

Relax, Commodore has all but sworn that your 64 will not become obsolete in the foreseeable future. The new C128 comes equipped with a C64 mode that makes it completely compatible with existing software. This compatibility will probably help Commodore sell millions of C128s and as a side benefit will provide for C64 owners a generous selection of good software. I predict that most software companies will design software run on the C64 to maximize their potential market.

In the meantime, those of you looking for a book that can really teach you some machine language should take a look at Machine Language For The Commodore 64 And Other Commodore Computers. It is written by Jim Butterfield, perhaps the renowned Commodore expert, and published by Brady Communications Company. The book has the standard explanations of hexadecimal, memory, and instruction sets, but what makes it unique is its detailed discussion of ROM routines and important memory locations. Another welcome feature is the presentation of all listings in one format. The book includes a listing for a monitor program in Basic loader format that allows you to type in the other listings from the book without modification. The exclusive focus on Commodore machines is also a big plus.

Printer Interface

Another useful item for Commodore users is the Micro World Micrografix parallel printer interface. It allows you to use printers with Centronics inputs, like Epsons, with your 64 or Vic. It provides virtually complete Commodore printer emulation to diminish, if not eliminate, some of the problems encountered when trying to run prepackaged software with non-Commodore printers. Internally, it has slots available for the addition of up to three chips that upgrade the interface with a 4K RAM buffer. This is a big plus, if you don't like waiting around for the printer to finish.

For those who already have a Micrografix interface, the chips that you need to upgrade it are one 74LS10 and either one or two 6116 chips. The first is a buffer control chip, and the 6116 is a 2K RAM. You can insert them yourself, because the 6116 is a bit larger (no pun, really!) than the 74LS10. There is no way to mistake which goes where. The interface is available from Micro-W. Distributing.

Doctor Creep Makes House Calls

For you gamers who prefer just to have fun with your 64s and leave programming and interfacing to others, there is a new and exciting game from Broderbund Software. It is called The Castles Of Doctor Creep.

Dr. Creep, by Ed Hobbs, is a program that seems designed to showcase the unique powers of the 64. There is a hires title screen (apparently done on a Koala Pad, by the way), multi-voice music with interludes that echo in different sounding instruments, what appear to be multi-color custom characters, and sprites for animation.

Dr. Creep is a joystick controlled adventure game with graphics. You won't ever have to type GOEAST in this game. It is, however, much more than just an adventure. It is more like a puzzle, an arcade game, and an adventure all wrapped up in one neat package. There is an on-disk tutorial to step you through all the perils and responses that are available. You can save and resume a game from disk at any time, and can choose from among 13 castles with names like Freedonia, Lovecraft, Teasdale, and Parthenia. Avoid Parthenia, though; it is the most frustrating castle of them all. I can't go into details about it, but let it suffice to say that it appears infinitely regressive.

A Faster 1541?

Believe it or not, you can speed up your Commodore 1541 disk drive. The best part of it all is that you won't have to change any chips in the drive or even open it up. Datamost has released a program called Kwik-Load that makes your 1541 load programs 300% faster. It's true. The disk is selling for $19.95 at most stores and comes with a very handy disk editing and disk copying utility. The disk copying utility will copy individual files or the entire disk on either a single drive or two drives at similar speeds.

Considering the price and the utility of the program this is a great buy. You should be warned, however, that Kwik-Load will not work with programs that load into the 4K of memory on the 64 that begins at 49152($C000). It uses part of this section of memory for its own operation and temporary storage.

Three New File Types

Datamost has released a new book, Inside Commodore DOS (see Book Reviews section in this issue), which discusses an otherwise undocumented file type called a DEL (delete) file. The authors give instructions on how to create a DEL file and in how to load it and have it work like a program file. However, they fail to mention two other peculiar file types that are loaded similarly. These two file types are documented, but the implementation that follows is not.

Try the following next time you have finished programming something on your 64. Instead of saving your file with just a filename, save it with a filename followed by either a ,S or a ,U:

Save Procedure:

SAVE"filename,S',8 or


Load Procedure:

LOAD"filename,S',8 or


When you save a file using this technique, you save the program that you were working on in program file format with SEQ (sequential) or a USR (user) designation in the directory header. This kind of designation in the directory is more than just cosmetic; it is a neat trick for protecting a program. The reason for this is that you can load it only with the corresponding ,S or ,U tagged after the filename. Any attempt to load the file without the addition will cause a disk error, and the computer will not load the file. If you are the only one in your house or user group who knows this trick you can then enjoy a bit of privacy for your programs.

More DOS

The March "Commodore's Port' featured a machine language utility that counted the number of free blocks available on any disk. That short utility was written more as a demonstration of machine language than as a valuable utility. It can, however, be very useful if you are writing a database and need to know the available space on the disk before writing out any data.

The machine languare program was written so that it would work on both the MSD disk drives and the Commodore 1541; I did not use any drive specific coding.

There is, however, a faster and shorter way to find out how many blocks are free on a disk. It is so fast that it is acceptable even in Basic. The only drawback is that it can be used only with the 1541 disk drive. It uses two memory locations which are specific to the 1541 disk drive.

I have been able to locate the corresponding memory locations on the MSD drives, but, unfortunately, they do not behave the same way. The 1541 updates the two memory locations every time any type of disk access is attempted. This is probably due to its automatic initialize feature. The MSD drives will update corresponding memory locations only when an attempt is made to read the directory. There is, thus, no advantage to using the MSD locations.

The locations for the MSD double disk drive are 1314 and 1315 for drive 0 and 1378 and 1379 for drive 1. You could insert these numbers for the values of ML and MH in lines 165 and 180 respectively. Locations 1314 and 1378 should be set equal to ML and locations 1315 and 1379 should be set equal to MH.

Listing 1 will allow you to use only one pair at a time (1314, 1315 or 1378, 1379). It will work without modification on the 1541 disk drive. Lines 170 and 185 are used to read the value in the memory locations specified by ML and MH. This is the standard way to read memory locations within the disk drive and is the equivalent of a PEEK command in Commodore Basic.

Table: Listing 1. Fast blocks free.

Photo: The Castles of Dr. Creep