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.