I want to make my own bootable cd. I am using C/C++ to do this I use
CreateFile, WriteFile , ..etc etc to right to the CD. But my problem is that I don't know what makes it bootable.
For instance making a floppy disk bootable you just write to the first sector of the drive and make sure bytes 510 to 512 have the special AA55.
I have read on some sites about the first 16 sectors of the cd being reserved for booting the cd. But the sector sizes are not 512 bytes they are over 2000 bytes long.
Somebody told me it emulates a floppy disk. But does that mean I just write the whole floppy disk image out from the first sector linearly...
I Know
The BIOS only looks for the first bootable device and loads the first sector into memory. I know how it works for the floppy and harddisk. Because it just looks for the AA55 in the 510 to 512 bytes and loads that sector into memory then jumps to it. (i.e hands control of to the bootsector code)
But cd , usb have different sector size do I still just use the first 512 bytes of their sector with the 510 - 512 bytes having signature AA55.
Note I don't want to use barts or any other software product to make a cd bootable I just want to write out the bytes myself. And know how to make it bootable.
Any help would be great. As this question has been bothering me for a year or so.
CreateFile, WriteFile , ..etc etc to right to the CD. But my problem is that I don't know what makes it bootable.
For instance making a floppy disk bootable you just write to the first sector of the drive and make sure bytes 510 to 512 have the special AA55.
I have read on some sites about the first 16 sectors of the cd being reserved for booting the cd. But the sector sizes are not 512 bytes they are over 2000 bytes long.
Somebody told me it emulates a floppy disk. But does that mean I just write the whole floppy disk image out from the first sector linearly...
I Know
The BIOS only looks for the first bootable device and loads the first sector into memory. I know how it works for the floppy and harddisk. Because it just looks for the AA55 in the 510 to 512 bytes and loads that sector into memory then jumps to it. (i.e hands control of to the bootsector code)
But cd , usb have different sector size do I still just use the first 512 bytes of their sector with the 510 - 512 bytes having signature AA55.
Note I don't want to use barts or any other software product to make a cd bootable I just want to write out the bytes myself. And know how to make it bootable.
Any help would be great. As this question has been bothering me for a year or so.