CDROM

Question about which tools to use, bugs, the best way to implement a function, etc should go here. Don't forget to see if your question is answered in the wiki first! When in doubt post here.
Post Reply
nooby

CDROM

Post by nooby »

how can i read from cdroms ???
User avatar
Solar
Member
Member
Posts: 7635
Joined: Thu Nov 16, 2006 12:01 pm
Location: Germany
Contact:

Re:CDROM

Post by Solar »

With a laser.

;D

Sorry but that one was too hard to resist. 8)

Do you mean booting from CD-ROM, or reading from it after your OS is all started up?

If the latter, do you mean ATAPI CD-ROMs, SCSI CD-ROMs, or USB CD-ROMs?
Every good solution is obvious once you've found it.
nooby

Re:CDROM

Post by nooby »

;D

i mean IDE cdrom
User avatar
Pype.Clicker
Member
Member
Posts: 5964
Joined: Wed Oct 18, 2006 2:31 am
Location: In a galaxy, far, far away
Contact:

Re:CDROM

Post by Pype.Clicker »

nooby wrote: i mean IDE cdrom
So, you actually mean "ATAPI" CDROM, afaik. You might wish to dig for ATAPI specification and see how you should read/write data using them.

Still, we need to know if you're trying to boot them or access them afterwards (the problem is quite different, since the BIOS will present your CDROM as a special floppy during boot, but it cannot access the rest)

btw, what about getting a look at "how to ask questions" thread ? You might get better answers if we understand what you are precisely for ...
nooby

Re:CDROM

Post by nooby »

i want to boot my kernel from cdrom. that is no problem.
now i want access data from my pmode kernel without using bios. i have heard that if you boot from floppy the floppy a: will be the cdrom boot image. but if i access floppy a: not with the bios is a: still the floppy image then ?
User avatar
Pype.Clicker
Member
Member
Posts: 5964
Joined: Wed Oct 18, 2006 2:31 am
Location: In a galaxy, far, far away
Contact:

Re:CDROM

Post by Pype.Clicker »

no. More precisely, if you follow a floppy-tutorial for protected mode, you'll access the floppy regardless of how hard the BIOS tried to make you believe your CDROM was a floppy.

My advice would be to load as much as you can from that floppy before you enter pmode (using unreal mode, BIOS "copy to high memory" function, GRUB modules, or whatever) and then use that "ramdisk".

If you need to access the remaining 600+MB of your CDROM, you'll definitely need an pmode ATAPI driver. Even realmode BIOS doesn't have functions to load those "sectors". You'll need code to support ISO filesystem aswell.
Dex4u

Re:CDROM

Post by Dex4u »

The thing your talking about with the CD emulating the floppy with a bootable cd is right, but as soon as you enter pmode or do a certain int in real mode emulation ends.
So you will need to write a ATAPI driver, it should not take you long.
As there loads of code about a ATAPI driver on the net.
Post Reply