Page 1 of 1

CDROM

Posted: Thu Jun 23, 2005 8:22 am
by nooby
how can i read from cdroms ???

Re:CDROM

Posted: Thu Jun 23, 2005 8:26 am
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?

Re:CDROM

Posted: Thu Jun 23, 2005 8:41 am
by nooby
;D

i mean IDE cdrom

Re:CDROM

Posted: Thu Jun 23, 2005 8:50 am
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 ...

Re:CDROM

Posted: Thu Jun 23, 2005 9:01 am
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 ?

Re:CDROM

Posted: Thu Jun 23, 2005 9:49 am
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.

Re:CDROM

Posted: Thu Jun 23, 2005 11:16 am
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.