ATAPI question

Question about which tools to use, bugs, the best way to implement a function, etc should go here. Don't forget to see if your question is answered in the wiki first! When in doubt post here.
Post Reply
_mark

ATAPI question

Post by _mark »

A few of you have written ATAPI drivers, and I was hoping to brain pick those people a bit.

What I am trying to do:
Access an entire large disk in real (16 bit) mode using the bios. By large lets assume 200G or bigger. I do not want to go into protected mode, because that really does not get me 64 bit access anyway (just 32).

Assuming a modern and uptodate BIOS? What are the limitations? From what I can gather, it can be done as long as I fill in the CHS information correctly. Correct?

Basically, givin a 64 bit number (or array of 16 bit numbers) can I seek and read any part of a "LARGE" disk in real mode.

I'm currently writting some library code to do some basic IO, but have realized large disks may pose some problems.

BTW - all the info I could find about LBA mode seems to indicate that this should NOT be used. What are your thoughts here - or am I just reading very old information about it.

Any example would be very appreciated!!!

Thanks
Mark
Tim

Re:ATAPI question

Post by Tim »

_mark() wrote:Basically, givin a 64 bit number (or array of 16 bit numbers) can I seek and read any part of a "LARGE" disk in real mode.
Yes, if you program the IDE controller directly. Don't bother with the CHS BIOS functions. Also, if you program the hardware directly, you can use the same code (or at least the same technique) in protected mode as real mode.
User avatar
df
Member
Member
Posts: 1076
Joined: Fri Oct 22, 2004 11:00 pm
Contact:

Re:ATAPI question

Post by df »

do bios support 200g+?? i thought there was a maxout at 180gb and even then not all bios handle that...
-- Stu --
_mark

Re:ATAPI question

Post by _mark »

df wrote: do bios support 200g+?? i thought there was a maxout at 180gb and even then not all bios handle that...
I think your right 140 or 180G or something like that. What I was trying to do is look to the future. By the time I finish writting anything I would assume 200G would be common and supported under all bios's. Heck - by the time I'm done a couple TB may be common. Maybe I should use 128 bit addressing instead....:)

I think Tim was right, I'll have to go straight to the hardware, but I would prefer to use the bios where I can.
Post Reply