C64 OS USER'S GUIDE

Document version:

Chapter 2: Installation

Advanced VICE Configuration

This subsection of Chapter 2: Installation, discusses the advanced setup and configuration of the VICE emulator on Windows, for use with C64 OS. Advanced VICE configuration has the following steps:

  • Configure virtual 1351 Mouse
  • Set up KERNAL and drive ROMs
  • Set up storage devices
  • Create an uninitialized CMD HD hard drive image
  • Install CMD HD DOS on the hard drive image
  • Partition the CMD HD, and
  • Transfer C64 OS installation files from the Windows file system to the hard drive image.

Final installation instructions for C64 OS proceed using the installation instructions for CMD HD.

Important resource links required for CMD HD configuration are found at the end of this page. You should fetch these resource files ahead of time and have them ready to go before proceeding with this tutorial.

Special thanks to guest author, Paul Hocker, for the contribution of this VICE documentation.


Preparing VICE for Installing C64 OS

The instructions below assume you have a familiarity working with GTK VICE on Windows, and that you are familiar working with the settings for the emulator.

Although support for emulated CMD Devices like the CMD HD and RAMLink are new it is quite stable and is a wonderful platform to run C64 OS on.


Configure Virtual 1351 Mouse

Let's start by configuring the 1351 mouse as a Control Port 1 input device in VICE.

Select PREFERENCES > SETTINGS... from the menu. Select Control port from Input devices in the lefthand sidebar. From the Control Port #1 dropdown select "Mouse (1351)". Close this window and save your VICE settings.

Settings for 1351 Mouse
Preferences Settings for 1351 Mouse setup

When C64 OS is running, you can use the key combination of ALT+M to capture your mouse to VICE. Press ALT+M again to release the mouse back to Windows.


Configuration of VICE for Installing C64 OS

In order to install C64 OS on an emulated CMD HD with VICE there are few things we will need to setup before we get started. There are links at the bottom of this documentation to help you find the files you need. At the end of this section, we should have a functioning C64 emulated in VICE with a number of drives setup using JiffyDOS.

Requirements

  1. VICE >= 3.5 – this is the first version that supports CMD HD
  2. CMD HD Boot ROM >= 2.80 – this is the latest version and seems to work the best
  3. JiffyDOS – this really helps with navigation and speeds up C64 OS although it is optional
  4. CMD HD Utilities – this is optional as well but recommended, it has a file copy utility that is used in the tutorial
  5. Virtual Filesystem – familiarity with setting up a Virtual Filesystem on VICE. This is only needed during the installation to copy files. It is not required when running C64 OS.

Download VICE, VICE Version and Screenshots

The latest version of VICE can be downloaded for free at: https://vice-emu.sourceforge.io.

The screenshots used in this tutorial are from VICE v3.5 for Windows. The appearance of the options may differ slightly in newer versions of VICE.

KERNAL and Drive ROMs

To get started, let’s first configure VICE to use the CMD HD Boot ROM and JiffyDOS.

Seleect PREFERENCES > SETTINGS... from the menu. Next select "ROM" from the "Machine" section in the lefthand sidebar.

If you want to have JiffyDOS, under Machine ROMs, change the KERNAL ROM to use the binary located on your computer.

Select the JiffyDOS KERNAL ROM for the C64.
Select the JiffyDOS KERNAL ROM for the C64.

Then, modify the Drive ROMS to use the CMD HD Boot ROM and also change the 1541 ROM to use the appropriate JiffyDOS ROM.

Select the Drive ROMs for CMD HD and 1541.
Select the Drive ROMs for CMD HD and 1541.

Alternative Floppy Drive

If you want to use a different emulated floppy drive instead of 1541, please use the appropriate ROM for that drive instead.

At this point, SAVE your configuration by selecting PREFERENCES > SAVE SETTINGS from the MENU.


Setup Storage Devices

Next, we are going to configure the Drives that you will need for installing C64 OS.

For our configuration we are going to have Drive 8 loaded with the CMD HD Utilities disk. Drive 9 will host our CMD HD. Drive 10 will point to the location in the Windows File System of our C64 OS files for installation. Let’s get started.

Drive 8

First, configure your Drive 8 to use a compatible Floppy Drive, and one that you installed the JiffyDOS ROM for. In the image below I am selecting a 1541-II drive, but anything should work.

Make sure you save your VICE SETTINGS at this time.

Drive 8, 1541 configuration.
Drive 8, 1541 configuration.

After the drive has been configured, attach the CMD HD Utilities disk to your drive.

