flat assembler
Message board for the users of flat assembler.
![]() |
Author |
|
BOTOKILLER 06 Aug 2011, 16:49
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 08 Aug 2011, 06:53
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 08 Aug 2011, 16:52
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 09 Aug 2011, 12:08
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 09 Aug 2011, 17:40
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 16 Aug 2011, 12:07
Is that Possible that there 2 different IDE controllers on same machine or they will conflict???
|
|||
![]() |
|
cod3b453 16 Aug 2011, 17:15
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 08 Sep 2011, 11:47
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 08 Sep 2011, 13:43
Use ATAPI command "Read CD" (0xBE).
|
|||
![]() |
|
cod3b453 08 Sep 2011, 17:23
Did you change you sector size to 2048 bytes for CD?
|
|||
![]() |
|
< Last Thread | Next Thread > |
Forum Rules:
|
Copyright © 1999-2025, Tomasz Grysztar. Also on GitHub, YouTube.
Website powered by rwasa.