Source
x
The Amiga Buddha and Catweasel IDE Driver (part of ide.c) was written by
Geert Uytterhoeven based on the following specifications:
------------------------------------------------------------------------
Register map of the Buddha IDE controller and the
Buddha-part of the Catweasel Zorro-II version
The Autoconfiguration has been implemented just as Commodore
described in their manuals, no tricks have been used (for
example leaving some address lines out of the equations...).
If you want to configure the board yourself (for example let
a Linux kernel configure the card), look at the Commodore
Docs. Reading the nibbles should give this information:
Vendor number: 4626 ($1212)
product number: 0 (42 for Catweasel Z-II)
Serial number: 0
Rom-vector: $1000
The card should be a Z-II board, size 64K, not for freemem
list, Rom-Vektor is valid, no second Autoconfig-board on the
same card, no space preference, supports "Shutup_forever".
Setting the base address should be done in two steps, just
as the Amiga Kickstart does: The lower nibble of the 8-Bit
address is written to $4a, then the whole Byte is written to
$48, while it doesn't matter how often you're writing to $4a
as long as $48 is not touched. After $48 has been written,
the whole card disappears from $e8 and is mapped to the new
address just written. Make sure $4a is written before $48,
otherwise your chance is only 1:16 to find the board :-).
The local memory-map is even active when mapped to $e8:
$0-$7e Autokonfig-space, see Z-II docs.
$80-$7fd reserved
$7fe Speed-select Register: Read & Write
(description see further down)
$800-$8ff IDE-Select 0 (Port 0, Register set 0)
$900-$9ff IDE-Select 1 (Port 0, Register set 1)
$a00-$aff IDE-Select 2 (Port 1, Register set 0)
$b00-$bff IDE-Select 3 (Port 1, Register set 1)
$c00-$cff IDE-Select 4 (Port 2, Register set 0,
Catweasel only!)
$d00-$dff IDE-Select 5 (Port 3, Register set 1,
Catweasel only!)
$e00-$eff local expansion port, on Catweasel Z-II the
Catweasel registers are also mapped here.
Never touch, use multidisk.device!
$f00 read only, Byte-access: Bit 7 shows the
level of the IRQ-line of IDE port 0.
$f01-$f3f mirror of $f00
$f40 read only, Byte-access: Bit 7 shows the
level of the IRQ-line of IDE port 1.
$f41-$f7f mirror of $f40
$f80 read only, Byte-access: Bit 7 shows the
level of the IRQ-line of IDE port 2.
(Catweasel only!)
$f81-$fbf mirror of $f80
$fc0 write-only: Writing any value to this
register enables IRQs to be passed from the
IDE ports to the Zorro bus. This mechanism
has been implemented to be compatible with
harddisks that are either defective or have
a buggy firmware and pull the IRQ line up
while starting up. If interrupts would
always be passed to the bus, the computer
might not start up. Once enabled, this flag
can not be disabled again. The level of the
flag can not be determined by software
(what for? Write to me if it's necessary!).
$fc1-$fff mirror of $fc0