Subject: Re: Minimal CP-M SBC design
   From: Ethan Dicks <ethan.dicks at usap.gov>
   Date: Mon, 05 May 2008 01:25:47 +0000
     To: "General Discussion: On-Topic and Off-Topic Posts" <cctalk at
classiccmp.org>
On Sun, May 04, 2008 at 09:03:03PM -0400, Andrew Lynch wrote:
  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. 
Thanks.
  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. 
Sure.  I was hoping she would chime in.  My experience over the years
with CP/M has been somewhat tangental (I've worked on Kapros at work
back in 1980s, I own a couple of Kaypros still, and I've done a little
bit with 22disk and such under MS-DOS), but everytime Allison posts
on CP/M, I learn something.
  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). 
Right.  As it stands, the hardware probable cannot do that, but the ace
up my sleeve is that there is a 16V8 GAL that is already wired to important
bus signals so that it can act as the chip select circuit.  I was
planning on using one of the output flops as the bootstrap-ROM-enable.
I've done similar sorts of things with MC68000 designs in the past.
  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. 
That's what I was unsure about - but RAM to $EFFF and ROM from $F000 on
up is easy to implement. 
CP/M doesnt "require" 64K as it's entirely possible to boot and get a prompt
with less than 16k.  If you wish to run any application with a hint of
usefulness you need at least 48k and 56K would be fine so ram to 0f000h serves.
I presume the F000h block is rom/Eprom which can be very useful.
   How I
implemented my machine was to use a memory configuration latch
 (74LS273)...  The schematics are all on my N8VEM page. 
I'll check those out when the sats rise here.
  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.  
I happen to have some 62256s with me, not any 512Kx8 SRAMs, and the next
plane isn't for almost 6 months. 
 
Go with the 32k parts!  Hint to save wiring time stack the one atop the other
and keep CS/ seperate.
Also if you have a 32K eprom you can bank switch that in (do it as low ram/low rom)
and you can put CPm and utility stuff in there.
   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. 
Hmm... is there a soft copy of that book anywhere?  It sounds like the
perfect reading companion. 
 
It would be but I know of no on line copy.  If you cant cind the on line
copies of the bios from teh book I think I have them and can send to pvt email.
   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. 
Right... but what I _have_ is a choice between a 16550 and a 6402.  One
advantage of the 6402 is that its options are hardware selected, so the
bootstrap code doesn't have to do much to be able to squirt out a message
that it's alive.  It's probably impractical to put a video circuit on this
design, so I'm going with a serial console in the CBIOS I/O routines
and shifting the burden of display and keyboard input to a dedicated
device. 
 
Either will work likely less hardware with the 16550 as it has BRG.
   Best of luck
with your project.  Let me know if there is anything I can do
 to help! 
Thanks.  I still have lots of reading to do, as well as a bit of work to
fiddle up some GAL equations to implement the memory map.  It's going to
be somewhat trivial to roll out a 32K RAM/8K ROM design, since there's
already a pair of 28-pin sockets wired up for SRAM and EPROM.  The first
big trick will be mounting a second SRAM chip.  I do wish I had a 512Kx8
SRAM with me, but alas, no.
 
 
The gal can make life much easier.  The larger ramm is nice for MP/M or
implementing a soft ramdisk.
 I think I have all the parts needed for a ROM emulator,
but if not, I
do have a battery-backed 8K SRAM (48Z08?) that I can program in a device
programmer and treat as a ROM for firmware development.  At home, I have
a Grammar Engine PromICE, but I didn't happen to haul that along. 
The ram desive will ge you there.  back in the late 70s and early 80s
I did it with less (2716 and a home made programmer).
Thanks for the pointers.  I'll check out your project when the 'net
comes up for us. 
if I can be any help let me know.
Allison
 -ethan
--
Ethan Dicks, A-333-S     Current South Pole Weather at  5-May-2008 at 01:10 Z
South Pole Station
PSC 468 Box 400       Temp  -69.9 F (-56.6 C)   Windchill  -103.1 F (-75.0 C)
APO AP 96598          Wind    9.0 kts Grid 41   Barometer 693.6 mb (10119 ft)
Ethan.Dicks at 
usap.gov            http://penguincentral.com/penguincentral.html