[comp.os.cpm] adding a hard disk to your floppy-only system

rusty@cadnetix.COM (Rusty) (04/04/89)

Well, I just bought myself a nice hard disk controller for my S100 system.
Having looked over the CPM manual for a bit, it seems to me that I *should*
be able to accomplish the task of adding the controller and hard disk to
my system.

When I had my Kaypro 10, I seem to recall that it could boot off of either
the hard disk OR a floppy.  However, one time I tried to make my system
boot off of my ramdisk with much less than pleasant results :-).
I figured at the time that it had to do with booting from something other
than drive A.  However, as I think about the Kaypro 10 I doubt it.

So, enough rambling, down to the question for the net:

Has anyone else added a hard disk to a CP/M system which was not originally
configured for a hard disk?  Can I do the trick that Kaypro did and boot
from either flops or hard?  Any words of wisdom? (Other than "Don't do it!" :-)

TIA, very much. (*)

Rusty.


(*) TIA - thanks in advance.
---------- #include "quote.cute"
Rusty Carruth  UUCP:{uunet,boulder}!cadnetix!rusty  DOMAIN: rusty@cadnetix.com
Daisy/Cadnetix Corp. (303) 444-8075\  5775 Flatiron Pkwy. \ Boulder, Co 80301
Radio: N7IKQ    'home': P.O.B. 461 \  Lafayette, CO 80026

rlb@cs.odu.edu (Robert Lee Bailey) (04/05/89)

In article <7316@cadnetix.COM> rusty@cadnetix.COM (Rusty) writes:
>
>Well, I just bought myself a nice hard disk controller for my S100 system.
>Having looked over the CPM manual for a bit, it seems to me that I *should*
>be able to accomplish the task of adding the controller and hard disk to
>my system.
>
>
>So, enough rambling, down to the question for the net:
>
>Has anyone else added a hard disk to a CP/M system which was not originally
>configured for a hard disk?  Can I do the trick that Kaypro did and boot
>from either flops or hard?  Any words of wisdom? (Other than "Don't do it!" :-)
>

I have a Xerox 820-1 single board CP/M computer.  When I got it, it was
not expandable to allow adding a hard disk.  After checking around a bit,
I found an inexpensive (for the time) 5MB hard disk ($99) and a SCSI
HD controller (also $99).  Now the Xerox 820 did not have a SCSI interface,
so, I had to build my own adapter as well as write my own HD driver.
The hardware adapter was not very sophisticated (i.e. not interrupt driven).
I just wire wrapped an adapter that plugged into the Z-80 socket.  This
allowed me to 'tap' the I/O and data lines that I needed for the SCSI
controller.  I added some TTL logic to decode the address that I wanted
to use for the controller and then began to write the software to access
the SCSI port.

I wrote the necessary routines and added them to my BIOS.  I probably
could have made it boot off of the HD, but, that would have required me
to patch the ROM.  Since I didn't have access to an EPROM burner, I
elected to use a hybrid method.  What I did was to modify the boot tracks
of the floppy so that instead of loading CP/M (BDOS & BIOS) from the
floppy, I loaded the HD driver.  After the driver was in memory, I
loaded CP/M from the hard drive (I SYSGENed a modified boot track onto
the HD).  I also faked out CP/M to make my HD (drive E:) my default drive.
So, when I booted the system, it automatically came up logged into
the HD. Using this method, only a few sectors were loaded from floppy,
and then the rest of the booting occured from the HD.

While this was not the optimum way to do it, for me it proved to be
a viable way to get a HD up and running with minimal modifications to
my existing hardware & software.

		Bob Bailey

uucp@lakart.UUCP (comp.os.cpm gateway) (04/07/89)

rusty@cadnetix.com asks:
> Has anyone else added a hard disk to a CP/M system which was not
> originally configured for a hard disk?  Can I do the trick that
> Kaypro did and boot from either flops or hard?  Any words of
> wisdom? (Other than "Don't do it!" :-)

I can only speak of my case with a Televideo TS803 from a semi-hypothe-
tical point of view.

The story - I have a TS803 (non hard disk version) and I added a
mini-winnie hard disk to it. So in response to your first question I
have added a hard disk to a floppy only system. To explain what is
necessary: all you have to do is to make the BIOS know about the
hard disk - add the necessary tables, and the code to read / write
it, and you can run from the hard disk.

