User Tools

Site Tools


This is an old revision of the document!

Tools for putting files into a .d64 image

By Frantic.

When coding on a PC or Mac, you probably use some editor which is capable of executing other programs by pressing keys like CTRL+F1 and so on (after some configuration). Personally I use this to call makefiles, which in turn calls all the crunchers, assemblers and whatnot, but you could also call the programs directly from your editor.

There are a few tools out there which allows you to put the files of your coding project onto a .d64 image, before transferring it to a C64 or executing it in an emulator.


If you have VICE installed, then you already have this tool on your computer. It allows you to do various operations on .d64 images, such as creating them and writing files to them. You can do several operations in one single call to c1541, as seen in this example:

c1541 -format diskname,id d64 my_diskimage.d64 -attach my_diskimage.d64 -write my_program.prg myprog

This will create a new .d64 image and write the file “my_program.prg” onto the .d64 image with the name “myprog”. The last parameter could be left out, and the file would be named “my_program.prg” on the disk image too. The available options for c1541 looks like this:

  @ [<command>]
  ? [<command>]
  attach <diskimage> [<unit>]
  block <track> <sector> <disp> [<drive>]
  copy <source1> [<source2> ... <sourceN>] <destination>
  delete <file1> [<file2> ... <fileN>]
  dir [<pattern>]
  extract [<unit>]
  format <diskname,id> [<type> <imagename>] [<unit>]
  geosread <source> [<destination>]
  geoswrite <source>
  help [<command>]
  info [<unit>]
  list [<pattern>]
  name <diskname>[,<id>] <unit>
  p00save <enable> [<unit>]
  read <source> [<destination>]
  rename <oldname> <newname>
  show [copying | warranty]
  tape <t64name> [<file1> ... <fileN>]
  unit <number>
  unlynx <lynxname> [<unit>]
  validate [<unit>]
  write <source> [<destination>]
  zcreate <d64name> <zipname> [<label,id>]


c1541 works fine for most purposes, but some of the better coders around says it is buggy, and thus there is also cc1541. cc1541 also supports some more advanced options which gives you better control over how the files are actually laid out onto the image. The available options goes like this:

Usage: cc1541 -niSsfw image.d64

-n diskname   Disk name, default='default'
-i id         Disk ID, default='lodis'
-S value      Default sector interleave, default=10
-s value      Next file sector interleave, after each file
              the interleave value falls back to the default value set by -S
-f filename   Use filename as name when writing next file
-w localname  Write local file to disk, if filename is not set then the
              local name is used. After file written filename is unset
-x            Don't split files over track 18 hole (default split files)
-t            Use track 18 to also store files (makes -x useless) (default no)
-4            Use tracks 35-40 with SPEED DOS formatting
-5            Use tracks 35-40 with DOLPHIN DOS formatting

mkd64 & copy2d64

In the k2xtools collection there are also two tools called “mkd64” (to create d64 images) and “copy2d64” (to copy files onto the d64 images). I don't have them installed on my computer at the moment, so I cannot provide a list of the available options, but at least I remember that these tools worked just fine when I used them a few years ago.


At least in the Mac version of VICE you can also enable an option which makes sure that .prg files are automatically put onto a temporary .d64 file before they are executed. This may be handy if you are testing a program which only consists of one single .prg file, and no other loading of files from within your .prg.

base/tools_for_putting_files_into_a_.d64_image.1429238056.txt.gz · Last modified: 2015-04-17 04:34 by