Videogamer555 Posted August 30, 2019 Posted August 30, 2019 (edited) 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 August 30, 2019 by Videogamer555
LIGHTNING UK! Posted August 30, 2019 Posted August 30, 2019 There’s no driver. It uses the scsi passthrough interface (spti). The MMC specifications detail the command set used by optical drives.
Videogamer555 Posted August 30, 2019 Author Posted August 30, 2019 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.
LIGHTNING UK! Posted August 30, 2019 Posted August 30, 2019 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.
Videogamer555 Posted August 31, 2019 Author Posted August 31, 2019 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).
LIGHTNING UK! Posted August 31, 2019 Posted August 31, 2019 I did actually say what I use in my previous reply. Just not in one word haha. IOCTL_SCSI_PASS_THROUGH_DIRECT
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now