Transferring Files to and from CP/M .D71 Disk Images Using ctools

  /     /   CP/M     Commodore     Emulation     Retro     Tutorial    

Using Vice to emulate a Commodore 128 running CP/M works very well, but it isn't easy to get CP/M files directly onto and off a .D64/.D71 disk image. The easiest way to do this under Linux is to use ctools.

Building ctools

First you need to get the source files for ctools, for this we can use wget:

$ wget
$ unzip

To build the executables:

$ cd ctools-master/src
$ make
$ make install

The executable files are now in ctools-master/bin. You will probably find it useful to copy them to somewhere like ~/bin to make them easier to access.

Using ctools

ctools is fairly straightforward to use and most of the time you will only use two of the programs: cformat and ctools.

Creating a Formatted CP/M Disk Image

cformat allows us to create CP/M disk images and I find it most useful to create double sided C128 disk images using the -2 switch.

To create a disk image called work.d71:

$ cformat -2 work.d71

Working With Files on the Image

Once we have a disk image we can transfer files, erase files, show the directory, etc using the ctools command.

To copy all the .txt files from the current directory onto the disk image, work.d71:

$ ctools work.d71 p *.txt

To display the files on the image:

$ ctools work.d71 d

To get all the .txt files from the disk image and put them in the current directory:

$ ctools work.d71 g "*.txt"

Video of ctools

ctools can be seen being used to transfer files to a .D71 disk image which is then read under an emulated C128 running CP/M on Vice below.

Creative Commons License
Transferring Files to and from CP/M .D71 Disk Images Using ctools by Lawrence Woodman is licensed under a Creative Commons Attribution 4.0 International License.

Related Articles

Emulating a CP/M System With z80pack

z80pack is great for creating an emulated CP/M system. It can either be used to create a general CP/M system or can emulate a specific system such as an IMSAI or ALTAIR including a graphical front-pan...   Read More

Adding a Basic Stub to a Vic-20 Assembly Language Program

To make machine language programs more friendly it is nice to add a basic stub which contains a line with a SYS statement to start the code. This is easy to do on the Vic-20 and the process gives you ...   Read More

Beginning Assembly Programming on the Commodore Vic-20

The Commodore Vic-20 is a great machine to learn an assembly language on. It was released in 1981 and was the first computer to sell one million units, which contributes to its popularity today. The ...   Read More

Connecting to a Remote Serial Port over TCP/IP

Most modern machines don't have a serial port as standard; you could use a USB to serial lead, however, if you have another machine available that does have a serial port you can access it remotely ove...   Read More

Emulating a DEC PDP-8 with SimH

The DEC PDP-8 mini-computer was launched on 22 March 1965 and was a great success. It was fairly cheap for the day and could easily be expanded. What attracts me most to the PDP-8 is its simple desig...   Read More

Sign up to get new articles straight to your inbox.

Delivered by FeedBurner


blog comments powered by Disqus