Close

How to make custom Virtual Disk images

A project log for A 4$, 4ICs, Z80 homemade computer on breadboard

No iron, no cry! Build a mini 4MHz Z80 64kB RAM system with Basic and Forth interpreters, CP/M 2.2, QP/M 2.71, Assembler and C toolchains

Just4FunJust4Fun 05/29/2017 at 14:291 Comment

To do that you need two really powerful tools: Cpmtools to create CP/M disk images and SRecord to manipulate ROM/EPROM images.
Take in account that the structures of the virtual disk 0 and 1 of the Z80-MBC are different. Disk 0 has the two first tracks reserved for the system image (loaded into RAM by the CP/M loader), instead disk 1 doesn't have this "reservation". This means that the images have a different "structure". More, because disk 0 must have the system image inside the two first tracks, the disk 0 image creation will be different if the OS is CP/M rather than QP/M.
So to make things easier I've prepared some batch file to simplify the needed operations.
As for the Assembler and C toolchains you need a Windows host or VM.


Here all the steps to set up the needed tools:

  1. Create a working directory on your Windows Machine;
  2. Download Cpmtools and unzip in your working directory;
  3. Download last version of SRecord and unzip in your working directory;
  4. Download from the Files section CPMtools-custom.zip and unzip the files into the directory containing the Cpmtool executables (as cpmcp.exe). During the copy overwrite the file DISKDEFS because the new one contains the needed definitions for the Z80-MBC;
  5. Download from the Files section SRecord-custom.zip and unzip the files into the directory containing the SRecord executables (as srec_cat.exe).

Now you are ready to create your custom image. First create a sub-directory (called e.g. CPM-files) in the cpmtools directory to store all the files to load in the disk image. Check that they fit into the 128kB avaliable space.


Steps to create a Disk 1 image

  1. Go to the cpmtools directory and with an editor modify/add/delete in the file MakeDisk1.bat the various lines "cpmcp -f z80mbc-d1 %dskfile% CPM-files\xxxxx.yyy 0:xxxxx.yyy" to match the directory in your host (if needed) and all the files to load (xxxxx.yyy);
  2. From the cpmtools directory open the provided DOS command shell and give the following command (I'll use here the name disk1.dsk for the disk image file):
    MAKEDISK1 disk1.dsk
  3. After the execution copy the file disk1.dsk in the SRecord directory;
  4. Go to the SRecord directory, open the provided DOS command shell and give the following command:
    D1TOHEX disk1.dsk
  5. After the execution you will find four files named from disk1_SEG0.hex to disk1_SEG4.hex to upload into the virtual disk with iDisk.


Steps to create a Disk 0 CP/M image

  1. Go to the cpmtools directory and with an editor modify/add/delete in the file MakeDisk0CPM.bat the various lines "cpmcp -f z80mbc-d0 %dskfile% CPM-files\xxxxx.yyy 0:xxxxx.yyy" to match the directory in your host (if needed) and all the files to load (xxxxx.yyy);
  2. From the cpmtools directory open the provided DOS command shell and give the following command (I'll use here the name disk0CPM.dsk for the disk image file):
    MAKEDISK0CPM disk0CPM.dsk
  3. After the execution copy the file disk0CPM.dsk in the SRecord directory;
  4. Go to the SRecord directory, open the provided DOS command shell and give the following command:
    D0TOHEXCPM disk0CPM.dsk
  5. After the execution you will find four files named from disk0CPM_SEG0.hex to disk0CPM_SEG4.hex to upload into the virtual disk with iDisk.


Steps to create a Disk 0 QP/M image

  1. Go to the cpmtools directory and with an editor modify/add/delete in the file MakeDisk0QPM.bat the various lines "cpmcp -f z80mbc-d0 %dskfile% CPM-files\xxxxx.yyy 0:xxxxx.yyy" to match the directory in your host (if needed) and all the files to load (xxxxx.yyy);
  2. From the cpmtools directory open the provided DOS command shell and give the following command (I'll use here the name disk0QPM.dsk for the disk image file):
    MAKEDISK0QPM disk0QPM.dsk
  3. After the execution copy the file disk0QPM.dsk in the SRecord directory;
  4. Go to the SRecord directory, open the provided DOS command shell and give the following command:
    D0TOHEXQPM disk0QPM.dsk
  5. After the execution you will find four files named from disk0QPM_SEG0.hex to disk0QPM_SEG4.hex to upload into the virtual disk with iDisk.

Remember that you have to do the procedure to "timestamp the disk" to enable files timestamping as described in the Q/PM Log.


Just a thought...

It might be interesting if the "customs diskpacks" were shared, e.g. using some kind of shared cloud or something like that...

So anyone interested could just... use them...

Discussions

john wrote 05/30/2017 at 00:07 point

Thanks!

  Are you sure? yes | no