That part is done, and works - i.e. I have a system with the original
floppies, and a hard disk "grafted" on.

As to booting it: I don't know how you work, but the boot process in
the 803 goes like this:

The boot rom reads drive A:, Track 0, Sector 0 into ram at a particular
spot, then jumps to that code. So I can put any bootstrap loader I like
into that 256 bytes of code - as it is, I just read the operating system
from the remainder of track 0 and track 1, and jump to the cold boot entry
point of the BIOS.

Assuming you work like this, if you can read and write the hard disk OK,
it can be done as a two step operation. Firstly write a boot sector
loader that will be pulled from floppy by the boot rom, that loads CCP /
BDOS / BIOS from the hard disk, and save that onto a floppy. Now when you
boot that floppy, the boot sector (T 0 S 0) comes off the floppy, drops into
ram, and is executed, but it goes to the hard disk to get the rest of
the operating system. Next step is to write this same boot sector somewhere
on the hard disk, and (here comes the hard part :-) ) modify the boot
rom to read from the hard disk. I plan to go about doing this for my
system in the above manner, and also plan to arrange that the rom looks
first to see if a floppy is present: if so boot from it. If not it then
looks at the hard disk to see if it can find anything there. So if I
reset with a floppy in drive A: I'll boot from the floppy, otherwise I'll
boot from the hard disk.
-- 
	dg@pallio.UUCP - David Goodenough		+---+
						IHS	| +-+-+
	..... !harvard!xait!lakart!pallio!dg		+-+-+ |
AKA:	dg%pallio.uucp@cfisun.cfi.com			  +---+

mlinar@eve.usc.edu (Mitch Mlinar) (04/09/89)

In article <7316@cadnetix.COM> rusty@cadnetix.COM (Rusty) writes:
>
>Well, I just bought myself a nice hard disk controller for my S100 system.
>Having looked over the CPM manual for a bit, it seems to me that I *should*
>be able to accomplish the task of adding the controller and hard disk to
>my system.
>
>Has anyone else added a hard disk to a CP/M system which was not originally
>configured for a hard disk?  Can I do the trick that Kaypro did and boot
>from either flops or hard?  Any words of wisdom? (Other than "Don't do it!" :-)

Quite a few of us have added bootable hard drives to our non-hard drive
systems.  There is only one way to do it: replace the ROM inside your machine
so that it uses the hard disk controller for boot.  Even better, is to have
it look for a hard drive and, failing that, to look for a floppy.

This is what the Kaypro 10 did and essentially all after-market upgrade ROMs
for the Z80 machines (Xerox, Kaypro, Morrow, Osborne) do for you.  Since your
machine is an S100, you will probably have to "roll you own".  Given that you
have the source for the current boot ROM, enough room for the code, and an
EPROM burner, you are most of the way there.

-Mitch

mikes@ncoast.ORG (Mike Squires) (04/10/89)

In article <7316@cadnetix.COM> rusty@cadnetix.COM (Rusty) writes:
>
>Well, I just bought myself a nice hard disk controller for my S100 system.
>Having looked over the CPM manual for a bit, it seems to me that I *should*
>be able to accomplish the task of adding the controller and hard disk to
>my system.

The vendor of the HDC usually provided a BIOS in source that had to be added
to the system BIOS to connect the drive.  I would assume that it would be
possible to boot off the HD, but none of the systems I every used did (S-100
systems with Advanced Digital, Morrow, and Jade HDC's).  The AD HDC came with
autoinstall software; the other two required revisions of the BIOS.  One of the
last books about CP/M to be published had a BIOS based on the JADE controller.
I believe that old SIG/M and CP/MUG disks may also have BIOSes.

Mike Squires Allegheny College Meadville, PA 16335 814 332 3347
uucp: ..!cwjcc!ncoast!{mikes,peng!sir-alan!mikes} 
      or ..!{pitt,uunet}!sir-alan!mikes
BITNET: mikes%sir-alan@pitt.UUCP (VAX) MIKES AT SIR-ALAN!PITT.UUCP (IBM)
Internet: sir-alan!mikes@uunet.uu.net or mikes@NCoast.ORG