Select Attach disk image from the File menu, and select Drive 8.

Attach a disk image to Drive 8, 1541.
Attach a disk image to Drive 8, 1541.

And then attach the image containing the CMD HD Utilities. Make sure you do not select Autostart.

Attach CMD HD Utilities disk image.
Attach CMD HD Utilities disk image.

Now that the disk image is attached, let’s verify that the disk has what we need by using the @$ JiffyDOS command to view the directory on Drive 8. It should look something like the image below.

Listing directory contents of CMD HD Utilities disk.
Listing directory contents of CMD HD Utilities disk.

If you see the correct files then we can move on to the next topic.


Drive 9

Next we are going to setup Drive 9 to use a new CMD HD image from our computer.

Before we attach the image, we need to create it. And thankfully, the VICE team has made this easy for us. All we need to do is create a new file on our computer that has a dhd extension on it.

The simplest method I have found is to create a new text document on your computer.

Create empty text file.
Create empty text file.

And then rename that file to anything you want with a dhd extension. To make things simpler for us right now, rename the file to: C64 OS.dhd

Rename text file to C64 OS.dhd
Rename text file to C64 OS.dhd

Now that the image is created, we can attach it to our emulator.

First, we need to configure Drive 9 to emulate a CMD HD and optionally specify the size of the image.

Select CMD HD as the Drive Type for Drive 9, and enter a number for the size of the image. The default is 8G, and that has been more than enough for me. I have not tried any other sizes, so your mileage may vary.

Make sure you save your VICE SETTINGS at this time.

Drive 9, CMD HD configuration.
Drive 9, CMD HD configuration.

Now let’s attach the image we just created to Drive 9.

Select attach from the File menu, and pick Drive 9.

Attach a disk image to Drive 9, CMD HD.
Attach a disk image to Drive 9, CMD HD.

Next, find the image you just created and attach it. Again, make sure you do not select Autostart here.

Attach empty CMD HD disk image.
Attach empty CMD HD disk image.

Also, note that when you select the disk image VICE will not recognize the contents of the disk. This is completely normal, and you can ignore it for now. It will be fine after we are done.


Create System

The next step is very important, we need to create a new System Area on our new image. This needs to be done first before you can add any new partitions to your disk.

To start with, load and run the CREATE SYS program that is on your CMD HD Utilities disk.

Load and run CREATE SYS from the CMD HD Utilities disk.
Load and run CREATE SYS from the CMD HD Utilities disk.

Without JiffyDOS:

load"create sys",8
run

With JiffyDOS:

/create sys
run

When you run the program, you will be greeted with a screen that describes what this tool will be doing.

CMD HD Installation Mode.
CMD HD Installation Mode.

You will notice near the bottom, that the program is asking you to switch the drive into installation mode by holding the SWAP buttons down while pressing the RESET button. You can ignore this becuse the great VICE developers automatically put the drive in this mode when a new zero byte image is attached.

After you press ENTER, you will be greeted by another screen that gives you the option to change the starting block. There is no reason to change this, so you can just press ENTER to continue.

Clear area below system.
Clear area below system.

Next, you will be asked if you want to clear the area below the system. You should select Y here because we are not going to share the disk image with any other systems.

At this point, the computer will start building the system image on your disk. This is a good time to use the WARP MODE on VICE to speed up the process. You should see something similar to the image below when it is done.

Completed installation of CMD HD System.
Completed installation of CMD HD System.

After it is completed, you are asked to RESET the drive. This is easily accomplished by using the Drive menu on the VICE interface and selecting Reset Drive #9.

Resetting Drive #9.
Reset Drive #9.

However, in my experience, this does not work very well. Instead, the best course of action is to close and reopen VICE and then re-attach the disk images. This will ensure that space has been allocated for your image, and you won’t have to start over again if VICE crashes.

Pro Tip

Before continuing, make a copy of your image file so that you do not need to do this step again. I have a blank.dhd CMD HD image that I keep on hand so that I can copy it whenever I need, for other projects.


Create C64 OS Partition

Finally, we are ready to create a partition for installing C64 OS. Sometimes, the RESET does not work here and you will be forced to restart VICE and re-attach the disk images. I am not sure if this is a bug in VICE or in the way I am doing this process.

Load and run the HD-TOOLS.64 program which will let us add some partitions to this new disk image.

Load and run HD-TOOLS.64 from the CMD HD Utilities disk.
Load and run HD-TOOLS.64 from the CMD HD Utilities disk.

Without JiffyDOS:

load"hd-tools.64",8
run

With JiffyDOS:

