Hi, all,
I was staring at an SBC I have here with a 6MHz Z-80, some ROM, some RAM,
and a 26-pin off-board bus for some Z80-PIO boards (this thing was built
as a multi-parallel-printer switcher). I've been musing about what it
would take to boot CP/M up on this.
For user I/O, I was planning on a console serial port and a
terminal/terminal
emulator. I have IM6402s on hand, but I'd be interested in hearing if
certain other chips are preferred, based on what BIOS code is floating
around out there. I also have a 16550, but I don't think I have any
Z80-SIO chips handy.
For mass storage, I was planning on either Compact Flash or an SD card.
I think I've seen both as I googled around for modern SBCs. Any of the
media I have lying around is plenty large enough (I even have some 4MB
CFs and a 2.5MB full-sized PCMCIA flash card on hand).
I am a little unclear, though, about how traditional CP/M systems
were set up for ROM and RAM. Was it common to use a "shadow ROM"
in low mem at reset, then have the BIOS live at the top of memory?
How did 64K RAM CP/M machines handle the BIOS? Did they temporarily
ghost the ROM on top of RAM until some bit of code could read ROM
and write RAM then bank out the ROM? Since I think I "need" at
least 48K of RAM, I was planning on a pair of 62256s. I could easily
do 56K of RAM low and 8K of ROM high, I think, unless there's some
other arrangement that's obvious to try for a simple design.
I've never tried writing a BIOS for a CP/M machine, but my understanding
is that things are modular enough that once you know what I/O chips
you have and at what I/O addresses, for a straightforward, non-clever
design, the coding is equally straightforward and non-clever (but please
feel free to enlighten me if otherwise).
Thanks for any tips, especially from anyone on the list who has ever
rolled their own CP/M machine.
-ethan
--
Ethan Dicks, A-333-S Current South Pole Weather at 4-May-2008 at 19:40
Z
South Pole Station
PSC 468 Box 400 Temp -74.2 F (-59.0 C) Windchill -105.4 F (-76.4
C)
APO AP 96598 Wind 7.4 kts Grid 77 Barometer 691.6 mb (10194
ft)
Ethan.Dicks at
usap.gov <http://www.classiccmp.org/mailman/listinfo/cctalk>
http://penguincentral.com/penguincentral.html
________________________________
-----REPLY-----
Hi Ethan, I reread your email and thought I'd try to answer some of your
questions regarding a simple do it yourself CP/M computer.
My first piece of advice is to ask Allison ;-) since she has done this
dozens of times and can boot CP/M blind folded on a spark gap radio.
Seriously. She is amazing and has helped me many times. Mucho Thank you
Allison!
Your basic hardware certainly sounds CP/M capable. I assume that it can
swap RAM in to the lower pages though, right? CP/M requires RAM at $0000
through some address (depends). It likes RAM all the way to $FFFF but can
live with ROM in the $F000 range. Less RAM than 48K makes things difficult
though, IMO.
How I implemented my machine was to use a memory configuration latch
(74LS273). On reset, the ROM is swapped in to the lower 32K page. There is
a fixed page of RAM in the upper 32K page. The ROM loader program does some
simple copying of data from the ROM to the upper RAM page. Then it writes
to the memory configuration latch to swap out the ROM and have a full 64K
RAM. The whole thing is amazingly simple. The schematics are all on my
N8VEM page.
A pair of 62256's would work but I prefer a solution using a 512Kx8 SRAM.
That lets you use the 64K for RAM and the rest for a RAM drive. Whatever
does it for you though. Some people like the dual 62256's and it does
simplify the circuit a bit.
Writing the CBIOS is actually not that hard. I wrote one more or less based
on the one in the Andy Laird's CP/M programmers guide book. It was
recommended by Allison and is *the* reference book AFAIK. CP/M is a great
OS and is rather portable considering everything it does.
I use 16550 UARTs but the CBIOS abstracts all those details away. I think
CP/M could care less what sort of serial port you use, even if you use one
at all. Just implement the CBIOS IO routines and it'll work. Same thing
for drives; you can use floppy drives, memory, IDE, hard disks, whatever
from CP/M's perspective they are all block devices.
Best of luck with your project. Let me know if there is anything I can do
to help!
Andrew Lynch