[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Firmware/Software for homebrew IDE HDC.



I've just finished getting an IDE hard drive installed in my
][+. I wrote up a quick boot PROM, which loads the first sector
in at $0800 and starts running at $0801 if the first byte matches
the checksum of the 512 byte sector (yea, I know... sectors should
have 256 bytes.... the drive spits out 512 though.) :-)

Any suggestions on what to put in that first sector? An IDE hard
drive isn't really 'standard' as far as I can tell... everyone
else in this newsgroup seems to use SCSI... And what do I do
about the fact that I can have differing capacities of hard drives
attached to the controller?

And should I have the basic Read/Write Sector routines in EPROM?
That would make it easier if I add DMA to my card in the future...

Arg. Maybe it would have been better to go with a commercial controller
and SCSI drive..... but I had an IDE drive lying around (120 meg), and
enough chips to make up the controller. I'm just resurrecting my ][+
after about 6 years of non-use...

In case anyone wants to know, here are the details of the controller:
  Hardware used:
     2 x PALCE16V8H (re-)programmable logic devices
     2 x 74HCT245   buffers
     1 x 74HCT374   latch
     1 x 27C64      EPROM

The IDE bus is 16-bits in width (data path), so the latch and buffers
are used to re-organize the data into a 16-bit chunk. The even
bytes are read (and written) to the normal data port, with the
odd bytes being read from an additional port... the tougher part
of the transfer is that the odd byte must be read last but written
first, depending on the direction of transfer. Standard (ugh) PC-AT
hard drive commands are used. Presently, only SEEK, READ, and WRITE
are used. I am adding a RESET request to my boot PROM once I get
its format figured out. The control ports are run using 8-bit
transfers.
I am planning to add a DMA controller to the card to speed up data
transfers. 

-Dale Ulan    ulan@ee.ualberta.ca      VE6DAU