/hd-tools.64
run

After running the program, you will be greeted by a message asking you to put the CMD HD into configuration mode.

The CMD HD must be put in configuration mode.
The CMD HD must be put in configuration mode.

This time, we will need to do this. Again, the VICE team has made this easy for us by putting it on the DRIVE menu.

Reset Drive #9 to configuration mode.
Reset Drive #9 to configuration mode.

After you have selected to go into configuration mode, you can press enter and you should now see the menu. There might be a slight delay until the drive gets into the correct mode.

HD-TOOLS configuration menu.
HD-TOOLS configuration menu.

From the menu, select option 4 which will then load the partition editor. By default, you will be dropped into creating a new partition. The settings you want for the partition are shown in the image below.

Create new partition.
Create new partition.

Make sure that you have selected NATV or Native type for the partition, and also make sure you have allocated the maximum number of blocks by pressing the MINUS key which will give you 65280 blocks total. You can name the partition anything you want.

After you press ENTER on the name field, you will be asked it you want to WRITE NEW TABLE TO HD, press Y here to permanently save your changes.

Write the new partition table.
Write the new partition table.

You should then be taken back to the main menu. From here I like to validate that my partition was created by doing a couple of things.

First, I use menu option three to view the current partition table. It should look similar to the image below with the new partition we just created.

View current partition table.
View current partition table.

The other method is to drop back into BASIC and actually view the partition using JiffyDOS. Like before, you can try to use the Reset Drive #9 option, but I have found that this does not work very well. Instead, simply close and reopen VICE and then re-attach the disk images again.

Note

This is the last time you will need to do this. I promise.

Notice now that when you re-attach the CMD HD image, that you will see a beautiful image of your new partition that you just created.

Attach partitioned CMD HD disk image.
Attach partitioned CMD HD disk image.

You can even verify this more by changing the default device using JiffyDOS and then viewing the directory.

List directory of Drive 9.
List directory of Drive 9.

Congratulations, your CMD HD image is now ready to install C64 OS. But, we have one more setup step to complete before we can begin.


Drive 10

In this step, we are going to configure Drive 10 to use our computer's filesystem as a disk, and point it to the location where we have the installation files for C64 OS.

Let’s go into VICE settings and enable using the Virtual Filesystem by enabling the Enable virtual devices setting. I have found that this gives you a little faster disk access, especially when copying.

Enable virtual devices.
Enable virtual devices.

Next, we want configure Drive 10 to use a Virtual Filesystem by setting the drive type to None, enabling the IEC-device option and then selecting Host file system from the IEC-Device type dropdown. In the end you have something similar to the following.

Enable host file system IEC-device.
Enable host file system IEC-device.

Then, set the location of the C64 OS installation files by specifying the directory in the Filesystem Device directory for Drive 10. Also make sure that the Allow filenames longer than 16 characters option is enabled as well. It should look similar to the image below.

Configure virtual filesystem options.
Configure virtual filesystem options.

Lastly, let’s verify that we can see the files on Drive 10 by showing the directory with JiffyDOS.

Listing directory contents of virtual filesystem.
Listing directory contents of virtual filesystem.

Congratulations if you have made it this far. You are almost ready to install C64 OS. Save your VICE settings.


Copy C64 OS Files to CMD HD Partition

The last step before installing C64 OS is to copy over all of the installation files to the new partition you created on your CMD HD image.

If you set up VICE to use JiffyDOS for the C64's KERNAL ROM image, you can use JiffyDOS's built-in two-drive file copier. If you are not using JiffyDOS you can use FCOPY described below.



JiffyDOS Two-Drive Copier Method

The way this works is, you use a command to set the source device number, and another command to set the destination device number. Then you use a copy command 4 times to copy the 4 C64 OS installation files.

The source device # is 10, the Windows File System. The destination device # is 9, the CMD HD partition. The four files to copy are called, c64os, c64os setup, c64restore and lastly restore.car. Restore.car is a large archive file that will take several minutes to transfer so we'll copy it last.

@#10
@x9
*"c64os"p
*"c64os setup"p
*"c64restore"p
*"restore.car"s

Press ENTER after each line, the first line sets the source device to 10, the second line sets the destination device to 9, the lines that start with * are the copy commands. After you press ENTER on each of the copy commands you have to wait until that file has finished copying.

The letter at the end of each copy command sets the CBM File Type of the copied file in the CMD HD partition. p is for PRG, s is SEQ. The first three files should be PRGs, but the restore.car file should be copied as a SEQ. The file types listed in the Windows File System, device 10 directory, don't matter.

