With all of this recent 8-bit and CP/M talk, it's prompted me to do a
little digging on what it would take to put together a CP/'M machine
on my own. I already have a couple of commercially-produced boxes.
This is about taking a Z-80, some RAM, some ROM and a storage unit and
making it run CP/M.
I've been reading the various threads, so I have a general idea of
what has to happen, but I'm still fuzzy on a few specifics, no doubt
due to my lack of deep experience with the Z-80.
The point of ROM vs RAM at $0000 has been gone over a few times. Do
"standard" CP/M machines use a shadow-ROM technique, or what, to
cold-start? We used to use a trick with the 68000 that would map ROM
at $000000, _and_ at some higher address, with the first few
instructions jumping to the higher ROM image, , and either an I/O pin
that toggled the address mapping for the lower ROM image, or just
watching for the first pulse from A23, such that the act of jumping up
to the higher ROM address itself would remove ROM from the bottom of
the memory map, revealing RAM.
How did CP/M systems handle 64K of RAM? Was there one primary way it
was done, or did every hardware vendor do it differently? I should
probably just confine my efforts to 48K of RAM and use the upper 16K
for a boot ROM, but if it's easy to support 64K of RAM, why not?
To confirm, the minimal I/O system is some flavor of serial interface
for console I/O (presumably piped to a display smart enough to handle
ANSI codes), and some form of block-addressable storage with a CP/M
filesystem, right? (I'm ignoring handy I/O like parallel printer
ports and 8255-type GPIO and the like, for the moment) Is it required
that the storage unit be writable? Is there a minimum size for the
display? That wouldn't matter for hanging a VT100-equivalent off of
the console port, but if I were to use some flavor of textual LCD, it
would very much matter. To find another way to ask, would the body of
extant CP/M apps freak out if you try to run them on a display that's
under 40 chars wide or under 24 chars tall? Do they expect 64 chars
wide or 80 chars wide? I don't think the OS itself actually cares how
wide or tall the display is, but perhaps some of the CUSPs, like DIR,
might.
Rather than taking a bare Z80, wiring on a Z8530, an SRAM or two and
an EPROM, I was contemplating beefing up my 1976 SDS Z-80 Starter Kit
to the point where it could run CP/M. I've written about it here
before, when I first got it, to remind those that don't know or don't
remember what it is, it has a ~2MHz Z80, 1K of 21L02 SRAM, room for
one more K, one 2716 with "ZBUG", two empty 2716 sockets (one attached
to an EPROM programming circuit), a keypad and 7-segment LEDs, a
largish wire-wrap area, and two S-100 slots. Presuming I wire the
SRAM, a larger-capacity EPROM, and some serial device into the
wire-wrap area, is there anything I should look for in an S-100 card
that would be interesting to install? A video card (rather than a
serial console), perhaps? I think I have one or two S-100 video
cards, but I was never clear on how one attaches a keyboard to that
rig - is there an ASCII keyboard port typically provided on an S-100
video card, or is that a separate peripheral?
Thanks for any and all answers to my noobish CP/M questions,
-ethan