flat assembler
Message board for the users of flat assembler.

Index > OS Construction > detecting ATA/ATAPI devices

Author
Thread Post new topic Reply to topic
zhak



Joined: 12 Apr 2005
Posts: 501
Location: Belarus
zhak 12 Jun 2005, 09:31
Hi, I've got some questions on IDENTIFY DEVICE and IDENTIFY PACKET DEVICE commands:
1. Should I always check for BSY and DRQ set to zero before writing Device register (or other)?
2. Should I implement DEVICE RESET before identification for HDD and CD/DVD-ROM?
3. Why does WinXP set ERR to one after IDENTIFY DEVICE? Everything goes fine in DOS...
Post 12 Jun 2005, 09:31
View user's profile Send private message Reply with quote
Dex4u



Joined: 08 Feb 2005
Posts: 1601
Location: web
Dex4u 12 Jun 2005, 12:06
zhak wrote:

1. Should I always check for BSY and DRQ set to zero before writing Device register (or other)?.

If your talking about what i think your talking about then YES.
Quote:

2. Should I implement DEVICE RESET before identification for HDD and CD/DVD-ROM?.

I have read you should, but i do not and have had no problems, but i may add it later.
Quote:

3. Why does WinXP set ERR to one after IDENTIFY DEVICE? Everything goes fine in DOS...
No driver i have made for my OS, will work in WIN98 or XP, also i could not get commands like IDENTIFY DEVICE to work in pm, so i call that command in realmode on boot up, but call SendAtapiPacket etc, in pmode, so my driver is in two parts a RM part and a PM part.

PS: A basic ATAPI driver comes with my "CdPod" see here: http://board.flatassembler.net/topic.php?t=2164&start=50

NOTE: I was called ASHLEY4. then.
Post 12 Jun 2005, 12:06
View user's profile Send private message Reply with quote
zhak



Joined: 12 Apr 2005
Posts: 501
Location: Belarus
zhak 13 Jun 2005, 15:51
Do I need to perform 2ms delay after EXECUTE_DEVICE_DIAGNOSTIC? It seems that it goes fine without the delay, but according to ATA-ATAPI spec. it should be done?
Post 13 Jun 2005, 15:51
View user's profile Send private message Reply with quote
Dex4u



Joined: 08 Feb 2005
Posts: 1601
Location: web
Dex4u 13 Jun 2005, 16:08
You can not rely on the ATA-ATAPI spec, as there are many, many mistakes in the many ver, i have not my driver here so i do not know off hand, but if it work keep it with no delay, if you have a problem latter try with a delay.
Post 13 Jun 2005, 16:08
View user's profile Send private message Reply with quote
Display posts from previous:
Post new topic Reply to topic

Jump to:  


< Last Thread | Next Thread >
Forum Rules:
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You cannot attach files in this forum
You can download files in this forum


Copyright © 1999-2024, Tomasz Grysztar. Also on GitHub, YouTube.

Website powered by rwasa.