[Resolved]Read sectors from CD-ROM
[Resolved]Read sectors from CD-ROM
I've found this: http://wiki.osdev.org/ATAPI from wiki, but I have no idea which ports I operated when I'm loading data form a CD-ROM, can somebody give me some explanations about ATAPI(or some example cods which are used for reading sectors from CD-ROM)?
Thanks!
Thanks for your replies, I can read data from CD-ROM now.
Thanks!
Thanks for your replies, I can read data from CD-ROM now.
Last edited by leyley on Thu Nov 29, 2012 8:02 am, edited 1 time in total.
Code: Select all
#rm -rf /
Re: Read sectors from CD-ROM
You should read the IDE Wiki Page because there a lot of codes about how you can do it. Moreover, codes for ATA driver
- Griwes
- Member
- Posts: 374
- Joined: Sat Jul 30, 2011 10:07 am
- Libera.chat IRC: Griwes
- Location: Wrocław/Racibórz, Poland
- Contact:
Re: Read sectors from CD-ROM
Pedantic note: "code" is always singular, never plural.
Reaver Project :: Repository :: Ohloh project page
<klange> This is a horror story about what happens when you need a hammer and all you have is the skulls of the damned.
<drake1> as long as the lock is read and modified by atomic operations
<klange> This is a horror story about what happens when you need a hammer and all you have is the skulls of the damned.
<drake1> as long as the lock is read and modified by atomic operations
Re: Read sectors from CD-ROM
I am sorry, English is not my native language.Griwes wrote:Pedantic note: "code" is always singular, never plural.
Re: Read sectors from CD-ROM
I've found some codes for reading sectors from HDs, but it seems that the codes doesn't fit for CDROM operations.
Does CDROM use same I/O ports as HDs do(1Fx,17x)?
Maybe I need something about IO ports...
Does CDROM use same I/O ports as HDs do(1Fx,17x)?
Maybe I need something about IO ports...
Code: Select all
#rm -rf /
- Combuster
- Member
- Posts: 9301
- Joined: Wed Oct 18, 2006 3:45 am
- Libera.chat IRC: [com]buster
- Location: On the balcony, where I can actually keep 1½m distance
- Contact:
Re: Read sectors from CD-ROM
Learn to read. Please.leyley wrote:http://wiki.osdev.org/ATAPI
(...)
Does CDROM use same I/O ports as HDs do(1Fx,17x)?
Re: Read sectors from CD-ROM
In other words read about ATAPI subset.
If you have seen bad English in my words, tell me what's wrong, please.
Re: Read sectors from CD-ROM
...................................................................Combuster wrote:Learn to read. Please.leyley wrote:http://wiki.osdev.org/ATAPI
(...)
Does CDROM use same I/O ports as HDs do(1Fx,17x)?
Now I know that they use same ports because they are seat on IDE.
Read HDs using ATA while CD-ROMs need ATAPI.
Is there any extra info about ATAPI PACKET?
Code: Select all
#rm -rf /
Re: Read sectors from CD-ROM
See PACKET command description. Here is packet to read sector(s):
Code: Select all
db 0BEh
db FORMAT ; 0 - any
dd STARTSEC
db 0
dw SECCOUNT
db FLAGS ; 10h - only data
db 0
db 0
If you have seen bad English in my words, tell me what's wrong, please.
Re: Read sectors from CD-ROM
The "PACKET command" segment of ATAPI makes me confused because there's no further description of such command(maybe the wiki page needs to be updated?).egos wrote:See PACKET command description. Here is packet to read sector(s):Code: Select all
db 0BEh db FORMAT ; 0 - any dd STARTSEC db 0 dw SECCOUNT db FLAGS ; 10h - only data db 0 db 0
Thank you very much! I really appreciate that you can give me the detail of a PACKET and its description.
Code: Select all
#rm -rf /