Minimal CP/M SBC design?

Allison ajp166 at bellatlantic.net
Sun May 4 17:37:12 CDT 2008


>
>Subject: Re: Minimal CP/M SBC design?
>   From: "Roy J. Tellason" <rtellason at verizon.net>
>   Date: Sun, 04 May 2008 16:22:33 -0400
>     To: "General Discussion: On-Topic and Off-Topic Posts" <cctalk at classiccmp.org>
>
>On Sunday 04 May 2008 15:57, Ethan Dicks wrote:
>> 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 have some amount of docs on that stuff scattered here and there,  and am not 
>real clear at the moment just where it's all located.  I do recall some 
>stuff,  though.  One that comes to mind had the ROM (or EPROM?) mapped in at 
>reset,  and one of the coldstart initialization routines copied some small 
>portion of that up into high RAM.  I know that the Osborne Executive had 
>3 "banks" one of which had the eprom and video RAM mapped into it.  I think 
>that some of the TRS-80 machines needed a special version of CP/M because 
>they had ROM in low memory and no way to map it out.  There were probably 
>other variations I'm not thinking of besides.

There were also mod kits for the trs80 to relocate not only the rom but video 
and keyboard which were also in low ram.


>> 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).
>
>That's my understanding of it too,  though the mechanics of actually putting 
>together a bootable CP/M system are something I'm still a bit fuzzy on.  I 
>probably oughta do that with my BBII one of these days.

I can walk you thorugh it.  It really helps to have a PS with a SIM/emulator
like MYz80 or for this and better is Dave Dunfields NS* horizon
emulator.  Reason for that is it makes a good development environment, 
sources you will need are in the IMD collection for it. For a PC 
running something like W98 (later works once you fight with the OS IO)
you can have the simulated Horizon even serial download code from 
inside CP/M!


The basic process is to gen (movecpm) up a image of CP/M for the correct 
memory size (usually the higest ram address - the size of the bios) and
then take a snapshot of the CCP and BDOS. OR you can get the sources and
run them through ASM for the correct memory size.  the result is the same
a BIN file of 5.5K that has a specific load address.  Then you can copy 
a bios and alter it for your IO  The console IO is by far easiest and the 
disk (or the disk equivilent) will be a bit more complex.  Once you have 
a BIOS that can assemble you put the whole mess in a Eprom (orEEPROM)
with a small snippet of code to copy it from ROM to ram at the correct 
address and jump to the "COLDBOOT" entry in the BIOS where the code will
Kill rom, init low ram, log in the default disk and put up the intro 
screen and prompt.  here are bits and peices I didn't explan but that 
the overall path.

FYI: while older systems booted the system from disk there is no requirement
nor need for that.  If there is enough rom (8k will do) you can put the 
whole image in there plus the copy block code.

>I have a fair pile of downloaded files pertaining to this and other 
>CP/M-related stuff,  what used to be that portion of the files section on my 
>old BBS on hand here,  I can send you a list of what's there off-list if you 
>like.

Most are online with Gaby's http://www.cpm.z80.de/  The Unofficial CP/M site
and likely the most complete archive out there.  You can get most everything 
you need there and if not the Links are there to the best of the best.


Allison

>-- 
>Member of the toughest, meanest, deadliest, most unrelenting -- and
>ablest -- form of life in this section of space,  a critter that can
>be killed but can't be tamed.  --Robert A. Heinlein, "The Puppet Masters"
>-
>Information is more dangerous than cannon to a society ruled by lies. --James 
>M Dakin




More information about the cctech mailing list