User Tools

Site Tools





Sidebar

tips

LOAD "TIPS & TRICKS"

Below are just a few simple tips and tricks I've come across, relating to the Commodore 64 and 128.

The C128

The quick way to load a disk

Just as you can quickly load the first program on a cassette tape on a C64, you can load the first program on a disk, on the C128, by pressing :shift: and :stop:. This automatically runs the command DLOAD“* , which will search for the first program on a floppy disk, load it and then run it.

Load and RUN a program with one command

Another way to LOAD and RUN a program from disk with one command is to use the RUN command, like this: RUN “program name” then press :return:.

Switch between 80 column and 40 column mode on-the-fly

You can easily switch back and forth, between your 80 column and 40 column monitor, by pressing the ESC key, followed by X.

Saving over an existing file on floppy disk

When you wish to save a file to floppy disk, with the C128, you simply need to enter the command: DSAVE “filename”. But if you wish to save over an existing file, you need to enter the command: DSAVE ”@filename“.

Display commands assigned to the function keys

By default, the C128's function keys have been assigned specific, frequently used commands to help save you some typing. If you've forgotten the commands assigned to the F-keys, simply type KEY and press :return: for a quick list.

Some enhancements to BASIC's screen editor

The C128 has some useful enhancements to it's BASIC screen editor. When entering code into your BASIC program, use these ESC key combinations to enhance your data entry:
ESC then A = insert text mode
ESC then C = turn off insert mode
ESC then I = insert a blank line
ESC then D = delete a line
ESC then J = goto beginning of line
ESC then K = goto end of line
ESC then Q = delete the line to the right of the cursor

Use the 128's keypad in 64 mode

Running this little program (while in 64 mode) will allow you to use the C128's number keypad, Scroll Lock, and cursor keys when you're in 64 mode. 128_Keys.d64

Using DOS commands with floppy disk 9

The C128 has some improved DOS commands, with BASIC 7.0. But, by default, these commands typically assume that disk drive #8 is the active drive. If you want to execute these commands (like DIRECTORY or BLOAD) on disk drive #9, you need to use U9 as the identifier, like this: DIRECTORY U9 or BLOAD”*“,U9

40 Column Word Wrap in CP/M Mode

Although you can use CP/M mode in 40 column mode, you need to scroll left and right to read the entire screen. You can, however, force CP/M to word wrap at 40 columns saving you from having to scroll left and right by typing in the following at the command prompt: device console [page columns=40] then :return:. Ensue that you have the CP/M utility disk in the floppy drive, which contains the DEVICE.COM file.

Use FAST Mode to Boost Speed to 2MHz

If you are not utilizing the VIC chip (in other words, running in 80 column mode), you can double the 128's CPU speed to 2MHz by entering the command FAST. If you need to go back to 40 column mode, enter the command SLOW to return to 1MHz mode and to activate the VIC chip.

The C64

The elusive SAVE@ bug

Some say it exists, others say it doesn't. But, there is a bug in the 1541 and 1571 DOS that can crop up under specific circumstances. BASIC 7.0 addresses this bug when you use DLOAD and DSAVE. But, if use LOAD and SAVE, to avoid having your disk directory corrupted by this bug, all you need to do is specify the drive number 0 to all of your disk commands, like this:
LOAD “0:filename”,8 and
SAVE “0:filename”,8 or SAVE ”@0:filename“,8.

View a file-specific disk directory

When loading and viewing a disk directory, there is a way to filter the list by file type. Here are the filters you can apply:
LOAD “$* = P”,8 for PRG files
LOAD “$* = S”,8 for SEQ files
LOAD “$* = U”,8 for USR files
LOAD “$* = R”,8 for REL files
This also works for the C128.

A “soft” reset button

Save some wear and tear on your C64's circuitry by performing a system reset, without a reset button. At the BASIC command prompt, type: SYS64738 and then press :return:. This will do a “soft” reset of the C64. But you can also turn the :restore: key into a reset button by typing in the command: POKE 792,PEEK(65532):POKE 793,PEEK(65533) followed by :return:. Now, when you press the :restore: key, it will reset the 64. After resetting, you will have to re-enter the POKE/PEEK commands to turn :restore: into reset again.

Stop the disk chatter - Originally published in Loadstar, issue #8

Here is a one line program that is ninety percent effective at stopping the chattering noise, when loading copy protected disk. This should be executed just before the commercial software is loaded. At the BASIC command prompt, type:
OPEN 15,8,15:PRINT#15,“M-W”;CHR$(106)CHR$(0)CHR$(1)CHR$(133):CLOSE15 then press :return: . After this is executed, load the software according to the publisher's direction.

Load and Run a BASIC program with one keystroke - Originally published in Loadstar, issue #10

You can automatically have the C64 run a BASIC program after loading it by pressing :rshift: and :stop: at the end of your LOAD command, like this: LOAD “program name”,8: then press the key combination :rshift” and :stop:. After the program is loaded, the C64 will immediately RUN it.

Print block size of program in memory

Use this line of code to find out how many blocks the program, currently in memory, will require to save to the floppy disk:
X=PEEK(45)+256*PEEK(46)-2049:PRINT INT(X/254)+1

Read the disk error channel

Tried to load a program from floppy disk but it didn't work and the red LED light on the 1541 is flashing? Use this short program to read and print out the disk drive's error channel:
10 OPEN 15,8,15
20 INPUT#15,F,E$,T,S
30 PRINT F;E$;T;S
40 CLOSE 15

A “soft” reset command for the 1541

If your 1541 disk drive develops an error that requires you to “reset” the drive, rather than power cycling the drive, try this command first: OPEN 15,8,15,“UI”:CLOSE 15.

Disk Command Flash Cards

If you're anything like me, trying to remember certain disk commands can be a challenge, especially if you haven't used them for a while. That's why I made myself these simple “flash cards” listing the most common DOS commands for the C64, C128 and the C64 DOS Wedge utility.

I've printed mine off onto 4×6 photo cards, which are the perfect size to stash away on my desk for easy reference when I need them. Feel free to download your own copy here:
disk-command-cards.zip (updated 2023-01-24).

Free to use for your own personal use.


1223 visitors

tips.txt · Last modified: 2024/04/11 23:16 by David