ata cdrom i/o
ata cdrom i/o
hi,
i want to access cdrom from my os. how to do that.
Particularly,
How to detect cdrom?
how to read sectors of cdrom?
thanks.
i want to access cdrom from my os. how to do that.
Particularly,
How to detect cdrom?
how to read sectors of cdrom?
thanks.
Re:ata cdrom i/o
cdrom's are so called "packet interface" devices. you can find information about ata6 packet interface on this pdf file...
www.ug.bcc.bilkent.edu.tr/~engino/ata6.pdf
have fun...
www.ug.bcc.bilkent.edu.tr/~engino/ata6.pdf
have fun...
Re:ata cdrom i/o
additional ata information available...
www.ug.bcc.bilkent.edu.tr/~engino/
www.ug.bcc.bilkent.edu.tr/~engino/ata1.pdf
www.ug.bcc.bilkent.edu.tr/~engino/ata2.pdf
www.ug.bcc.bilkent.edu.tr/~engino/ata3.pdf
www.ug.bcc.bilkent.edu.tr/~engino/ata4.pdf
www.ug.bcc.bilkent.edu.tr/~engino/ata5.pdf
www.ug.bcc.bilkent.edu.tr/~engino/ata6.pdf
www.ug.bcc.bilkent.edu.tr/~engino/
www.ug.bcc.bilkent.edu.tr/~engino/ata1.pdf
www.ug.bcc.bilkent.edu.tr/~engino/ata2.pdf
www.ug.bcc.bilkent.edu.tr/~engino/ata3.pdf
www.ug.bcc.bilkent.edu.tr/~engino/ata4.pdf
www.ug.bcc.bilkent.edu.tr/~engino/ata5.pdf
www.ug.bcc.bilkent.edu.tr/~engino/ata6.pdf
Re:ata cdrom i/o
thanks cemre,
It seems that the links contain everything i want.
thanks
Does anybody know how to detect usb drive(flash disk) and read the sectors.
Thanks.
It seems that the links contain everything i want.
thanks
Does anybody know how to detect usb drive(flash disk) and read the sectors.
Thanks.
Re:ata cdrom i/o
I have just finished my atapi driver, And like Cemre said you use a 12byte packet's for differant commands.it is not easy to explain as you have to set things up in the right order.
But if you just want to run your OS from a cd instead of a floppy,You can easily do this by making a image of your OS's floppy,and burning this on a cd as a bootable cd.
This makes the bios think its booting a floppy,it moves your real floppy from say A: to B:,You can also do this with a HD image.
PS: If you needed some code to auto detect your HD/CD to get you started let me know (it will be in asm), and i will give you a example.
ASHLEY4.
But if you just want to run your OS from a cd instead of a floppy,You can easily do this by making a image of your OS's floppy,and burning this on a cd as a bootable cd.
This makes the bios think its booting a floppy,it moves your real floppy from say A: to B:,You can also do this with a HD image.
PS: If you needed some code to auto detect your HD/CD to get you started let me know (it will be in asm), and i will give you a example.
ASHLEY4.
Re:ata cdrom i/o
Thanks ASHLEY4,
thanks
please.....ASHLEY4 wrote:
PS: If you needed some code to auto detect your HD/CD to get you started let me know (it will be in asm), and i will give you a example.
ASHLEY4.
thanks
- Pype.Clicker
- Member
- Posts: 5964
- Joined: Wed Oct 18, 2006 2:31 am
- Location: In a galaxy, far, far away
- Contact:
Re:ata cdrom i/o
implement the pci detection, locate *HCI driver as PCI device, run USB enumeration, check for device class=usb-storage, then communicate with the USB device accordingly to the SCSI protocol...virusx wrote: Does anybody know how to detect usb drive(flash disk) and read the sectors.
(afaik. i may have missed steps :p)
Re:ata cdrom i/o
This code (To detect cdrom) is made to run in real mode before you enter pmode, so you can get the first hard/cd drive's Drive/Port, It can be made to get all HD/CD drive's Drives/Port if you want.
ASHLEY4.
ASHLEY4.
Re:ata cdrom i/o
no problem in detecting usb in pci.
what after that???????????????Pype.Clicker wrote: then communicate with the USB device accordingly to the SCSI protocol...
- Pype.Clicker
- Member
- Posts: 5964
- Joined: Wed Oct 18, 2006 2:31 am
- Location: In a galaxy, far, far away
- Contact:
Re:ata cdrom i/o
well, the SCSI protocol should offer you commands to read/write sectors afaik
http://www.tldp.org/HOWTO/SCSI-Programming-HOWTO.html
http://www.hochfeiler.it/alvise/scsi.htm
http://www.tldp.org/HOWTO/SCSI-Programming-HOWTO.html
http://www.hochfeiler.it/alvise/scsi.htm
googling for 'SCSI programming standard' could be helpful too,Obtaining the specifications
Electronic copies of the latest drafts are available via anonymous ftp from:
* ftp.cs.tulane.edu:pub/scsi
* ftp.symbios.com:/pub/standards
* ftp.cs.uni-sb.de:/pub/misc/doc/scsi
I got my SCSI specification from the Yggdrasil Linux CD-ROM in the directory /usr/doc/scsi-2 and /usr/doc/scsi-1