flat assembler
Message board for the users of flat assembler.
![]() |
Author |
|
BOTOKILLER
Hi everyone!
I've just made ATA PIO driver, it worked fine ![]() I need to know what drive have I booted from to load some modules How do I find out??? |
|||
![]() |
|
BOTOKILLER
cod3b453 wrote: At boot, dl is loaded with the BIOS drive identifier. You can use this, along with EDD v2+ (see int 0x13 ah = 0x41,0x48) to determine which drive it is, either by port or by location (bus/device). Thanks! Is there any difference between reading hdd and CD in ATA PIO mode except that I have to recieve more data from 1F0h??? |
|||
![]() |
|
cod3b453
AFAIK using ATA is the same for both but the port base depends on the device location on the controller (it may be 0x01F0 or 0x0170) but, yes, the sector sizes are the only difference I know of.
|
|||
![]() |
|
BOTOKILLER
Also how do I get information about channel of drive I've booted from cuz I couldnt find about channel in int 13h 48h
Or it's just located on another PCI device??? |
|||
![]() |
|
cod3b453
The DPTE (v2+) and DPath (v3+) entries will give you the IOBase and channel/device values respectively. So program the structure in si with the v3 size and then check the value remains the same. You can then use these values in the device select/command registers for PIO.
|
|||
![]() |
|
BOTOKILLER
Is that Possible that there 2 different IDE controllers on same machine or they will conflict???
|
|||
![]() |
|
cod3b453
Yes, you can have multiple IDE (or any other controller) on a single board and, if you are able to boot from a device, there should not be an issue, as the controllers should have a different IO base [this is how the device is booted afaik].
|
|||
![]() |
|
BOTOKILLER
I wrote an ATA driver, It sends command 20h to drive and reads sector. It worked fine for HDD but when I ran that code for CD it wouldn't work, why???
|
|||
![]() |
|
egos
Use ATAPI command "Read CD" (0xBE).
|
|||
![]() |
|
cod3b453
Did you change you sector size to 2048 bytes for CD?
|
|||
![]() |
|
< Last Thread | Next Thread > |
Forum Rules:
|
Copyright © 1999-2020, Tomasz Grysztar. Also on GitHub, YouTube, Twitter.
Website powered by rwasa.