While restore.car is copying, that would be a good time to turn on WARP mode. It may still take a few minutes even in WARP mode. After all four files have been copied you can skip straight to the section, Install C64 OS, below.



FCOPY Method

Load and run the FCOPY program from the CMD HD Utilities disk in Drive 8.

Load and run FCOPY from the CMD HD Utilities disk.
Load and run FCOPY from the CMD HD Utilities disk.
load"fcopy",8
run

When you first run FCOPY you should see a screen similar to the one below.

FCOPY main screen.
FCOPY main screen.

Notice the instructions on the bottom for changing various settings for copying. The interface is not the most intuitive, but if you follow the instructions below you should be in good shape.

First, let’s change the SOURCE device by pressing F1 until it shows Device #10. You will notice that the Device Type is showing as ????. This is perfectly normal and can be ignored.

FCOPY source device.
FCOPY source device.

Next, change the TARGET device by press F5 until it shows our CMD HD on Device #9. The Drive Type should also show that it is a CMD HD. If not, go back and check your configurations from before.

FCOPY target device.
FCOPY target device.

Next, you need to make sure that the partition we created is showing in the TARGET Device. Use the F7 key to pick the C64 OS partition. Doing this should automatically set the default path to be // which is also what we want.

Next we need to pick the files we want to copy from the SOURCE to TARGET device. Press the F key, which should prompt you for a pattern, press ENTER and you should now see a list of files. Press ENTER four times to select all the files (or you can also press T to toggle all files) for the C64 OS installation. Your screen should look similar to the image below.

FCOPY select all files from source device.
FCOPY select all files from source device.

Editorial Note

I was unable to make this work in VICE 3.6 for Mac. FCOPY could not load the files from the virtual hosted file system. If you encounter the same problem, you'll have to use JiffyDOS and the two-drive file copier method described above. —Greg.

Now, press the C key to copy, and then press R to select the option to replace files that are existing. It will ask you to insert the TARGET disk, which is already present, so you can just press ENTER to start copying the files.

FCOPY copying the C64 OS installation files.
FCOPY copying the C64 OS installation files.

The RESTORE.CAR file will take the longest to copy. Feel free to use WARP speed to make it go a little faster. But even in WARP mode, it still takes a few minutes to copy over. Have patience.

Possible error during copy

If you ever see the status for Drive 9 show that it is on Track 99 for a very long time when it is copying, then an error occurred during copy. If this happens you will need to format the partition and try the copy again. I am not sure if this is a bug with VICE, or the order in which I do things. It usually works very well for me.

Formatting the CMD HD Partition is very easy, it's the same command as formatting a 1541 floppy disk.

Without JiffyDOS:

open15,9,15,"n:c64os":close15

With JiffyDOS:

@"n:c64os",9

After the copy is complete you should see a screen like below asking if you want to make another copy. From here you can select NO and then exit the program with back arrow ←

FCOPY copying completed.
FCOPY copying completed.

Install C64 OS

Congratulations, you are now ready to install C64 OS.

At this point you can remove Drive 10 from your configuration as you will no longer need the Virtual Filesystem for the installation. In fact, I recommend you don't have it active while installing C64 OS.

Before we begin, let’s make sure that we have all the files we need. We can do that by simply listing the directory for Drive 9.

Listing directory contents of CMD HD partition, drive #9.
Listing directory contents of CMD HD partition, drive #9.

Load and run the C64OS program from Drive 9.

From here, you can follow the instructions in Chapter 2: Installation for a normal CMD HD installation.

Installation device and partition numbers

During the installation process, make sure you specify device 9, partition 1 as your installation device and partition, rather than device 12 shown in the standard CMD HD installation instructions.


Important Resource Links for VICE installation

You need the CMD HD Boot ROM to use a CMD HD dhd image in VICE. This ROM image can be purchased from Retro Innovations, here:

https://store.go4retro.com/commodore/cmd-hdd-boot-rom-2-80-binary-image/

To manage the CMD HD and to create new partitions, you also need the CMD HD Utilities disk image which you can download here.

Although JiffyDOS is not strictly required to use C64 OS, it is highly recommended for its speed and device compatibility. It also adds some much needed features to your C64's READY. prompt. A JiffyDOS C64 KERNAL ROM image can be purchased from Retro Innovations, here:

https://store.go4retro.com/jiffydos-64-kernal-rom-overlay-image/


Next Chapter: Configuration and Settings

Table of Contents



This document is subject to revision updates.

Last modified: Sep 10, 2023