MODE SENSE (10) SCSI command


I am building firmware for a USB microcontroller. The controller comes with framework for it to work as USB mass storage device (thumbdrive), but I need to modify the framework to emulate a CD-ROM device.

In doing so, I figure that the OS sends Mode Sense(10) command:
5A 08 2A 00 00 00 00 00 20 00

Can someone enlighten me on the response I should pass back? I have so far been unsuccessful in finding comprehensive material on this subject. Thanks in advance!

CD-ROM drives use the SCSI-3 instruction set, good thing is there are draft versions of the documents which you can download at:

Categories to consider:

SPC - contains “primary” commands such as inquiry (gives drive string), general mode sense & mode select, etc.

MMC - all CD, DVD, Blu-ray, etc commands.

Since most modern CD drives implements the MMC2 standard that’s the one I would go for, but I recommend first reading MMC1 because it is much easier to understand, and progression to MMC2 would be a lot easier.

For DVD+RW and higher media you need to read the later MMC versions.

The mode sense and mode select commands need to work in addition with mode pages, and these pages are not defined in SPC, they are defined in each related pdf; example for CD mode pages look inside MMC1 and MMC2.

thanks. I guess I need to go into the specification details now…