Power C tutorial, part II - Copying to ramdisk

September 1, 2019

It’s been a while since my introductory post about Power C, and I thought it’s about time to follow up with a tutorial and demonstration of getting it to run from an REU ramdisk.

Prerequisites

A C64 computer or emulator (e.g. VICE)

computer or emulator (e.g. VICE) If running on real hardware: a 1764 REU cartridge, or a modern FPGA replacement, such as the 1541 Ultimate or the Turbo Chameleon.

cartridge, or a modern replacement, such as the 1541 Ultimate or the Turbo Chameleon. If running in an emulator, you’ll need to enable REU support.

support. A Power C ramdisk initialization disk

Side one and side two of the main Power C compiler disk.

Let’s get to work!

First, insert the ramdisk initialization disk and launch the BASIC program CSTART . You will be asked whether you want to initialize the ramdisk (Y/N), type Y. After setting up the ramdisk, and copying some files from the initialization disk, you will be prompted to insert the compiler disk. Insert side one and press enter. After copying some files (it can take a few minutes), you will be prompted to insert the libraries disk. Insert side two and press enter. Copying the libraries takes a looong time, so be patient. After all the libraries have been copied, you will be dropped right into newshell (a replacement for the original Power C shell designed to run from ramdisk). Voila!, Power C is now running from ramdisk. File I/O and compiling should now be much faster!

I recorded the whole process in action under VICE, to give you an idea of what is involved. You can view the recording at 3x speed below:

A few bits of advice

Copying Power C to ramdisk takes several minutes and requires two disk changes - definitely not something you’ll want to do before every coding session! If you’re using the VICE emulator, then you can save a snapshot of the emulator state after copying Power C to ramdisk, and just load that to continue working. If you’re using a real C64 with a 1541 Ultimate II or Turbo Chameleon II, you’ll want to create a snapshot of REU memory after copying Power C to ramdisk. Now, all that is needed in future is to load the RAMDOS driver , restore the REU snapshot, and launch newshell.

Some observations

While I’ve found working with Power C from ramdisk to be much faster and more convenient than without, there are some gotchas to be aware of:

Although compiling to ramdisk works, linking does not. The linker locks up (“freezes”) reading an object file from ramdisk . For this reason, I don’t use the ramdisk as my work disk, and compile to disk as per usual.

If you do decide to set the ramdisk as your work disk, be aware that even newshell freezes sometimes, in which case all your precious work will be gone!

Conclusion

This has been a brief tutorial to get Power C running from ramdisk, which greatly speeds up editing, compilation, and linking, making for a much more pleasant experience. Thanks for making it this far, and cheers.