Jump to content

How does IMGBurn create Mode2Form1 images?


Recommended Posts

Internally, what Windows API functions is it using to rip the the full raw 2352byte sectors from the CD disks, including all error correction and error detection codes? I'd like to make my own software to raw read all data (including error correction and detection bytes), but not to write to a file, but rather just to read them (one sector at a time) into memory for analysis. The end user could select the sector number, and view all 2352 raw bytes of a disk.

And if IMGBurn isn't using normal Windows API functions, how does it work? When I install IMGBurn from the installer EXE, does it actually install a custom-made kernel-mode driver that allows full access to all bytes of data on the CD disk?

Edited by Videogamer555
Link to comment
Share on other sites

2 hours ago, LIGHTNING UK! said:

There’s no driver. It uses the scsi passthrough interface (spti).

The MMC specifications detail the command set used by optical drives.

Thanks for the info. Can you link to that info about the commands? Or better yet, if ImgBurn is open source, could you link to the source code? And does this require that the CDROM drive is on the SCSI bus (as opposed to the IDE bus)?

By chance, does it use the CDROM raw reading IOCTL command via the DeviceIoControl Windows API function? Or is SPTI separate? More info on this would be great, and again, if you are allowed to distribute the source, that would be best.

Link to comment
Share on other sites

9 hours ago, LIGHTNING UK! said:

Yes, DeviceIoControl and the SCSI passthrough direct ioctl.

I used to get the MMC docs from the t10.org website. No idea if it’s still running or if they’re still available.

ImgBurn isn’t open source, sorry.

Too bad it's not open source. What exactly is the command you are using with the DeviceIoControl function? Is it the IOCTL_CDROM_RAW_READ function? Or is it something else? I've been trying to use IOCTL_CDROM_RAW_READ command and with track type set to RawWithC2AndSubCode, but it doesn't actually show me the full raw 2352-byte sector for a Mode1 (or Mode2/Form1) disk. I can tell, because the output is missing the error correction and error detection codes (which should be obvious as they should be a section at the end of the sector that looks like random data).

Link to comment
Share on other sites

  • Create New...

Important Information

By using this site, you agree to our Terms of Use.