Subject: Re: Junkbox CP/M system?
From: Holger Veit <holger.veit at iais.fraunhofer.de>
Date: Tue, 24 Apr 2007 10:04:49 +0200
To: General Discussion: On-Topic Posts Only <cctech at classiccmp.org>
>>snippage of lCD stuff (worthy of its own topic)>>>>>.
You might infact look for embedded systems with a Z180 or better Z280
CPU (PLCC84) they have most of the stuff like MMU and DMA already built
in which one needs to make a system with more than 64k. There are
already SRAMs with 128kByte
available, so no longer needs to build complex DRAM refresh schemes.
SRAMS to 512k are current. Reality for CP/M applications is that none
I know of use more than the base 60K(max!). So any extra ram interfaced
either ends up as ramdisk or buffer space for BIOS.
Just buffer some data and address lines off for a
floppy or IDE
interface
From a programming point of view, how easy is accessing IDE compared
to a typical FDC ('765 or similar)? I did write some assembler to
access an IDE drive about 12 years ago, but have long since forgotten
details! :-)
Effectively, the software logic is the same. You have some registers
where you put in head/track/sector information, wait for
some ready status flag and read the data out or feed a block of data in.
Differences exist between the layout of the registers, but are actually
no stumbling block for any Z80 programmer.
FDC has one differce from IDE, it is not buffered and if there is no
DMA the cpu does PIO and it has to do it fast. So the programming
has to be a bit more carefully crafted to grab a byte every 16uS.
IDE is buffered so you have all day to transfer the data.
IDE is a little bit more comfortable as you don't
have to deal with
low-level disk formatting and bad-block handling. Blocking/beblocking to
convert between 128 byte sectors and 512 byte disk sectors is still
required, unless you leave this to CP/M+ (CP/M 2.2 IIRC didn't have this
directly). OTOH, one could program an FDC to use 128 byte blocks on disk
CP/MV2.x does not do deblocking for you but it does provide the software
flags and hooks to do it and the code is supplied (on line and
in the Alteration Guide).
easily; which then will cause trouble with data
exchange to a PC,
however. OTTH, the logic for an FDC is typically more complex than for
an IDE interface, usually because of some monoflop-based data separator,
including some adjustment of resistors/capacitors.
At a minimum. FDC interfaces are more involved as the interface has to
include data and drive interfaces unless one can find a chip like 2793
or 37C65.
From a practical standpoint I advise people building
CP/M systems the
following. Don't bother with floppy, it's a complex
system and you
have many things(including the drive) that may have to be debugged.
The idea of using floppy to transfer to PC is quaint and practical but
most PCs also have serial lines and that is both easier to do and
if done right fast enough, plus it's portable to PC systems that don't
have floppy at all. I do suggest Flash or EEprom as ROmdisk and
even ramdisk using static ram as one way to have storage but IDE is
a viable and generally cheap way to go. IDE drives are easily tested
(any old PC can do that) and drive under 1G are usually found in both
good condition and near free(or cheap).
A good base CP/M system:
1 Z80 (any speed)
2 61256 (64k ram)
1 27256(or28256) 32k eprom (startup)
1 CTC or 8253 (baud clock)
1 Z80 SIO or DART (two serial channels)
about 12pcs TTL glue (maybe less)
1 IDE drive
This can be hand wired (wirewrap or point to point) and with that few
parts it will be small. Parts are available no SMT or unobtainium.
Can be done using scrap and salvage. All parts will be through hole.
Performance will be good if the Z80 is 4mhz or faster. With a 4mhz
Z80 and IDE drive of at least 8mb useable space it will perform as well
or better than most S100 and SBC systems discussed. With a 8mhz z80
it will be fast. It will run all the CP/M software and with a larger
disk (say 40mb usable or larger) you can download extensive amounts
of software to the hard disk.
If done right the 32k Eprom can hold a debug monitor, hard disk formatter
and also an image of CP/M (with room to spare) so that startup is eased.
Personally, I tend to use CF<->IDE adapters and build the common three
circuit TTL-IDE interface.
I do not have CF is my junkbox(yet). I do have a boatload of old but
known good IDE drives. Once I got over my personal dislike for wasting
half the drive and stopped using D8-15 the interface is both simple and
qualifies as "junkbox".
Allison