Re: PC20-III IDE interface

From: Spiro Trikaliotis (trik-news_at_gmx.de)
Date: 2003-11-21 16:18:24

Hello Ruud,

On Fri, Nov 21, 2003 at 03:12:00PM +0100, Baltissen, GJPAA (Ruud) wrote:
> 
>    Hallo allemaal,
> 
>    I'm still busy with disassembling the ROM of my PC20-III. The reason
>    why I started this work was to find out how I can replace its HD with
>    another type. The only thing I can say is that until now it makes no
>    sense :( AFAIK it only uses four I/O addresses: 0320h..0323h, not the
>    six I expect for a normal IDE-HD. Even stranger is the following code:

The PC20-III is an XT, isn't it?

The XT HDC is a completely other beast than an AT controller.


Ralf Brown's Interrupt List [1] does not give very much information on
this, but at least the following:

PORT 0320-0323 - XT HDC 1   (Hard Disk Controller)
SeeAlso: PORT 01F0h-01F7h

0320  RW  data register
0321  -W  reset controller
0321  R-  read controller hardware status (see #P0574)
0322  R-  read DIPswitch setting on XT controller card
0322  -W  generate controller-select pulse
0323  -W  write pattern to DMA and INT mask register

Bitfields for XT hard disk controller hardware status:
Bit(s)  Description     (Table P0574)
7-6     always 0
5       logical unit number
4-2     always 0
1       error occurred
0       always 0

So, in effect, there are 6 registers, but these are located on 4
addresses only.

0324-0327 is HDC 2, 0328-032B is HDC 3.


>    ; [AA79]
>    FillDX322_326   proc    near
>                            push    cs
>                            pop     dx
>                            cmp     dh,0FAh         ; CS = $FAxx?
>                            mov     dx,322h
>                            jz      loc_AA86                ; yes, ->
> 
>                            add     dx,4                    ; DX := $0326
>    loc_AA86:
>                            in      al,dx                   ; port 326h
>                            retn
>    FillDX322_326   endp
> 
>    The value used to fill DX depends on wether CS = 0FA00h or not! The
>    only time I know CS is 0FA00h is right after a reset when the PC is
>    scanned for "external" ROM with the well known "55 AA" identification
>    code. For the rest, I havent the faintest idea. The only thing I can
>    think of adding another IDE-interface with its own _same_ ROM which is
>    executed on another address.

This seems to be related to initializing a second HDC, too.


I know, this is not that much info, but I wanted to share it
nonetheless. ;-)

Spiro.

[1] http://www-2.cs.cmu.edu/afs/cs.cmu.edu/user/ralf/pub/WWW/files.html

       Message was sent through the cbm-hackers mailing list

Archive generated by hypermail pre-2.1.8.