Chuck:
Going back to an original comment about using the LABEL command in
the 22DISK definition, when producing the data for the LBL file, is that
data in straight track/sector order? To me this sounds like the easiest way
to do "virgin birth" diskette creation since any PeeCee based
cross-assembler can be used to build the on-disk cold-start loader and other
required files.
To answer another question floating around there, this Versafloppy
is the first version which uses the 1771 and is single-sided only. It has no
ROM, so I have (from the manual) a simple bootstrap loader which will read
Track 0, Sector 1 into memory (the cold-start loader) and jump to that.
Rich
Rich Cini
Collector of classic computers
Lead engineer, Altair32 Emulator
Web site:
http://highgate.comm.sfu.ca/~rcini/classiccmp/
Web site:
http://www.altair32.com/
/***************************************************/
-----Original Message-----
From: cctalk-bounces at
classiccmp.org [mailto:cctalk-bounces at
classiccmp.org]
On Behalf Of Chuck Guzis
Sent: Saturday, June 03, 2006 2:09 AM
To: cctalk at
classiccmp.org
Subject: RE: Creating new CP/M disk from scratch
Okay, here goes. This is how I'd do the whole process on my PC.
First of all, I'd pick a disk format. Since you're limited to FM, you
might as well use something with 128 bytes/sector and avoid having to write
blocking/deblocking code. Another thing to think about is the interleave
(physical or logical). I'd go with physical, since you can vary this
without changing any code. If you're using a 4 MHz Z80 with that
Versafloppy, 3:1 is a reasonable value to start with. 1:1 on slower CP/M
systems generally only works when you can read and write a track at a time.
However, there were darned few (if any) FM 5.25" formats that used physical
interleaving (heaven only knows why). And very few 5.25" FM formats are
double-sided (which I think that you'd really want, given the limited space
on a FM 5.25" diskette. So you can either write your own 22DISK definition
(easy enough) or use an existing one, say, the DSSD Cromemco CDOS one
(22DISK CRO2) which will give you about 172K.
First, I'm assuming that there's a PROM on the Versafloppy that will load
the first sector of your floppy drive into RAM at some fixed location and
jump to it. This first sector will contain your boot loader...
Next, you need to write a boot loader, which basically sucks in the your
CBIOS (see the next paragraph) and jumps to the cold boot entry to load the
CP/M's DOS, which will, in turn, load CCP and give you a command prompt.
Now, for the tough part. You need to write a CBIOS, which at a minimum,
has your terminal I/O routines and disk I/O routines. The terminal I/O is
going to depend on what hardware you have. The simplest is using a
connection to a serial terminal. More complex routines may be needed if
what you have is a video-mapped display. The disk routines aren't too bad.
One set of them simply passes the disk parameter block information to
CP/M; the other entry points merely store the track and sector and unit
and transfer address of what's to be read or written and then reads or
writes it. Part of the CBIOS is also the cold boot loader, which loads
the DOS part of CP/M. There are other useful features in the CBIOS, such
as punch, printer, and reader I/O as well as IOBYTE redirection, but you
can do those later.
After you've done this, you need to put things together. You can use ASM
or ZASM to generate a hex file and LOAD to produce an image of what you
want, then concatenate (using COPY) the boot sector, CBIOS and CP/M files
into an image file of what's to be written to disk. You can then use the
format funciton of 22DISK to create a new system disk, then drop PIP, ED,
ASM, LOAD, DDT and whatever else you need onto it.
Peruse the "CP/M System Alteration Guide" for examples of how to build a
CBIOS and a boot loader.
Hope this helps.
Cheers,
Chuck