Translate BIOS drive address (80h) to IO port address (1f0/a0)

  • Thread starter Thread starter takfuji
  • Start date Start date
T

takfuji

I have a very basic question. Please, can gurus help me?

To address an IDE HDD using BIOS, we use drive address in DL
such as 80h, 81h and so on. --- BIOS address

On the other hand, to address the same drive using IO port,
we use address of IO port (such as 1f0h, 170h) and master/
slave slection (0a0h, 0b0h). --- ATA address

And everybody knows that 80h is not always 1f0h/a0h. They can
be asigned to different ports.

Now, where can I find the translation, or cross reference, table
between BIOS address and ATA address?

I have 80h here. I want to know the port address and master/
slave information.
I know that EnhancedBIOS INT13 AH48 returns DDE at 1ah if version 2,
but how about in the case of using older BIOSes?
Thanks in advance.
Tak
 
I have a very basic question. Please, can gurus help me?

To address an IDE HDD using BIOS, we use drive address in DL
such as 80h, 81h and so on. --- BIOS address

On the other hand, to address the same drive using IO port,
we use address of IO port (such as 1f0h, 170h) and master/
slave slection (0a0h, 0b0h). --- ATA address

And everybody knows that 80h is not always 1f0h/a0h. They can
be asigned to different ports.

Now, where can I find the translation, or cross reference, table
between BIOS address and ATA address?

I have 80h here. I want to know the port address and master/
slave information.
I know that EnhancedBIOS INT13 AH48 returns DDE at 1ah if version 2,
but how about in the case of using older BIOSes?
Thanks in advance.
Tak

You could check the serial number in 8xh and xF0 to find who is who

Nick
 
You could check the serial number in 8xh and xF0 to find who is who

Thanks Nick, but,,,,
How can I get the serial # in 8xh?
INT13 AH25 is the only one I know, however, it is NOT for general use.
IBM limits it only for PS1 and PS2.
Or, any other means to obtain serial than this?

Tal
 
En (e-mail address removed),
(e-mail address removed) va escriure:
How can I get the serial # in 8xh?

Reading it from offset 0x1b8 of sector LBA0 ?

Know it will not work everywhere, but it could be worth a try.


Antoine
 
Do you have EDDS 1&2 from T13.org?

They are based on Phoenix EDD from 1995, which also has DPTE pointer at offset
26. I had a 486 that implemented it, so it should be in any Pentium and later.
 
Antoine,
That does not work as target drives are not always NT disks. It can
even be after wipe (sanitization) operation.

Eric,
May I ask what "EDDS 1&2" means?
I'm familier with T13 information, and have ATA specs from them.
(Sorry, my first article has an typo... DDE should be EDD.)
Probably you mention the same thing what I said in the first
one. INT13 AH48 returns EDD config pointer at 1ah (26 in decimal)
in the Drive Parameter Table, if EBIOS ver 2 or higher. ----- Is
this what you mean?

Here again I want to use older BIOSes, which may not support this call.


Am writing a small program that should work for old machines as well
as for new ones.
My back up plan is to compare LBA count, but, there are cases that
the machine has two or more drives with same size/model.

Tak
 
En (e-mail address removed),
(e-mail address removed) va escriure:
Antoine,
That does not work as target drives are not always NT disks.

I know, I wrote about this. I just did not understand your quest.

Here again I want to use older BIOSes, which may not support this
call.

Well, you are willingful to support old uncommon BIOS, without EDD support
BUT that allows for remapping of the drives? Is there really an actual need?
(in other words, does such a beast actually exists? EDD 1.1 is dated
1995...)

Or are you only thinking about the (easier) problem of correctly identifying
the IDE port, assuming no remapping when no EDD? Then, what about mere
enumeration in order?

Am writing a small program that should work for old machines as well
as for new ones.

Perhaps you may also have to deal with uncommon I/O ports for the 2nd+
channel. While I never saw any of them, I heard about such uncommon setups
around 1995. I do not know if it is urban legend or an isolate case. And I
have no idea about the relative proportion of this against the case above
(remapping BIOS not implementing EDDS)


Antoine
 
BUT that allows for remapping of the drives?

Um,
I did not think about this.... old one has no remapping....
Good thought. I will go along with this idea.
Port addresses I'm including as "unknown" are 0e0 and 070. 1e8 and 168
are
somewhat de-facto standard. There may be more, but I give up for other
ones.
(in other words, does such a beast actually exists? EDD 1.1 is dated
1995...)
Yea, I deal with really old gears. Actually, the program is related to
HDD
sanitization; they are on retiring machines.
Thank you very much for the help, Antoine.

Tak
 
Back
Top