PROPOSAL FOR CD-ROM IN SCSI-2 DOCUMENT X3T9.2/87-106 R0 JUNE 30, 1987 Logical Description of CD-ROM Interface Model of CD-ROM Several conditions are defined below to make the writing of this documet easier and more succinct. Power-on Condition The power-on condition occurs when power is first applied to the unit. The controller performs power-on diagnostics and checks for logical units present. If a caddy is inserted the drive loads the caddy and attempts to read the table of contents. For the duration of the power-on condition the controller will return BUSY status. If a failure in power-on diagnostics occurs the controller will return CHECK CONDITION STATUS. If after the caddy is inserted it does not seat properly, or the drive is unable to focus, or the drive is unable to achieve spindle lock-up or the table of contents is not recovered the controller will return a CHECK CONDITION STATUS. Reset Condition The reset condition occurs whenever the RST signal is asserted, or a BUS DEVICE RESET message is received. Unit Attention Condition The unit attention condition occurs following a power-on condition, a reset condition, the insertion of a caddy with the successful recovery of the table of contents or the receipt of a MODE SELECT command from another initiator. The unit attention condition shall persist for each initiator until that initiator issues a command to the logical unit for which the controller returns a CHECK CONDITION status. If the next command from that initiator to the logical unit (following the CHECK CONDITION status) is REQUEST SENSE, then the UNIT ATTENTION sense key is returned. If any command other than REQUEST SENSE is received, the unit attention condition is lost. If more than one unit attention condition occurs the unit attention condition with the highest priority shall be reported. The priority is 1) Power on / reset 2) Not ready to ready transition (medium change) 3) Parameter change occurred from another initiator If an INQUIRY command is received from an initiator with a pending unit attention condition the controller will perform the INQUIRY command and will not clear the unit attention condition. If a REQUEST SENSE command is received from an initiator with a pending unit attention condition then the controller will discard any pending sense data, report UNIT ATTENTION sense key, and clear the unit attention condition for that initiator. The additional sense code will be set to the appropriate value. If an STOP UNIT command (with LoEj set) is received from an initiator with a pending unit attention condition the controller will perform the command and will not clear the unit attention condition. If an initiator issues a command other than INQUIRY, REQUEST SENSE, or STOP UNIT (with LoEj set) while a unit attention condition exists for that initiator, the controller will terminate the command with a CHECK CONDITION status. Ready Condition/Not Ready Condition The ready condition occurs after a caddy is inserted and the the table of contents has been recovered from the disk. A not ready condition occurs for the following reasons: 1) There is no caddy inserted. 2) The drive is unable to load or unload the caddy. 3) The drive is unable to recover the table of contents. 4) The controller cannot select drive. (This can only occur if the controller was previously able to select the drive). A check condition status will be returned for the drive not ready condition only for commands that require or imply a disk access. The following commands will not return a check condition status for the not ready condition: 1) INQUIRY 6) STOP UNIT with LoEj bit set to one 2) MODE SELECT 7) ALLOW MEDIUM REMOVAL 3) RESERVE 8) READ BUFFER 4) RELEASE 9) WRITE BUFFER 5) MODE SENSE 10) EJECT CADDY The following commands will return a check condition status for the not ready condition: 1) TEST UNIT READY 13) READ TOC 2) REZERO UNIT 14) READ Q SUBCODE 3) READ 15) READ HEADER 4) SEEK 16) PLAYBACK AUDIO 5) START UNIT (with Start bit set) 17) PLAY AUDIO TRACK 6) RECEIVE DIAGNOSTIC RESULTS 18) PAUSE 7) SEND DIAGNOSTIC 19) PLAYBACK STOP 8) PREVENT MEDIUM REMOVAL 20) PLAYBACK STATUS 9) READ CAPACITY 10) READ EXTENDED 11) SEEK EXTENDED 12) VERIFY Disk Compatibility The controller is designed to work with any disk that meets the Sony-Philips "red-book" or "yellow-book" documents at the current revision level. The drive will read CD-ROM data disks in mode one or mode two, digital audio disks, mixed-mode disks (i.e. some tracks are audio, some tracks are data) and CD-I disks under CD-ROM mode two. The CD-I data is returned as recovered from the disk (i.e. no de-compression or other enhanced CD-I features are implemented). It is recommended for the efficient performance of the interface that post- gap areas be encoded as CD-ROM data in mode zero. TOC Recovery Strategy The recovery of the TOC data is required before a logical unit is ready and data can be read from the disk. The TOC data is written several times in the area set up for TOC data. The exact number of repetitions depends on the number of tracks on a disk. The following TOC recovery strategy attempts to maximize the chance of recovering the TOC data. The drive attempts to recover the TOC as soon as a caddy is successfully loaded. The time maximum time to recover a TOC that is read without error is approximately five seconds. The repeated TOC data can be up to two minutes long. Following this strategy the drive will continue in its attempts to recover the TOC data until the end of the TOC data area is reached. Each attempt at recovering the TOC data is limited to twenty seconds. Each attempt accesses the next twenty second area of TOC data. If the first attempt at recovering the TOC data fails the controller will respond to the first command received during the next twenty second interval with a CHECK CONDITION status. The the sense key is set to NOT READY and the additional sense code is set to UNABLE TO RECOVER TOC. The controller will respond to all subsequent commands received during the interval with a BUSY status. If the drive reaches the end of the TOC data area without successfully recovering the TOC data the controller will respond to all subsequent commands that imply a disk access with a CHECK CONDITION status (see 2.1. 4). The the sense key is set to NOT READY and the additional sense code is set to UNABLE TO RECOVER TOC. The exception is the READ TOC command. If a caddy is loaded and a TOC has not been successfully recovered it will be attempted again starting at the beginning of the TOC data area. Audio Playback Implementation Rules The rules for audio playback operations: 1) The starting audio address must be specified before a playback operation can occur. The controller will set the ending audio address if any audio tracks exist on the disk to the address of the next track index one minus one block. If a playback operation is requested and no audio tracks exist the playback operation will be terminated with CHECK CONDITION status. The sense key will be set to ILLEGAL REQUEST and the additional sense code set to AUDIO ADDRESS NOT VALID. 2) The audio addresses will be valid until a reset condition, a medium change occurs or until another command is received with a new audio address. 3) The audio addresses must be within an audio track. If the audio address is not within an audio track the command will be terminated with a CHECK CONDITION status. The sense key will be set to ILLEGAL REQUEST and the additional sense code set to ILLEGAL MODE FOR THIS TRACK. 4) If any of the following conditions occur the playback operation will be terminated with a CHECK CONDITION status: a) a change in bit one of the control field is detected. The sense key will be set to ILLEGAL REQUEST and the additional sense code set to END OF USER AREA ENCOUNTERED ON THIS TRACK. If any of the following conditions occur and the drive has not detected the ending audio address audio play operation will continue on the next track. a) an index equal zero is detected (i.e. pre-gap detected). b) a track number change is detected (i.e. lead-out). The ending audio address may be set while audio play is in progress. If the ending address requested is not greater than the current address the audio play operation will stop and the drive will enter the hold track state. 5) The audio play operation will not be interrupted by the following commands received by the controller. TEST UNIT READY READ CAPACITY REQUEST SENSE WRITE BUFFER INQUIRY READ BUFFER RESERVE READ TOC RELEASE READ Q SUBCODE MODE SELECT PLAYBACK STATUS MODE SENSE PLAYBACK AUDIO RECEIVE DIAGNOSTIC RESULTS PAUSE (Pause Bit = 0) PLAYBACK STOP The actual starting audio address will be within four q-subcode addresses of the requested starting audio address. The reason is the reliability of reading the q-subcode address. The current audio players carry through if they miss a q-subcode address. Command Descriptions for CD-ROM Interface Implemented Commands Summary ============================================================================== Operation Code Type Command Name Section ------------------------------------------------------------------------------ 00h M TEST UNIT READY 01h M REZERO UNIT 03h M REQUEST SENSE 08h M READ 0Bh M SEEK 12h M INQUIRY 15h M MODE SELECT 16h M RESERVE 17h M RELEASE 1Ah M MODE SENSE 1Bh M START/STOP UNIT 1Ch O RECEIVE DIAGNOSTIC RESULTS 1Dh M SEND DIAGNOSTIC 1Eh M PREVENT/ALLOW MEDIUM REMOVAL 25h M READ CAPACITY 28h M READ EXTENDED 2Bh M SEEK EXTENDED 2Fh M VERIFY 3Bh M WRITE BUFFER 3Ch M READ BUFFER 40h M EJECT CADDY 41h M READ TOC 42h M READ Q SUBCODE 43h M READ HEADER 44h M PLAYBACK STATUS 45h M PAUSE 46h M PLAY AUDIO TRACK 47h M PLAYBACK AUDIO 48h M PLAYBACK STOP ============================================================================== Group Zero Commands for CD-ROM Interface The controller will automatically set the drive to CD-ROM data mode upon receipt of a group zero command. Group Zero Commands for CD-ROM Interface ============================================================================== Operation Code Type Command Name Section ------------------------------------------------------------------------------ 00h M TEST UNIT READY 01h M REZERO UNIT 02h R 03h M REQUEST SENSE 04h R 05h R 06h R 07h R 08h M READ 09h R 0Ah R 0Bh M SEEK 0Ch R 0Dh R 0Eh R 0Fh R 10h R 11h R 12h M INQUIRY 13h R 14h R 15h M MODE SELECT 16h M RESERVE 17h M RELEASE 18h R 19h R 1Ah M MODE SENSE 1Bh M START/STOP UNIT 1Ch O RECEIVE DIAGNOSTIC RESULTS 1Dh M SEND DIAGNOSTIC 1Eh M PREVENT/ALLOW MEDIUM REMOVAL 1Fh R ============================================================================== Key: M = Command implementation is required. O = Command implementation is optional. R = Operation code is reserved. TEST UNIT READY Command ============================================================================== Bit| 7 | 6 | 5 | 4 | 3 | 2 | 1 | 0 | Byte | | | | | | | | | ============================================================================== 0 | Operation Code (00h) | -----|-----------------------------------------------------------------------| 1 | Logical Unit Number | Reserved | -----|-----------------------------------------------------------------------| 2 | Reserved | -----|-----------------------------------------------------------------------| 3 | Reserved | -----|-----------------------------------------------------------------------| 4 | Reserved | -----|-----------------------------------------------------------------------| 5 | Reserved | Flag | Link | ============================================================================== The TEST UNIT READY command provides a means to check if the logical unit is in the ready condition. This is not a request for a self test. If the ready condition does not exist a CHECK CONDITION status will be returned and the appropriate additional sense code set. REZERO UNIT Command ============================================================================== Bit| 7 | 6 | 5 | 4 | 3 | 2 | 1 | 0 | Byte | | | | | | | | | ============================================================================== 0 | Operation Code (01h) | -----|-----------------------------------------------------------------------| 1 | Logical Unit Number | Reserved | -----|-----------------------------------------------------------------------| 2 | Reserved | -----|-----------------------------------------------------------------------| 3 | Reserved | -----|-----------------------------------------------------------------------| 4 | Reserved | -----|-----------------------------------------------------------------------| 5 | Reserved | Flag | Link | ============================================================================== The REZERO UNIT command requests that the controller position the optical pick-up at logical block address zero and enter the hold track state for the duration of the inactivity time. If the disconnect privilege is granted the controller will disconnect before performing the seek operation. If the ready condition does not exist a CHECK CONDITION status will be returned and the appropriate additional sense code set. The MODE SELECT parameters shall be set to their power-on values. REQUEST SENSE Command ============================================================================== Bit| 7 | 6 | 5 | 4 | 3 | 2 | 1 | 0 | Byte | | | | | | | | | ============================================================================== 0 | Operation Code (03h) | -----|-----------------------------------------------------------------------| 1 | Logical Unit Number | Reserved | -----|-----------------------------------------------------------------------| 2 | Reserved | -----|-----------------------------------------------------------------------| 3 | Reserved | -----|-----------------------------------------------------------------------| 4 | Allocation Length | -----|-----------------------------------------------------------------------| 5 | Reserved | Flag | Link | ============================================================================== The REQUEST SENSE command requests that the controller transfer sense data to the initiator. The sense data will be valid after a CHECK CONDITION status has been returned on the previous command. This sense data will be preserved by the controller for the initiator until 1) it is retrieved by a REQUEST SENSE command from that initiator. 2) the receipt of another command for the same logical unit from that initiator. 3) a reset condition occurs. Note: The sense data will be cleared upon receipt of any subsequent command for the same logical unit from the initiator that was returned the CHECK CONDITION status. (See 2.1.3) The allocation length specifies the maximum number of sense bytes to be returned. The controller will terminate the DATA IN phase when allocation length bytes have been transferred or when all available sense data have been transferred to the initiator, whichever is less. The REQUEST SENSE command will return the CHECK CONDITION status only to report catastrophic errors for the REQUEST SENSE command. Following a catastrophic error on a REQUEST SENSE command, sense data may be invalid. For example: 1) A reserved bit is set the command descriptor block. 2) An unrecovered parity error occurs on the bus. 3) A controller malfunction prevents return of the sense data. If an error occurs during the execution of the REQUEST SENSE command, but it is not catastrophic, the controller will return the sense data with GOOD status. Error Code 70h Sense Data Format ============================================================================== Bit| 7 | 6 | 5 | 4 | 3 | 2 | 1 | 0 | Byte | | | | | | | | | ============================================================================== 0 | Valid | Error Code (70h) | -----|-----------------------------------------------------------------------| 1 | Reserved | -----|-----------------------------------------------------------------------| 2 | Reserved | Sense Key | -----|-----------------------------------------------------------------------| 3 | (MSB) | - - -|- - Information Bytes - -| 6 | (LSB) | -----|-----------------------------------------------------------------------| 7 | Additional Sense Length (8h) | -----|-----------------------------------------------------------------------| 8 | (MSB) | - - -|- - Command Specific Information Bytes - -| 11 | (LSB) | -----|-----------------------------------------------------------------------| 12 | Additional Sense Code | -----|-----------------------------------------------------------------------| 13 | Reserved | -----|-----------------------------------------------------------------------| 14 | Reserved | -----|-----------------------------------------------------------------------| 15 | Reserved | ============================================================================== A valid bit of zero indicates that the information bytes are not defined. A valid bit of one indicates the information bytes contain valid information as defined in this document. The sense keys are described in Table 3-4. The additional sense codes are described in Tables 3-5 and 3-6. The contents of the information bytes are command specific and are defined under the appropriate command description. Unless specified otherwise, these bytes contain the unsigned logical block address associated with the sense key. The additional sense length specifies the number of additional sense bytes to follow. If the allocation length of the command descriptor block is too small to transfer all of the additional sense bytes, the additional sense length is not adjusted to reflect the truncation. The contents of the command specific information bytes are defined under the appropriate command description. Sense Key Descriptions ============================================================================== NO SENSE (0h). Indicates that there is no specific sense key information to be reported for the designated logical unit. RECOVERED ERROR (1h). Indicates that the last command completed successfully with some recovery action performed by the controller. Details may be determinable by examining the additional sense bytes and the information bytes. (See Tables 3-15, 3-16, 3-17 and 3-18.) NOT READY (2h). Indicates that the logical unit addressed is not accessible. Operator intervention may be required to correct this condition. (See 2.1.4) MEDIUM ERROR (3h). Indicates that the command terminated with a unrecovered error condition that was probably caused by a flaw in the medium or an error in the recorded data. This sense key may also be returned if the controller is unable to distinguish between a flaw in the medium and a specific hardware failure (sense key 4h). (See Tables 3-15, 3-16, 3-17 and 3-18.) HARDWARE ERROR (4h). Indicates that the controller detected a unrecoverable hardware failure (for example, controller failure, device failure, parity error, etc.) while performing the command or during a self test. ILLEGAL REQUEST (5h). Indicates that there was an illegal parameter in the command descriptor block or in the additional parameters supplied as data for some commands. If the controller detects an invalid parameter in the command descriptor block, then it will terminate the command without altering the medium. If the controller detects an invalid parameter in the additional parameters supplied as data, then the controller may have already altered the medium. UNIT ATTENTION (6h). Indicates that the removable medium may have been changed or the controller has been reset. (See 2.1.3) ABORTED COMMAND (Bh). Indicates that the controller aborted the command. The initiator may be able to recover by trying the command again. ============================================================================== Additional Sense Code Descriptions ============================================================================== | For Sense Key NO SENSE (0h): | | | | Code Description | | ---- -------------------------------------------------------------------- | | 00 No additional sense information | | For Sense Key RECOVERED ERROR (1h): | | | | Code Description | | ---- -------------------------------------------------------------------- | | 17 CIRC recovered data error | | 18 L-EC recovered data error | | For Sense Key NOT READY (2h): | | | | Code Description | | ---- -------------------------------------------------------------------- | | 04 Unit off line | | x0 Caddy not inserted in drive | | x1 Unable to recover TOC | | x2 Caddy load/eject failed | | For Sense Key MEDIUM ERROR (3h): | | | | Code Description | | ---- -------------------------------------------------------------------- | | 02 Error occurred during seek operation | | 11 L-EC uncorrectable data error (L-EC on) | | x3 CIRC unrecovered data error (L-EC off) | | For Sense Key HARDWARE ERROR (4h): | | | | Code Description | | ---- -------------------------------------------------------------------- | | 08 Logical unit communication failure | | 09 Tracking servo failure | | 40 Controller data buffer failure | | 41 Data path failure (Sony bus data error) | | 42 Power on failure | | 44 Internal controller failure | | 47 Interface parity error | | x4 Focus servo failure | | x5 Spindle servo failure | ============================================================================== Additional Sense Code Descriptions ============================================================================== | For Sense Key ILLEGAL REQUEST (5h): | | | | Code Description | | ---- -------------------------------------------------------------------- | | 20 Invalid command operation code | | 21 Logical block address not valid | | 22 Illegal function for CD-ROM | | 24 Illegal value in CDB field other than op-code or lba | | 25 Invalid logical unit number | | 26 Invalid field in parameter list | | x6 Prevent bit is set | | x7 Logical unit is reserved | | x8 End of user area encountered on this track | | x9 Illegal mode for this track | | For Sense Key UNIT ATTENTION (6h): | | | | Code Description | | ---- -------------------------------------------------------------------- | | 28 Not ready to ready transition (caddy inserted) | | 29 Power on, reset or BUS DEVICE RESET occurred | | 2A Mode select parameters changed | | For Sense Key ABORTED COMMAND (Bh): | | | | Code Description | | ---- -------------------------------------------------------------------- | | 43 Unsuccessful message retry | | 45 Reselect failure | | 48 Initiator detected error | | 49 Message out error | | xA Overlapped commands attempted | ============================================================================== READ Command ============================================================================== Bit| 7 | 6 | 5 | 4 | 3 | 2 | 1 | 0 | Byte | | | | | | | | | ============================================================================== 0 | Operation Code (08h) | -----|-----------------------------------------------------------------------| 1 | Logical Unit Number | (MSB) | -----|------------------------------ ---| 2 | Logical Block Address | -----|--- ---| 3 | (LSB) | -----|-----------------------------------------------------------------------| 4 | Transfer Length | -----|-----------------------------------------------------------------------| 5 | Reserved | Flag | Link | ============================================================================== The READ command requests that the controller transfer data to the initiator. The data will be transferred in whole blocks without delays occurring during a block transfer on the bus. After completion of the read operation the drive will enter the hold track state for the duration of the inactivity time. The logical block address specifies the logical block at which the read operation will begin. The transfer length specifies the number of contiguous logical blocks of data to be transferred. A transfer length of zero indicates that 256 logical blocks will be transferred. Any other value indicates the number of logical blocks that will be transferred. This command will be terminated with a RESERVATION CONFLICT status if any reservation conflict exists and no data will be read. This command will be terminated with a CHECK CONDITION status for a number of reasons. The error recovery parameters determine when and how the data errors are reported. See Tables 3-15, 3-16, 3-17 and 3-18. The data transfer will also be terminated with a CHECK CONDITION STATUS if any of the following events occur while a read operation is in progress. The sense key will be set to ILLEGAL REQUEST and the additional sense code set to END OF USER AREA ENCOUNTERED ON THIS TRACK. 1) A mode zero is detected (i.e. post-gap detected). 2) An index equal to 0 is detected (i.e. pre-gap detected). 3) A track number change is detected (i.e. lead-out, mode one <-> mode two). 4) A change in bit one of the control field is detected. If the logical block address requested is not within a data track the command will be terminated with a CHECK CONDITION status. The sense key will be set to ILLEGAL REQUEST and the additional sense code set to ILLEGAL MODE FOR THIS TRACK. If the logical block address plus the transfer length requested exceeds that reported by the READ CAPACITY data a CHECK CONDITION status will be returned. The sense key is set to ILLEGAL REQUEST and the additional sense code is set to LOGICAL BLOCK ADDRESS NOT VALID. SEEK Command ============================================================================== Bit| 7 | 6 | 5 | 4 | 3 | 2 | 1 | 0 | Byte | | | | | | | | | ============================================================================== 0 | Operation Code (0Bh) | -----|-----------------------------------------------------------------------| 1 | Logical Unit Number | (MSB) | -----|------------------------------ ---| 2 | Logical Block Address | -----|--- ---| 3 | (LSB) | -----|-----------------------------------------------------------------------| 4 | Reserved | -----|-----------------------------------------------------------------------| 5 | Reserved | Flag | Link | ============================================================================== The SEEK command requests that the controller position the optical pick-up at logical block address specified and enter the hold track state for the duration of the inactivity time. A seek operation may be requested to any logical block address that is less than or equal to that reported by a READ CAPACITY command. If the logical block address is within a data track then the address will be verified against the header address. If the logical block address is within an audio track it is first converted into a Q sub-channel address and the seek is performed to that address. The Q sub-channel address has a tolerance of +/- 75 blocks. If the disconnect privilege is granted the controller will disconnect before performing the seek operation. If the ready condition does not exist a CHECK CONDITION status will be returned and the appropriate additional sense code set. If the logical block address requested exceeds that reported by the READ CAPACITY data a CHECK CONDITION status will be returned. The sense key is set to ILLEGAL REQUEST and the additional sense code is set to LOGICAL BLOCK ADDRESS NOT VALID. If the drive is unable to complete the seek operation a CHECK CONDITION status will be returned. The sense key is set to MEDIUM ERROR and the additional sense code is set to ERROR OCCURRED DURING SEEK OPERATION. INQUIRY Command ============================================================================== Bit| 7 | 6 | 5 | 4 | 3 | 2 | 1 | 0 | Byte | | | | | | | | | ============================================================================== 0 | Operation Code (12h) | -----|-----------------------------------------------------------------------| 1 | Logical Unit Number | Reserved | -----|-----------------------------------------------------------------------| 2 | Reserved | -----|-----------------------------------------------------------------------| 3 | Reserved | -----|-----------------------------------------------------------------------| 4 | Allocation Length | -----|-----------------------------------------------------------------------| 5 | Reserved | Flag | Link | ============================================================================== The INQUIRY command requests that information regarding parameters of the controller and its attached peripheral device be sent to the initiator. The allocation length specifies the maximum number of bytes that the initiator has allocated for returned INQUIRY data. An allocation length of zero indicates that no INQUIRY data will be transferred. This condition will not be considered as an error. The controller will terminate the DATA IN phase when allocation length bytes have been transferred or when all available INQUIRY data have been transferred to the initiator, whichever is less. The INQUIRY command will be terminated with a BUSY status when the controller is performing power-on diagnostics or the reading of the table of contents is occurring. The INQUIRY command will be terminated with a CHECK CONDITION status only then the controller has detected a catastrophic error. If an INQUIRY command is received from an initiator with a pending unit attention condition (before the controller reports CHECK CONDITION status), the controller will perform the INQUIRY command and will not clear the unit attention condition. Inquiry Data ============================================================================== Bit| 7 | 6 | 5 | 4 | 3 | 2 | 1 | 0 | Byte | | | | | | | | | ============================================================================== 0 | Peripheral Device Type (05h) | -----|-----------------------------------------------------------------------| 1 | RMB | Device-Type Qualifier | -----|-----------------------------------------------------------------------| 2 | ISO Version | ECMA Version | ANSI-Approved Version | -----|-----------------------------------------------------------------------| 3 | Reserved | Response Data Format | -----|-+---------------------------------------------------------------------| 4 | Additional Length (n - 4) | -----|-----------------------------------------------------------------------| 5 | Reserved | -----|-----------------------------------------------------------------------| 6 | Reserved | -----|-----------------------------------------------------------------------| 7 | Reserved | -----|-+---------------------------------------------------------------------| 8 | (MSB) | - - -+- - Vendor Identification - -| 15 | (LSB) | -----|-+---------------------------------------------------------------------| 16 | (MSB) | - - -+- - Product Identification - -| 31 | (LSB) | -----|-+---------------------------------------------------------------------| 32 | (MSB) | - - -+- - Product Revision Level - -| 35 | (LSB) | ============================================================================== The peripheral device type code is set to 05h if the logical unit is present. If the logical unit is not present the peripheral device type code is set to 7Fh. The RMB bit is set to because the disk is removable. The device-type qualifier is a set to zero. The response data format is set to one. The additional length is set to 31h. If the allocation length of the command descriptor block is too small to transfer all of the parameters, the additional length will not be adjusted to reflect the truncation. The vendor identification field contains eight bytes of ASCII data identifying the vendor of the product as follows: Byte 08 09 10 11 12 13 14 15 ASCII S O N Y sp sp sp sp Code 53h 4Fh 4Eh 59h 20h 20h 20h 20h The product identification field contains sixteen bytes of ASCII data defined as follows: Byte 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 ASCII C D - R O M sp C D U - x x x x sp Code 43h 44h 2Dh 52h 4Fh 4Dh 20h 43h 44h 55h 2Dh 3xh 3xh 3xh 3xh 20h The product revision level field contains four bytes of ASCII data which indicate the revision level of the controller firmware defined as follows: Byte 32 33 34 35 ASCII x . x X X - is lower case letter indicating revision Code 3xh 2Eh 3xh 6Yh Y - is corresponding hex code for letter MODE SELECT Command ============================================================================== Bit| 7 | 6 | 5 | 4 | 3 | 2 | 1 | 0 | Byte | | | | | | | | | ============================================================================== 0 | Operation Code (15h) | -----|-----------------------------------------------------------------------| 1 | Logical Unit Number | Reserved | SP | -----|-----------------------------------------------------------------------| 2 | Reserved | -----|-----------------------------------------------------------------------| 3 | Reserved | -----|-----------------------------------------------------------------------| 4 | Parameter List Length | -----|-----------------------------------------------------------------------| 5 | Reserved | Flag | Link | ============================================================================== The MODE SELECT command provides a means for the initiator to specify medium, logical unit, or peripheral device parameters to the controller. The save parameters (SP) bit is set to zero because the CD-ROM cannot support saving parameters. The parameter list length specifies the length in bytes of the MODE SELECT parameter list that will be transferred from the initiator to the controller. A parameter list length of zero indicates that no data will be transferred. This condition will not be considered as an error. The block descriptor and the pages which follow if any must be sent in their entirety. Truncation of a page due to an incorrect parameter list length will be considered an error. The command will be terminated with a CHECK CONDITION status. The sense key is set to ILLEGAL REQUEST and the additional sense code is set to INVALID FIELD IN PARAMETER LIST. The MODE SELECT parameter list contains a four-byte header, followed by zero or one eight-byte block descriptor, followed by zero or more pages. Mode Select Parameter List ============================================================================== Bit| 7 | 6 | 5 | 4 | 3 | 2 | 1 | 0 | Byte | | | | | | | | | ============================================================================== 0 | Reserved | -----|-----------------------------------------------------------------------| 1 | Medium Type | -----|-----------------------------------------------------------------------| 2 | Reserved | -----|-----------------------------------------------------------------------| 3 | Block Descriptor Length (00h or 08h) | ============================================================================== | Block Descriptor | ============================================================================== 0 | Reserved | -----|-----------------------------------------------------------------------| 1 | (00h) | -----|-----------------------------------------------------------------------| 2 | (00h) | -----|-----------------------------------------------------------------------| 3 | (00h) | -----|-----------------------------------------------------------------------| 4 | Reserved | -----|-----------------------------------------------------------------------| 5 | (MSB) | -----|--- ---| 6 | Block Length | -----|--- ---| 7 | (LSB) | ============================================================================== | Page(s) | ============================================================================== 0 | Reserved | Page Code | -----|-----------------------------------------------------------------------| 1 | Page-Specific Parameter Length | -----|-----------------------------------------------------------------------| 2 | | - - -|- - Page-Specific Parameters - -| n | | ============================================================================== The medium type is set to zero to indicate the default disk is CD-ROM. The block descriptor length shall be set to either 00h or 08h. The block descriptor specifies the medium characteristics for the whole disk. The block length requests that the controller use the logical block length specified for data transfers. The controller will accept the block lengths as shown in Table 3-10. Any other value will be considered an error. The command will be terminated with a CHECK CONDITION status. The sense key is set to ILLEGAL REQUEST and the additional sense code is set to INVALID FIELD IN PARAMETER LIST. The block length is applicable to the whole disk except the audio tracks. Block Lengths for CD-ROM ============================================================================== Block Length Description -------+---------------------------------------------------------------------- 256 256 bytes of user data CD-ROM mode one data required 512 512 bytes of user data CD-ROM mode one data required 1024 1024 bytes of user data CD-ROM mode one data required 2048 2048 bytes of user data CD-ROM mode one data required 2336 2048 bytes of user data & 288 bytes ECC data if CD-ROM mode one data 2336 bytes of user data if CD-ROM mode two data (includes CD-I) 2340 4 byte header & 2048 bytes of user data & 288 bytes ECC data if CD-ROM mode one data 4 byte header & 2336 bytes of user data if CD-ROM mode two data (includes CD-I) ============================================================================== A block length of 2336 or 2340 can be specified for CD-ROM mode one or CD- ROM mode two data. If a read operation is requested on a track that is CD-ROM mode two data and L-EC is not disabled the command will be terminated with a CHECK CONDITION status. The sense key will be set to ILLEGAL REQUEST and the additional sense code set to ILLEGAL MODE FOR THIS TRACK. Each page descriptor specifies parameters for the controller to use for subsequent operations on the specified logical unit. The format of each page descriptor is specified in this document. The page codes are given in Table 3-11. The parameter length field specifies the length in bytes of the parameters that follow for that page. The initiator shall set this value to the value that is returned in the parameter length field for the same page by the MODE SENSE command. If this condition is not met, the controller will terminate the command with a CHECK CONDITION status. The sense key is set to ILLEGAL REQUEST and the additional sense code is set to INVALID FIELD IN PARAMETER LIST. Page Codes ============================================================================== Page Code Description Table ---------- -------------------------------------------- ----- 01h Error Recovery Parameters 3-13 02h Disconnect/Reconnect Control Parameters 3-19 20h Drive Parameters 3-21 ============================================================================== Page Code One: Error Recovery Parameters ============================================================================== Bit| 7 | 6 | 5 | 4 | 3 | 2 | 1 | 0 | Byte | | | | | | | | | ============================================================================== 0 | Reserved | Page Code (01h) | -----|-----------------------------------------------------------------------| 1 | Parameter Length (06h) | -----|-----------------------------------------------------------------------| 2 | Error Recovery | -----|-----------------------------------------------------------------------| 3 | Read Retry Count | -----|-+---------------------------------------------------------------------| 4 | Reserved | -----|-----------------------------------------------------------------------| 5 | Reserved | -----|-----------------------------------------------------------------------| 6 | Reserved | -----|-----------------------------------------------------------------------| 7 | Reserved | ============================================================================== The implementation of error recovery procedures for CD-ROM devices is markedly different than those used for magnetic medium disk drives. At least one level of error correction (i.e. CIRC) is required to unscramble the data stream. Therefore the performance of the drive may differ substantially from what would be expected by sending the same error recovery parameters to a magnetic medium device. The correlation of the error recovery parameter and the bit settings defined in CCS is given in Table 3-14. The error recovery parameter is defined in Tables 3-15, 3-16, 3-17 and 3-18. If the error recovery parameter is set to any other value the command will be terminated with a CHECK CONDITION status. The sense key will be set to ILLEGAL REQUEST and the additional sense code set to ILLEGAL VALUE IN PARAMETER LIST. The read retry count field specifies the number of times that the controller will attempt its read recovery algorithm. The default value is zero. Error Recovery Byte Bit Settings ======================================================= |value| Error Recovery | |-----+-----+-----+-----+-----+-----+-----+-----+-----| | | | | TB | | EER | PER | DTE | DCR | |-----+-----+-----+-----+-----+-----+-----+-----+-----| | 00 | 0 0 0 0 0 | |-----+-----+-----+-----+-----+-----+-----+-----+-----| | 01 | 0 0 0 0 1 | |-----+-----+-----+-----+-----+-----+-----+-----+-----| | 04 | 0 0 1 0 0 | |-----+-----+-----+-----+-----+-----+-----+-----+-----| | 05 | 0 0 1 0 1 | |-----+-----+-----+-----+-----+-----+-----+-----+-----| | 06 | 0 0 1 1 0 | |-----+-----+-----+-----+-----+-----+-----+-----+-----| | 07 | 0 0 1 1 1 | |-----+-----+-----+-----+-----+-----+-----+-----+-----| | 20 | 1 0 0 0 0 | |-----+-----+-----+-----+-----+-----+-----+-----+-----| | 21 | 1 0 0 0 1 | |-----+-----+-----+-----+-----+-----+-----+-----+-----| | 26 | 1 0 1 1 0 | |-----+-----+-----+-----+-----+-----+-----+-----+-----| | 27 | 1 0 1 1 1 | ======================================================= A CIRC recovered data error is defined as a block for which the C2PO flag was set, but on a subsequent read operations it was not set. The number of subsequent read operations is limited to the read retry count. Layered error correction is not used. A CIRC unrecovered data error is defined as a block for which the C2PO flag was set on all read operations up to the read retry count. Only read retries are used, layered error correction is not used. An L-EC recovered data error is defined as a block for which the C2PO flag was asserted but the layered error correction was able to correct the block within the read retry count. An L-EC uncorrectable data error is defined as a block which could not be corrected by layered error correction within the read retry count. The error recovery procedures in Tables 3-15 and 3-16 are applicable only to CD-ROM mode one data. If one of the these error recovery parameters is specified and CD-ROM mode two data is detected the read operation will be terminated with a CHECK CONDITION status. The sense key will be set to ILLEGAL MODE FOR THIS TRACK. Error Recovery Procedures - CD-ROM Mode One Data ============================================================================== Error Recovery Description ------------------------------------------------------------------------------ 00h This is the default setting of the error recovery parameter on when a power-on or reset condition occurs. The maximum error recovery procedures are used. Only L-EC uncorrectable data errors are reported. If an L-EC uncorrectable data error occurs data transfer is terminated with a CHECK CONDITION status. The sense key is set to MEDIUM ERROR and the additional sense code is set to L-EC UNCORRECTABLE DATA ERROR. The information bytes are set to the address of the last block transferred to the initiator plus one. 04h The maximum error recovery procedures are used. L-EC recovered data errors are reported. If an L-EC recovered data error occurs data transfer is not terminated. However, when the data transfer has completed a CHECK CONDITION status is reported. The sense key is set to RECOVERED ERROR and the additional sense code is set to L-EC RECOVERED DATA ERROR. The information bytes are set to the address of the last block for which an L-EC recovered data error was detected. If an L-EC uncorrectable data error occurs data transfer is not terminated. However, when the data transfer has completed a CHECK CONDITION status is reported. The sense key is set to MEDIUM ERROR and the additional sense code is set to L-EC UNCORRECTABLE DATA ERROR. The information bytes are set to the address of the first block on which an L-EC uncorrectable error was detected. 06h The maximum error recovery procedures are used. L-EC recovered data errors are reported. If an L-EC recovered data error occurs data transfer is terminated with a CHECK CONDITION status. The sense key is set to RECOVERED ERROR and the additional sense code is set to L-EC RECOVERED DATA ERROR. The information bytes are set to the address of the last block transferred to the initiator plus one. If an L-EC uncorrectable data error occurs data transfer is terminated with a CHECK CONDITION status. The sense key is set to MEDIUM ERROR and the additional sense code is set to L-EC UNCORRECTABLE DATA ERROR. The information bytes are set to the address of the first block on which an L-EC uncorrectable error was detected. ============================================================================== Error Recovery Procedures - CD-ROM Mode One Data ============================================================================== Error Recovery Description ------------------------------------------------------------------------------ 20h The maximum error recovery procedures are used. Only L-EC uncorrectable data errors are reported. If an L-EC uncorrectable data error occurs data transfer is not terminated. However, when the data transfer has completed a CHECK CONDITION status is reported. The sense key is set to MEDIUM ERROR and the additional sense code is set to L-EC UNCORRECTABLE DATA ERROR. The information bytes are set to the address of the last block for which an L-EC uncorrectable data error was detected. 26h The maximum error recovery procedures are used. L-EC recovered data errors are reported. If an L-EC recovered data error occurs data transfer is terminated at the end of the first encountered L-ECC uncorrectable data block with a CHECK CONDITION status. The sense key is set to RECOVERED ERROR and the additional sense code is set to L-EC RECOVERED DATA ERROR. The information bytes are set to the address of the last block transferred. If an L-EC uncorrectable data error occurs data transfer is terminated with a CHECK CONDITION status after the L-EC uncorrectable block is transferred. The sense key is set to MEDIUM ERROR and the additional sense code is set to L-EC UNCORRECTABLE DATA ERROR. The information bytes are set to the address of the first block on which an L-EC uncorrectable error was detected. ============================================================================== Error Recovery Procedures - CD-ROM Mode One or Two Data ============================================================================== Error Recovery Description ------------------------------------------------------------------------------ 01h Only retries of the read operation are used (layer error correction is not used). Only CIRC unrecovered data errors are reported. If an CIRC unrecovered data error occurs data transfer is terminated with a CHECK CONDITION status. The sense key is set to MEDIUM ERROR and the additional sense code is set to CIRC UNRECOVERED DATA ERROR. The information bytes are set to the address of the last block transferred to the initiator plus one. 05h Only retries of the read operation are used (layer error correction is not used). CIRC recovered data errors are reported. If a CIRC recovered data error occurs data transfer is not terminated. However, when the data transfer has completed a CHECK CONDITION status is reported. The sense key is set to RECOVERED ERROR and the additional sense code is set to CIRC RECOVERED DATA ERROR. The information bytes are set to the address of the last block for which an CIRC recovered data error was detected. If an CIRC unrecovered data error occurs data transfer is not terminated. However, when the data transfer has completed a CHECK CONDITION status is reported. The sense key is set to MEDIUM ERROR and the additional sense code is set to CIRC UNRECOVERED DATA ERROR. The information bytes are set to the address of the first block on which an CIRC unrecovered error was detected. 07h Only retries of the read operation are used (layer error correction is not used). CIRC recovered data errors are reported. If a CIRC recovered data error occurs data transfer is terminated with a CHECK CONDITION status. The sense key is set to RECOVERED ERROR and the additional sense code is set to CIRC RECOVERED DATA ERROR. The information bytes are set to the address of the last block transferred to the initiator plus one. If an CIRC unrecovered data error occurs data transfer is terminated with a CHECK CONDITION status. The sense key is set to MEDIUM ERROR and the additional sense code is set to CIRC UNRECOVERED DATA ERROR. The information bytes are set to the address of the first block on which an CIRC unrecovered error was detected. ============================================================================== Error Recovery Procedures - CD-ROM Mode One or Two Data ============================================================================== Error Recovery Description ------------------------------------------------------------------------------ 21h Only retries of the read operation are used (layer error correction is not used). Only CIRC unrecovered data errors are reported. If a CIRC unrecovered data error occurs data transfer is not terminated. However, when the data transfer has completed a CHECK CONDITION status is reported. The sense key is set to MEDIUM ERROR and the additional sense code is set to CIRC UNRECOVERED DATA ERROR. The information bytes are set to the address of the last block for which a CIRC unrecovered data error was detected. 27h Only retries of the read operation are used (layer error correction is not used). CIRC recovered data errors are reported. If a CIRC recovered data error occurs data transfer is terminated at the end of the first encountered CIRC unrecovered data block with a CHECK CONDITION status. The sense key is set to RECOVERED ERROR and the additional sense code is set to CIRC RECOVERED DATA ERROR. The information bytes are set to the address of the last block transferred to the initiator. If an CIRC unrecovered data error occurs data transfer is terminated with a CHECK CONDITION status after the CIRC unrecovered block is transferred. The sense key is set to MEDIUM ERROR and the additional sense code is set to CIRC UNRECOVERED DATA ERROR. The information bytes are set to the address of the first block on which an CIRC unrecovered error was detected. ============================================================================== Page Code Two: Disconnect-Reconnect Parameters ============================================================================== Bit| 7 | 6 | 5 | 4 | 3 | 2 | 1 | 0 | Byte | | | | | | | | | ============================================================================== 0 | Reserved | Page Code (02h) | -----|-----------------------------------------------------------------------| 1 | Parameter Length (0Ah) | -----|-----------------------------------------------------------------------| 2 | Buffer Full Ratio | -----|-----------------------------------------------------------------------| 3 | Reserved | -----|-+---------------------------------------------------------------------| 4 | (MSB) | -----|--- Bus Inactivity Limit ---| 5 | (LSB) | -----|-----------------------------------------------------------------------| 6 | (MSB) | -----|--- Disconnect Time Limit ---| 7 | (LSB) | -----|-+---------------------------------------------------------------------| 8 | (MSB) | -----|--- Connect Time Limit ---| 9 | (LSB) | -----|-----------------------------------------------------------------------| 10 | Reserved | -----|-----------------------------------------------------------------------| 11 | Reserved | ============================================================================== The Buffer Full Ratio indicates to the controller, on read operations, how full the buffer will be prior to attempting a reselection. The number of blocks available in the buffer when reselection is attempted for given Buffer Full Ratio is specified in Table 3-20. The default value is eight. The buffer full ratio is not applicable to audio tracks. Buffer Full Ratios ============================================================================== Value Number of Number of Value Number of Number of of Buffer 2048 byte 2336/2340 of Buffer 2048 byte 2336/2340 Full Ratio blocks blocks Full Ratio blocks blocks ---------- --------- --------- ---------- --------- --------- 00h 32 28 01h - 08h 1 1 81h - 88h 17 15 09h - 10h 2 2 89h - 90h 18 16 11h - 18h 3 3 91h - 98h 19 17 19h - 20h 4 4 99h - A0h 20 18 21h - 28h 5 5 A1h - A8h 21 19 29h - 30h 6 6 A9h - B0h 22 20 31h - 38h 7 7 B1h - B8h 23 21 39h - 40h 8 8 B9h - C0h 24 21 41h - 48h 9 8 C1h - C8h 25 22 49h - 50h 10 9 C9h - D0h 26 23 51h - 58h 11 10 D1h - D8h 27 24 59h - 60h 12 11 D9h - E0h 28 25 61h - 68h 13 12 E1h - E8h 29 26 69h - 70h 14 13 E9h - F0h 30 27 71h - 78h 15 14 F1h - F8h 31 28 79h - 80h 16 15 F9h - FFh 32 28 ============================================================================== The Bus Inactivity Limit indicates the maximum time in 100 microsecond increments that the controller will assert the BSY signal without a REQ/ACK handshake. If the Bus Inactivity Limit is exceeded the controller will disconnect if the initiator has granted the disconnect privilege. The controller may round to its nearest capable value. A value of zero allows the controller to assert BSY until completion of the command. The default value of Bus Inactivity Limit is zero. The Disconnect Time Limit indicates the minimum time in 100 microsecond increments that the controller will delay reselection. The controller may round to its nearest capable value. A value of zero allows the controller initiate a reselection without a delay. The default value of Disconnect Time Limit is zero. The Connect Time Limit indicates the maximum time in 100 microsecond increments that the controller will use the bus before disconnecting if the initiator has granted the disconnect privilege. The controller may round to its nearest capable value. A value of zero allows the controller to determine if and when a disconnect occurs. The default value of Connect Time Limit is zero. Page Code Twenty: Drive Parameters ============================================================================== Bit| 7 | 6 | 5 | 4 | 3 | 2 | 1 | 0 | Byte | | | | | | | | | ============================================================================== 0 | Reserved | Page Code (20h) | -----|-----------------------------------------------------------------------| 1 | Parameter Length (02h) | -----|-----------------------------------------------------------------------| 2 | Reserved | -----|-----------------------------------------------------------------------| 3 | Reserved | Inactivity Timer Multiplier | ============================================================================== The Inactivity Timer Multiplier sets the length of time in multiples of two minutes that the drive will remain in the hold track state after completion of a seek or read operation. At power-on, the default value for the Inactivity Timer Multiplier is five. Inactivity Times ===================================== Inactivity Timer Minimum Time in Multiplier Hold Track State ----------------- ------------------ 0h infinite 1h 2 minutes 2h 4 minutes 3h 6 minutes 4h 8 minutes 5h 10 minutes 6h 12 minutes 7h 14 minutes 8h 16 minutes 9h 18 minutes Ah 20 minutes Bh 22 minutes Ch 24 minutes Dh 26 minutes Eh 28 minutes Fh 30 minutes ===================================== RESERVE Command ============================================================================== Bit| 7 | 6 | 5 | 4 | 3 | 2 | 1 | 0 | Byte | | | | | | | | | ============================================================================== 0 | Operation Code (16h) | -----|-----------------------------------------------------------------------| 1 | Logical Unit Number | 3rdPty | Third Party Device ID |Reserved| -----|-----------------------------------------------------------------------| 2 | Reserved | -----|-----------------------------------------------------------------------| 3 | Reserved | -----|-----------------------------------------------------------------------| 4 | Reserved | -----|-----------------------------------------------------------------------| 5 | Reserved | Flag | Link | ============================================================================== The RESERVE command is used to reserve a logical units for the use of the initiator. The third-party reservation allows logical units to be reserved for another specified initiator. The RESERVE and RELEASE commands provide the basic mechanism for contention resolution in multiple-initiator systems. This command will request that the entire logical unit be reserved for the exclusive use of the initiator until the reservation is superseded by another valid RESERVE command from the initiator that made the reservation or until released by a RELEASE command from the same initiator that made the reservation, by a BUS DEVICE RESET message from any initiator, by a "hard" RESET condition, or by a power off/on cycle. A logical unit reservation will not be granted if the logical unit is reserved by another initiator. It will be permissible for an initiator to reserve a logical unit that is currently reserved by that initiator. If the logical unit, or any extent within the logical unit is reserved for another initiator, the controller will respond by returning a RESERVATION CONFLICT status. If, after honoring the reservation, any other initiator then subsequently attempts to perform any command on the reserved logical unit other than an INQUIRY or a REQUEST SENSE command, the command will be rejected with RESERVATION CONFLICT status. Third Party Reservation The third-party reservation for the RESERVE command allows an initiator to reserve a logical unit for another initiator. If the third-party (3rdPty) bit is zero, then the third-party reservation option is not requested. If the 3rdPty bit is one then the specified logical unit will be reserved for the initiator specified in the third-party device ID field. The controller will preserve the reservation until it is superseded by another valid RESERVE command from the initiator that made the reservation or until it is released by the same initiator, by a BUS DEVICE RESET message from any initiator, or a reset condition. The controller will ignore any attempt to release the reservation made by any other initiator. Superseding Reservations An initiator that holds a current reservation may modify that reservation by issuing another RESERVE command to the same logical unit. The superseding RESERVE command will release the previous reservation when the new reservation request is granted. The current reservation will not be modified if the new reservation request cannot be granted. If the superseding reservation cannot be granted because of conflicts with a previous active reservation (other than the reservation being superseded), then the controller will return RESERVATION CONFLICT status. RELEASE Command ============================================================================== Bit| 7 | 6 | 5 | 4 | 3 | 2 | 1 | 0 | Byte | | | | | | | | | ============================================================================== 0 | Operation Code (17h) | -----|-----------------------------------------------------------------------| 1 | Logical Unit Number | 3rdPty | Third Party Device ID |Reserved| -----|-----------------------------------------------------------------------| 2 | Reserved | -----|-----------------------------------------------------------------------| 3 | Reserved | -----|-----------------------------------------------------------------------| 4 | Reserved | -----|-----------------------------------------------------------------------| 5 | Reserved | Flag | Link | ============================================================================== The RELEASE command is used to release previously reserved logical units. It is not an error for an initiator to attempt to release a reservation that is not currently active. In this case, the controller returns GOOD status without altering any other reservation. This command will cause the controller to terminate the logical unit reservation from the initiator Third Party Release The third-party release for the RELEASE command allows an initiator to release a logical unit reserved using third-party reservation. If the third-party (3rdPty) bit is zero, then the third-party release option is not requested. If the 3rdPty bit is one, the controller will release the specified logical unit only if the reservation was made using the third-party reservation option by the initiator that is requesting the release for the same initiator as specified in the third-party device ID field. MODE SENSE Command ============================================================================== Bit| 7 | 6 | 5 | 4 | 3 | 2 | 1 | 0 | Byte | | | | | | | | | ============================================================================== 0 | Operation Code (1Ah) | -----|-----------------------------------------------------------------------| 1 | Logical Unit Number | Reserved | -----|-----------------------------------------------------------------------| 2 | PC | Page Code | -----|-----------------------------------------------------------------------| 3 | Reserved | -----|-----------------------------------------------------------------------| 4 | Allocation Length | -----|-----------------------------------------------------------------------| 5 | Reserved | Flag | Link | ============================================================================== The MODE SENSE command provides a means for a controller to report parameters to the initiator. It is a complementary command to the MODE SELECT command. The page control (PC) field defines the type of parameter values to be returned as shown below. Page Control Bit Definition ====================================== DB(7) DB(6) Type of Parameter Values ----- ----- ------------------------ 0 0 Current Values 0 1 Changeable Values 1 0 Default Values 1 1 Default Values ====================================== The page code specifies which page or pages to return. The page codes are defined in Table 3-24. If the page code specified is not listed in Table 3-24 the command will be terminated with a CHECK CONDITION status. The sense key will be set to ILLEGAL REQUEST and the additional sense code set to ILLEGAL VALUE IN CDB. If the page code is 3Fh, all implemented pages are requested to be returned by the controller. The pages are returned in ascending order. Page Codes ============================================================================== Page Code Description Table Sense Data Length ---------- --------------------------------------- ----- ------------------ 01h Error Recovery Parameters 3-13 13h 02h Disconnect/Reconnect Control Parameters 3-19 17h 20h Drive Parameters 3-21 0Fh 3Fh Return all page descriptors 27h ============================================================================== The allocation length specifies the number of bytes that the initiator has allocated for returned MODE SENSE data. An allocation length of zero indicates that no MODE SENSE data will be transferred. This condition will not be considered as an error. Any other value indicates the maximum number of bytes that will be transferred. The controller will terminate the DATA IN phase when allocation length bytes have been transferred or when all available MODE SENSE data have been transferred to the initiator, whichever is less. Current Values A PC field value of 0h requests the controller return the current values for the page code specified. The current values returned are either the parameters set in the last successful MODE SELECT command or the default values if a MODE SELECT command has not been executed. Changeable Values A PC field value of 1h requests the controller return the changeable values for the page code specified. The page requested will be returned with the bits that are allowed to be changed set to one. Parameters that are not changeable will be set to zero. If any part of a field is changeable all bits in that field are set to one. The page descriptor as defined in this document will always be returned even if none of parameters are changeable within the page. Default Values A PC field value of 2h requests the controller return the default values for the page code specified. The page requested will be returned with the default parameters set. The medium type is set to zero to indicate the default disk is CD-ROM. The block descriptor length is set to 08h. The block descriptor specifies the medium characteristics for the whole disk. The block length specifies, in bytes, the logical block size in use by the controller. This is applicable to whole disk except those tracks that are audio. The default block length is 2048 and is returned if default values are requested. The current block length is returned if current values are requested. A block length of FFh FFh FFh is returned if changeable values are requested. Pages are returned following the block descriptor if requested. Each page has a header defining the page code and the page length. Following the header are the page parameters. The page length value is the number of bytes that follow the page length byte and does not include the header. The pages are defined in Section 3.7.1.1 to 3.7.1.4. START/STOP UNIT Command ============================================================================== Bit| 7 | 6 | 5 | 4 | 3 | 2 | 1 | 0 | Byte | | | | | | | | | ============================================================================== 0 | Operation Code (1Bh) | -----|-----------------------------------------------------------------------| 1 | Logical Unit Number | Reserved | Immed | -----|-----------------------------------------------------------------------| 2 | Reserved | -----|-----------------------------------------------------------------------| 3 | Reserved | -----|-----------------------------------------------------------------------| 4 | Reserved | LoEj | Start | -----|-----------------------------------------------------------------------| 5 | Reserved | Flag | Link | ============================================================================== The START/STOP UNIT command requests that the controller enable or disable the logical unit for further operations. An immediate (Immed) bit of one indicates that status will be returned as soon as the operation is initiated. An Immed bit of zero indicates that status will be returned after the operation is completed. A load/eject (LoEj) bit of zero indicates that no action is to be taken regarding loading or ejecting the disk. A LoEj bit of one indicates that the disk is to be unloaded if the start bit is zero. A start bit of one requests the logical unit be made ready for use. A start bit of zero requests that the logical unit be stopped. LoEj Start Description ----- ----- ------------------------------------------------ 0 0 spin down the disk, optical pick-up is not moved 0 1 spin up the disk, seek to last address requested 1 0 spin down the disk, eject the caddy 1 1 not supported If a PREVENT MEDIUM REMOVAL command has been issued, a request to eject the disk will be terminated with a CHECK CONDITION status. The sense key will be set to ILLEGAL REQUEST, and the additional sense code set to PREVENT BIT SET. RECEIVE DIAGNOSTIC RESULTS Command ============================================================================== Bit| 7 | 6 | 5 | 4 | 3 | 2 | 1 | 0 | Byte | | | | | | | | | ============================================================================== 0 | Operation Code (1Ch) | -----|-----------------------------------------------------------------------| 1 | Logical Unit Number | Reserved | -----|-----------------------------------------------------------------------| 2 | Reserved | -----|-----------------------------------------------------------------------| 3 | (MSB) | -----|--- Allocation Length ---| 4 | (LSB) | -----|-----------------------------------------------------------------------| 5 | Reserved | Flag | Link | ============================================================================== The RECEIVE DIAGNOSTIC RESULTS command requests analysis data be sent to the initiator after completion of a SEND DIAGNOSTIC command. The allocation length will specify the number of bytes that the initiator has allocated for returned diagnostic data. An allocation length of zero indicates that no diagnostic data will be transferred. Any other value indicates the maximum number of bytes that will be transferred. The controller terminates the DATA IN phase when allocation length bytes have been transferred or when all available diagnostic data have been transferred to the initiator, whichever is less. The RECEIVE DIAGNOSTIC data contains an eight-byte parameter list defined as follows. Receive Diagnostic Data ============================================================================== Bit| 7 | 6 | 5 | 4 | 3 | 2 | 1 | 0 | Byte | | | | | | | | | ============================================================================== 0 | Reserved | -----|-----------------------------------------------------------------------| 1 | Parameter Length | -----|-----------------------------------------------------------------------| 2 | ROM Diagnostic | -----|-----------------------------------------------------------------------| 3 | RAM Diagnostic | -----|-----------------------------------------------------------------------| 4 | Data Buffer Diagnostic | -----|-----------------------------------------------------------------------| 5 | Interface Diagnostic | -----|-----------------------------------------------------------------------| 6 | Reserved | -----|-----------------------------------------------------------------------| 7 | Reserved | ============================================================================== The parameter length specifies the length in bytes of the following SEND DIAGNOSTIC parameters. The sense data length does not include itself. A value of zero in any field indicates that the diagnostic if requested passed. If the ROM Diagnostic field is set to one, it indicates that the controller ROM has failed. If the ROM Diagnostic field is set to two, it indicates that the drive control ROM has failed. If the RAM Diagnostic field is set to one, it indicates that the controller RAM has failed. If the RAM Diagnostic field is set to two, it indicates that the drive control RAM has failed. If the Data Buffer Diagnostic field is set to one, it indicates that the controller data buffer has failed. If the Data Buffer Diagnostic field is set to two, it indicates that the drive control data buffer has failed. If the Data Buffer Diagnostic field is set to four, it indicates that the drive control error RAM has failed. If the Interface Diagnostic field is set to one, it indicates that the controller - drive control interface has failed. If the Interface Diagnostic field is set to two, it indicates that the drive control - mechanism control interface has failed. SEND DIAGNOSTIC Command ============================================================================== Bit| 7 | 6 | 5 | 4 | 3 | 2 | 1 | 0 | Byte | | | | | | | | | ============================================================================== 0 | Operation Code (1Dh) | -----|-----------------------------------------------------------------------| 1 | Logical Unit Number | Reserved |SelfTest| Reserved | -----|-----------------------------------------------------------------------| 2 | Reserved | -----|-----------------------------------------------------------------------| 3 | (MSB) | -----|--- Parameter List Length ---| 4 | (LSB) | -----|-----------------------------------------------------------------------| 5 | Reserved | Flag | Link | ============================================================================== The SEND DIAGNOSTIC command requests the controller to perform diagnostic tests on itself, on the attached peripheral devices, or on both. Except when the self-test bit is one, this command is usually followed by a RECEIVE DIAGNOSTIC RESULTS command. A self-test bit of one directs the controller to complete its default self- test. If the self-test is requested, the parameter list length shall be set to zero. If the self-test bit is set to one and the parameter list length is not zero, the command will be terminated with CHECK CONDITION status. The sense key is set to ILLEGAL REQUEST and the additional sense code set to INVALID VALUE IN CDB. The controller will not disconnect during self-test. If the self-test does not fail, the command will be terminated with a GOOD status; otherwise, the command will be terminated with CHECK CONDITION status and the sense key will be set to HARDWARE ERROR. The parameter list length specifies the length in bytes of the parameter list that will be transferred during the DATA OUT phase. A parameter list length of zero indicates that no data will be transferred. This condition will not be considered as an error. If the self-test is not requested the controller will return GOOD status upon receiving a valid command descriptor block and parameter list. The parameter list length is set to eight if user specified diagnostics are requested. The results of the diagnostic test are returned to the initiator by a RECEIVE DIAGNOSTICS RESULTS command. The SEND DIAGNOSTIC data contains an eight-byte parameter list defined as follows. Send Diagnostic Data ============================================================================== Bit| 7 | 6 | 5 | 4 | 3 | 2 | 1 | 0 | Byte | | | | | | | | | ============================================================================== 0 | Reserved | -----|-----------------------------------------------------------------------| 1 | Parameter Length | -----|-----------------------------------------------------------------------| 2 | ROM Diagnostic | -----|-----------------------------------------------------------------------| 3 | RAM Diagnostic | -----|-----------------------------------------------------------------------| 4 | Data Buffer Diagnostic | -----|-----------------------------------------------------------------------| 5 | Interface Diagnostic | -----|-----------------------------------------------------------------------| 6 | Reserved | -----|-----------------------------------------------------------------------| 7 | Reserved | ============================================================================== The parameter length specifies the length in bytes of the following SEND DIAGNOSTIC parameters. The sense data length does not include itself. The ROM Diagnostic field if zero, requests that diagnostics not be performed on the ROM. The ROM Diagnostic field if one, requests that diagnostics be performed on the controller. The ROM Diagnostic field if two, requests that diagnostics be performed on the drive control (i.e. the CDC). The RAM Diagnostic field if zero, requests that diagnostics not be performed on the RAM. The RAM Diagnostic field if one, requests that diagnostics be performed on the controller. The RAM Diagnostic field if two, requests that diagnostics be performed on the drive control (i.e. the CDC). The Data Buffer Diagnostic field if zero, requests that diagnostics not be performed on the data buffer. The Data Buffer Diagnostic field if one, requests that diagnostics be performed on the controller. The Data Buffer Diagnostic field if two, requests that diagnostics be performed on the drive control data buffer (i.e. the CDC). The Data Buffer Diagnostic field if four, requests that diagnostics be performed on the drive control data error buffer. The Interface Diagnostic field if zero, requests that diagnostics not be performed on the interfaces. The Interface Diagnostic field if one, requests that diagnostics be performed on the controller - drive control interface (i.e. Sony 40-pin bus). The Interface Diagnostic field if two, requests that diagnostics be performed on the drive control - mechanism control interface (i.e. the CDC to CDD). PREVENT/ALLOW MEDIUM REMOVAL Command ============================================================================== Bit| 7 | 6 | 5 | 4 | 3 | 2 | 1 | 0 | Byte | | | | | | | | | ============================================================================== 0 | Operation Code (1Eh) | -----|-----------------------------------------------------------------------| 1 | Logical Unit Number | Reserved | -----|-----------------------------------------------------------------------| 2 | Reserved | -----|-----------------------------------------------------------------------| 3 | Reserved | -----|-----------------------------------------------------------------------| 4 | Reserved | Prevent| -----|-----------------------------------------------------------------------| 5 | Reserved | Flag | Link | ============================================================================== The PREVENT/ALLOW MEDIUM REMOVAL command requests that the controller enable or disable the removal of the caddy in the drive. A prevent bit of one will inhibit the removal of the caddy by use of a command through the interface or by use of the eject button. The emergency release mechanism will not be overridden. A prevent bit of zero will allow removal of the caddy. This prevention of caddy removal condition will terminate upon receipt of a ALLOW MEDIUM REMOVAL command (i.e. the prevent bit set to zero), or by the receipt of a BUS DEVICE RESET message from any initiator or by a reset condition. If a PREVENT MEDIUM REMOVAL command is issued without the drive being in the ready condition command will be terminated with a CHECK CONDITION status. The sense key will be set to NOT READY and the appropriate additional sense code will be set. A ALLOW MEDIUM REMOVAL command may be issued at any time by the initiator and will not be considered an error. Group One Commands for CD-ROM Interface The controller will automatically set the drive to CD-ROM data mode upon receipt of a group one command. Group One Commands for CD-ROM Interface ============================================================================== Operation Code Type Command Name Section ------------------------------------------------------------------------------ 20h R 21h R 22h R 23h R 24h R 25h M READ CAPACITY 26h R 27h R 28h M READ EXTENDED 29h R 2Ah R 2Bh M SEEK EXTENDED 2Ch R 2Dh R 2Eh R 2Fh M VERIFY 30h R 31h R 32h R 33h R 34h R 35h R 36h R 37h R 38h R 39h R 3Ah R 3Bh M WRITE BUFFER 3Ch M READ BUFFER 3Dh R 3Eh R 3Fh R ============================================================================== Key: M = Command implementation is mandatory. R = Operation code is reserved. READ CAPACITY Command ============================================================================== Bit| 7 | 6 | 5 | 4 | 3 | 2 | 1 | 0 | Byte | | | | | | | | | ============================================================================== 0 | Operation Code (25h) | -----|-----------------------------------------------------------------------| 1 | Logical Unit Number | Reserved | -----|-----------------------------------------------------------------------| 2 | Reserved | -----|-----------------------------------------------------------------------| 3 | Reserved | -----|-----------------------------------------------------------------------| 4 | Reserved | -----|-----------------------------------------------------------------------| 5 | Reserved | -----|-----------------------------------------------------------------------| 6 | Reserved | -----|-----------------------------------------------------------------------| 7 | Reserved | -----|-----------------------------------------------------------------------| 8 | Reserved | -----|-----------------------------------------------------------------------| 9 | Reserved | Flag | Link | ============================================================================== The READ CAPACITY command a means for the initiator to request information regarding the capacity of the logical unit. The eight bytes of READ CAPACITY data is shown below. The capacity is based on the starting address of the lead-out area minus one. Read Capacity Data ============================================================================== Byte | Description | ============================================================================== 0 | (MSB) | - - -|- - Logical Block Address - -| 3 | (LSB) | -----|-----------------------------------------------------------------------| 4 | (MSB) | - - -|- - Block Length - -| 7 | (LSB) | ============================================================================== The logical block address reports the address of the last user accessible block on the disk based on the block length specified in the MODE SELECT command. The default block length is used if a MODE SELECT command has not been issued. The block length reported is based on the block size requested in the MODE SELECT command. The default block length default is reported if a MODE SELECT command has not been issued. READ EXTENDED Command ============================================================================== Bit| 7 | 6 | 5 | 4 | 3 | 2 | 1 | 0 | Byte | | | | | | | | | ============================================================================== 0 | Operation Code (28h) | -----|-----------------------------------------------------------------------| 1 | Logical Unit Number | Reserved | -----|-----------------------------------------------------------------------| 2 | (MSB) | -----|--- ---| 3 | | -----|--- Logical Block Address ---| 4 | | -----|--- ---| 5 | (LSB) | -----|-----------------------------------------------------------------------| 6 | Reserved | -----|-----------------------------------------------------------------------| 7 | (MSB) | -----|--- Transfer Length ---| 8 | (LSB) | -----|-----------------------------------------------------------------------| 9 | Reserved | Flag | Link | ============================================================================== The READ EXTENDED command requests that the controller transfer data to the initiator. The data will be transferred in whole blocks without delays occurring during a block transfer. The logical block address specifies the logical block at which the read operation will begin. The transfer length specifies the number of contiguous logical blocks of data that will be transferred. A transfer length of zero indicates that no logical blocks will be transferred but the addressed drive will perform a seek operation to the specified address. This condition will not be considered as an error. Any other value indicates the number of logical blocks that will be transferred. See the READ command for exception handling description. SEEK EXTENDED Command ============================================================================== Bit| 7 | 6 | 5 | 4 | 3 | 2 | 1 | 0 | Byte | | | | | | | | | ============================================================================== 0 | Operation Code (2Bh) | -----|-----------------------------------------------------------------------| 1 | Logical Unit Number | Reserved | -----|-----------------------------------------------------------------------| 2 | (MSB) | -----|--- ---| 3 | | -----|--- Logical Block Address ---| 4 | | -----|--- ---| 5 | (LSB) | -----|-----------------------------------------------------------------------| 6 | Reserved | -----|-----------------------------------------------------------------------| 7 | Reserved | -----|-----------------------------------------------------------------------| 8 | Reserved | -----|-----------------------------------------------------------------------| 9 | Reserved | Flag | Link | ============================================================================== The SEEK EXTENDED command requests that the controller position the optical pick-up at logical block address specified and enter the hold track state for the duration of the inactivity time. See the SEEK command for further definition and exception handling. VERIFY Command ============================================================================== Bit| 7 | 6 | 5 | 4 | 3 | 2 | 1 | 0 | Byte | | | | | | | | | ============================================================================== 0 | Operation Code (2Fh) | -----|-----------------------------------------------------------------------| 1 | Logical Unit Number | Reserved | -----|-----------------------------------------------------------------------| 2 | (MSB) | -----|--- ---| 3 | | -----|--- Logical Block Address ---| 4 | | -----|--- ---| 5 | (LSB) | -----|-----------------------------------------------------------------------| 6 | Reserved | -----|-----------------------------------------------------------------------| 7 | (MSB) | -----|--- Verification Length | 8 | (LSB) | -----|-----------------------------------------------------------------------| 9 | Reserved | Flag | Link | ============================================================================== The VERIFY command requests that the controller verify the data on the disk based on the error recovery parameter settings. This command operates the same as a READ EXTENDED command except the data is not transferred to the initiator. The logical block address specifies the logical block at which the verify operation will begin. The verification length specifies the number of contiguous logical blocks of data that will be verified. A transfer length of zero indicates that no logical blocks will be verified but the addressed drive will perform a seek operation to the specified address.. This condition will not be considered as an error. Any other value indicates the number of logical blocks that will be verified. See the READ command for exception handling description. WRITE BUFFER Command ============================================================================== Bit| 7 | 6 | 5 | 4 | 3 | 2 | 1 | 0 | Byte | | | | | | | | | ============================================================================== 0 | Operation Code (3Bh) | -----|-----------------------------------------------------------------------| 1 | Logical Unit Number | Reserved | Mode | -----|-----------------------------------------------------------------------| 2 | Reserved | -----|-----------------------------------------------------------------------| 3 | (MSB) | -----|--- ---| 4 | Buffer Offset | -----|--- ---| 5 | (LSB) | -----|-----------------------------------------------------------------------| 6 | (MSB) | -----+--- ---| 7 | Transfer Length | -----|--- ---| 8 | (LSB) | -----|-----------------------------------------------------------------------| 9 | Reserved | Flag | Link | ============================================================================== The WRITE BUFFER command is used in conjunction with the READ BUFFER command as a diagnostic function for testing controller memory and the bus integrity. This command will not alter the medium. The function of this command and the meaning of fields within the command descriptor block depend on the contents of the mode field. A mode field value of zero indicates that the buffer offset is zero. A mode field value of one indicates that the buffer offset is valid and the data will be placed in the buffer with that offset. The buffer offset is the byte offset within the buffer where the data will be stored. If the controller is unable to accept the specified buffer offset, it will return CHECK CONDITION status. The sense key is set to ILLEGAL REQUEST and the additional sense code is set to ILLEGAL VALUE IN CDB. The data to be transferred is preceded by a four-byte header. The header consists of all reserved bytes. The transfer length specifies the maximum number of bytes that will be transferred during the DATA OUT phase. This number includes four bytes of WRITE BUFFER header, so the data length to be stored in the controller's buffer is transfer length minus four. If the transfer length minus four exceeds the capacity of the buffer the controller will return a CHECK CONDITION status. The sense key is set to ILLEGAL REQUEST and the additional sense code is set to ILLEGAL VALUE IN CDB. If the buffer offset plus the transfer length minus four exceeds the buffer capacity, the controller will return a CHECK CONDITION status. The sense key is set to ILLEGAL REQUEST and the additional sense code is set to ILLEGAL VALUE IN CDB. Write Buffer Header ============================================================================== Bit| 7 | 6 | 5 | 4 | 3 | 2 | 1 | 0 | Byte | | | | | | | | | ============================================================================== 0 | Reserved | -----|-----------------------------------------------------------------------| 1 | Reserved | -----|-----------------------------------------------------------------------| 2 | Reserved | -----|-----------------------------------------------------------------------| 3 | Reserved | ============================================================================== The WRITE BUFFER header is sent as part of the data transfer phase to the controller. The purpose is to make the READ BUFFER and WRITE BUFFER transfers equivalent in byte count. READ BUFFER Command ============================================================================== Bit| 7 | 6 | 5 | 4 | 3 | 2 | 1 | 0 | Byte | | | | | | | | | ============================================================================== 0 | Operation Code (3Ch) | -----|-----------------------------------------------------------------------| 1 | Logical Unit Number | Reserved | Mode | -----|-----------------------------------------------------------------------| 2 | Reserved | -----|-----------------------------------------------------------------------| 3 | (MSB) | -----|--- ---| 4 | Buffer Offset | -----|--- ---| 5 | (LSB) | -----|-----------------------------------------------------------------------| 6 | (MSB) | -----+--- ---| 7 | Transfer Length | -----|--- ---| 8 | (LSB) | -----|-----------------------------------------------------------------------| 9 | Reserved | Flag | Link | ============================================================================== The READ BUFFER command is used in conjunction with the WRITE BUFFER command as a diagnostic function for testing controller memory and the bus integrity. This command will not alter the medium. The function of this command and the meaning of fields within the command descriptor block depend on the contents of the mode field. A mode field value of zero indicates that the buffer offset is zero. A mode field value of one indicates that the buffer offset is valid and the data will be placed in the buffer with that offset. The buffer offset is the byte offset within the buffer where the data will be retrieved. If the controller is unable to accept the specified buffer offset, it will return CHECK CONDITION status and it will set the sense key to ILLEGAL REQUEST. The allocation length will specify the number of bytes that the initiator has allocated for returned header and data. An allocation length of zero indicates that no header or data will be transferred. Any other value indicates the maximum number of bytes that will be transferred. The controller terminates the DATA IN phase when allocation length bytes of header plus data have been transferred or when all available data have been transferred to the initiator, whichever is less. The data to be transferred is preceded by a four-byte READ BUFFER header. Read Buffer Header ============================================================================== Bit| 7 | 6 | 5 | 4 | 3 | 2 | 1 | 0 | Byte | | | | | | | | | ============================================================================== 0 | Reserved | -----|-----------------------------------------------------------------------| 1 | (MSB) | -----|--- ---| 2 | Available Length | -----|--- ---| 3 | (LSB) | ============================================================================== The available length specifies the total number of data bytes that are available in the controller's data buffer. This number is not reduced to reflect the allocation length nor is it reduced to reflect the actual number of bytes written using the WRITE BUFFER command. Following the READ BUFFER header, the controller will transfer data from its data buffer. The number of data bytes transferred following the READ BUFFER header will be the lesser of allocation length minus four or available length. Group Two Commands Group Two Commands for Read-Only Devices ============================================================================== Operation Code Type Command Name Section ------------------------------------------------------------------------------ 40h M EJECT CADDY 41h M READ TOC 42h M READ Q SUBCODE 43h M READ HEADER 44h M PLAYBACK STATUS 45h M PAUSE 46h M PLAY AUDIO TRACK 47h M PLAYBACK AUDIO 48h M PLAYBACK STOP 49h R 4Ah R 4Bh R 4Ch R 4Dh R 4Eh R 4Fh R 50h R 51h R 52h R 53h R 54h R 55h R 56h R 57h R 58h R 59h R 5Ah R 5Bh R 5Ch R 5Dh R 5Eh R 5Fh R ============================================================================== Key: M = Command implementation is mandatory. R = Operation code is reserved. READ TOC Command ============================================================================== Bit| 7 | 6 | 5 | 4 | 3 | 2 | 1 | 0 | Byte | | | | | | | | | ============================================================================== 0 | Operation Code (41h) | -----|-----------------------------------------------------------------------| 1 | Logical Unit Number | Reserved | -----|-----------------------------------------------------------------------| 2 | Reserved | -----|-----------------------------------------------------------------------| 3 | Reserved | -----|-----------------------------------------------------------------------| 4 | Reserved | -----|-----------------------------------------------------------------------| 5 | Track Number | -----|-----------------------------------------------------------------------| 6 | Reserved | -----|-----------------------------------------------------------------------| 7 | Allocation Length (MSB) | -----|-----------------------------------------------------------------------| 8 | Allocation Length (LSB) | -----|-----------------------------------------------------------------------| 9 | Reserved | Reserved | Flag | Link | ============================================================================== The READ TOC command transfers data from the table of contents (TOC) on the disk. The data is returned in format specified by the TOC Data Format. The track number field is only valid for TOC data format two. The track number field specifies the starting track number in for which the data will be returned. The data is returned in contiguous ascending order. The range of values is 01h to 99h or AAh. If the track number field is not valid for the disk inserted or is not in the range of 01h to 99h or AAh the controller will return a CHECK CONDITION status. The sense key will be set to ILLEGAL REQUEST and the additional sense code set to ILLEGAL VALUE IN CDB. The allocation length specifies the number of bytes that the initiator has allocated for returned data. An allocation length of zero indicates that no data will be transferred. Any other value indicates the maximum number of bytes that will be transferred. The controller terminates the DATA IN phase when allocation length bytes have been transferred or when all available data have been transferred to the initiator, whichever is less. TOC Data Format ============================================================================== 0 | TOC Data Length (MSB) | -----|-----------------------------------------------------------------------| 1 | TOC Data Length (LSB) | -----|-----------------------------------------------------------------------| 2 | First Track Number | -----|-----------------------------------------------------------------------| 3 | Last Track Number | ============================================================================== TOC Track Descriptor ============================================================================== 0 | Track Number | -----|-----------------------------------------------------------------------| 1 | Reserved | Control | -----|-----------------------------------------------------------------------| 2 | Aminutes | -----|-----------------------------------------------------------------------| 3 | Aseconds | -----|-----------------------------------------------------------------------| 4 | Aframe | ============================================================================== The TOC data returned is a four byte header followed by one or more (up to 100)TOC Track Descriptors. The last Track Descriptor is for the lead-out area. The lead-out has a track number of AAh. The TOC Data Length specifies the length in bytes of the available table of contents data. The value of TOC Data Length does not include itself. The maximum value is 502 (01F3h). The First Track Number field reports the first track number in the table of contents. Implementor's note: The first track number is not required to be one. A disk may start at any valid track number. The track numbers between the first track number and the last track number are required to be in contiguous ascending order. The Last Track Number field reports the last track number in the table of contents before the lead-out track number. The Aminutes, Aseconds and Aframe fields specify the absolute physical location from the beginning of the disk. READ Q SUBCODE Command ============================================================================== Bit| 7 | 6 | 5 | 4 | 3 | 2 | 1 | 0 | Byte | | | | | | | | | ============================================================================== 0 | Operation Code (42h) | -----|-----------------------------------------------------------------------| 1 | Logical Unit Number | Reserved | -----|-----------------------------------------------------------------------| 2 | Reserved | -----|-----------------------------------------------------------------------| 3 | Reserved | -----|-----------------------------------------------------------------------| 4 | Reserved | -----|-----------------------------------------------------------------------| 5 | Reserved | -----|-----------------------------------------------------------------------| 6 | Reserved | -----|-----------------------------------------------------------------------| 7 | Reserved | -----|-----------------------------------------------------------------------| 8 | Allocation Length | -----|-----------------------------------------------------------------------| 9 | Reserved | Flag | Link | ============================================================================== The READ Q SUBCODE command requests that the controller return the q-channel data of the current block. The allocation length will specify the number of bytes that the initiator has allocated for returned data. An allocation length of zero indicates that no data will be transferred. Any other value indicates the maximum number of bytes that will be transferred. The controller terminates the DATA IN phase when allocation length bytes have been transferred or when all available data have been transferred to the initiator, whichever is less. Q SUBCODE Data Format ============================================================================== Bit| 7 | 6 | 5 | 4 | 3 | 2 | 1 | 0 | Byte | | | | | | | | | ============================================================================== 0 | Reserved | Control | -----|-----------------------------------------------------------------------| 1 | Track Number | -----|-----------------------------------------------------------------------| 2 | Index Number | -----|-----------------------------------------------------------------------| 3 | Minute | -----|-----------------------------------------------------------------------| 4 | Second | -----|-----------------------------------------------------------------------| 5 | Frame | -----|-----------------------------------------------------------------------| 6 | Aminute | -----|-----------------------------------------------------------------------| 7 | Asecond | -----|-----------------------------------------------------------------------| 8 | Aframe | ============================================================================== The control bits are defined in Table 3-25. Definition of Control Bits ============================================================================== Bit equal one equal zero ------ ------------------------- ------------------------- 0 With pre-emphasis Without pre-emphasis 1 Digital copy permitted Digital copy prohibited 2 Data track Audio track 3 Four channel Two channel ============================================================================== The Track Number specifies the current track number in BCD notation. The value of this field has a range of 01 to 99. The Index Number specifies the index number in the current track. The Minutes, Seconds and Frame fields specify the relative physical location from the beginning of the current track. The Aminutes, Aseconds and Aframe fields specify the absolute physical location from the beginning of the disk. READ HEADER Command ============================================================================== Bit| 7 | 6 | 5 | 4 | 3 | 2 | 1 | 0 | Byte | | | | | | | | | ============================================================================== 0 | Operation Code (43h) | -----|-----------------------------------------------------------------------| 1 | Logical Unit Number | Reserved | -----|-----------------------------------------------------------------------| 2 | (MSB) | -----|--- ---| 3 | | -----|--- Logical Block Address ---| 4 | | -----|--- ---| 5 | (LSB) | -----|-----------------------------------------------------------------------| 6 | Reserved | -----|-----------------------------------------------------------------------| 7 | Reserved | -----|-----------------------------------------------------------------------| 8 | Allocation Length | -----|-----------------------------------------------------------------------| 9 | Reserved | Flag | Link | ============================================================================== The READ HEADER command requests that the controller return the CD-ROM mode one or mode two address header of the requested logical block. The allocation length will specify the number of bytes that the initiator has allocated for returned data. An allocation length of zero indicates that no data will be transferred. Any other value indicates the maximum number of bytes that will be transferred. The controller terminates the DATA IN phase when allocation length bytes have been transferred or when all available data have been transferred to the initiator, whichever is less. See the READ command for exception handling. If the block size is set to 256, 512, or 1024, it will be mapped into the appropriate physical block from which the data would have been read. Header Data Format ============================================================================== Bit| 7 | 6 | 5 | 4 | 3 | 2 | 1 | 0 | Byte | | | | | | | | | ============================================================================== 0 | Aminute | -----|-----------------------------------------------------------------------| 1 | Asecond | -----|-----------------------------------------------------------------------| 2 | Aframe | -----|-----------------------------------------------------------------------| 3 | CD-ROM Mode | ============================================================================== The Aminutes, Aseconds and Aframe fields specify the absolute physical location from the beginning of the disk in bcd notation. The CD-ROM Mode field specifies the CD-ROM mode of the block. The legal values are 00h, 01h, and 02h. PLAYBACK STATUS Command ============================================================================== Bit| 7 | 6 | 5 | 4 | 3 | 2 | 1 | 0 | Byte | | | | | | | | | ============================================================================== 0 | Operation Code (44h) | -----|-----------------------------------------------------------------------| 1 | Logical Unit Number | Reserved | -----|-----------------------------------------------------------------------| 2 | Reserved | -----|-----------------------------------------------------------------------| 3 | Reserved | -----|-----------------------------------------------------------------------| 4 | Reserved | -----|-----------------------------------------------------------------------| 5 | Reserved | -----|-----------------------------------------------------------------------| 6 | Reserved | -----|-----------------------------------------------------------------------| 7 | Reserved | -----|-----------------------------------------------------------------------| 8 | Allocation Length | -----|-----------------------------------------------------------------------| 9 | Reserved | Flag | Link | ============================================================================== The STATUS command requests that the controller return the status data of the current audio block. If the drive is not in the ready condition the command will be terminated with a CHECK CONDITION status. The sense key will be set to NOT READY and the appropriate additional sense code set. The allocation length will specify the number of bytes that the initiator has allocated for returned data. An allocation length of zero indicates that no data will be transferred. Any other value indicates the maximum number of bytes that will be transferred. The controller terminates the DATA IN phase when allocation length bytes have been transferred or when all available data have been transferred to the initiator, whichever is less. Audio Status Data Format ============================================================================== Bit| 7 | 6 | 5 | 4 | 3 | 2 | 1 | 0 | Byte | | | | | | | | | ============================================================================== 1 | Audio Status | -----|-----------------------------------------------------------------------| 0 | Reserved | Play Mode | -----|-----------------------------------------------------------------------| 0 | Reserved | Control | -----|-----------------------------------------------------------------------| 6 | Aminute | -----|-----------------------------------------------------------------------| 7 | Asecond | -----|-----------------------------------------------------------------------| 8 | Aframe | ============================================================================== The audio status bits are defined in Table 3-43. Audio Status ============================================================================== Status Description ----------|------------------------------------------------------------------| 00h | Audio play operation in progress. ----------|------------------------------------------------------------------| 01h | Audio pause operation in progress. ----------|------------------------------------------------------------------| 02h | Audio muting on. ----------|------------------------------------------------------------------| 03h | Audio play operation completed. ============================================================================== The play mode bits are defined in Table 3-37. The control bits are defined in Table 3-35. The Aminutes, Aseconds and Aframe fields specify the absolute physical location from the beginning of the disk of the next track. PAUSE Command ============================================================================== Bit| 7 | 6 | 5 | 4 | 3 | 2 | 1 | 0 | Byte | | | | | | | | | ============================================================================== 0 | Operation Code (45h) | -----|-----------------------------------------------------------------------| 1 | Logical Unit Number | Pause | Reserved | -----|-----------------------------------------------------------------------| 2 | Reserved | -----|-----------------------------------------------------------------------| 3 | Reserved | -----|-----------------------------------------------------------------------| 4 | Reserved | -----|-----------------------------------------------------------------------| 5 | Reserved | -----|-----------------------------------------------------------------------| 6 | Reserved | -----|-----------------------------------------------------------------------| 7 | Reserved | -----|-----------------------------------------------------------------------| 8 | Reserved | -----|-----------------------------------------------------------------------| 9 | Reserved | Reserved | Flag | Link | ============================================================================== The PAUSE command requests that the controller start/stop the current audio play operation. A pause bit of one indicates the drive will enter the hold track state with the audio output muted after the current audio block is played. A pause bit of zero indicates the drive will release the pause and begin play at the block following the last block played. See Section 2.5 for exception handling and command usage. PLAY AUDIO TRACK Command ============================================================================== Bit| 7 | 6 | 5 | 4 | 3 | 2 | 1 | 0 | Byte | | | | | | | | | ============================================================================== 0 | Operation Code (46h) | -----|-----------------------------------------------------------------------| 1 | Logical Unit Number |Reserved| Play Mode | -----|-----------------------------------------------------------------------| 2 | Reserved | -----|-----------------------------------------------------------------------| 3 | Reserved | -----|-----------------------------------------------------------------------| 4 | Starting Track | -----|-----------------------------------------------------------------------| 5 | Starting Index | -----|-----------------------------------------------------------------------| 6 | Reserved | -----|-----------------------------------------------------------------------| 7 | Reserved | -----|-----------------------------------------------------------------------| 8 | Number of Indexes | -----|-----------------------------------------------------------------------| 9 | Reserved | Reserved | Flag | Link | ============================================================================== The PLAY AUDIO TRACK command requests that the controller output the audio signals starting at the specified starting track and index for the specified number of indexes. The audio signals are output in the specified play mode. The Starting Track field specifies the track number of the audio track. The Starting Index field specifies the index number within starting track to begin the audio play operation. Valid values for the starting track and starting index are 01h to 99h. The Number of Indexes specifies the duration of the audio play operation. A value in the number of indexes field which exceeds the number of indexes within the track is not considered an error as long as that value is between 01h and 99h. The audio play operation will terminate at the end of the track specified. A value of FFh requests that the audio operation continue playing until the lead-out track or a non-audio track is detected. Implementor's note: A typical audio track for music has only one index number (i.e. the number of indexes is equal to one.) The number of indexes within a track in not obtainable from data in the table of contents. This command returns the status byte when the address requested is found. If the address is not found , or if the ready condition does not exist, or if the address is not within an audio track, a CHECK CONDITION status will be returned and the appropriate sense key set. See Section 2.5 for exception handling and command usage. Valid Play Mode Combinations ============================================================================== Left Channel output DB(3) DB(2) ----- ----- ------------------------------ 0 0 left channel -> muted 0 1 right channel -> left channel 1 0 left channel -> left channel 1 1 left & right -> left channel Right Channel output DB(1) DB(0) ----- ----- ------------------------------ 0 0 right channel -> muted 0 1 right channel -> right channel 1 0 left channel -> right channel 1 1 left & right -> right channel Play Mode Output / 0000 muted Nominal explanation -< 1001 stereo \ 1111 monaural ============================================================================== PLAYBACK AUDIO Command ============================================================================== Bit| 7 | 6 | 5 | 4 | 3 | 2 | 1 | 0 | Byte | | | | | | | | | ============================================================================== 0 | Operation Code (47h) | -----|-----------------------------------------------------------------------| 1 | Logical Unit Number |Reserved| Play Mode | -----|-----------------------------------------------------------------------| 2 | Reserved | -----|-----------------------------------------------------------------------| 3 | Starting Aminutes | -----|-----------------------------------------------------------------------| 4 | Starting Aseconds | -----|-----------------------------------------------------------------------| 5 | Starting Aframe | -----|-----------------------------------------------------------------------| 6 | Ending Aminutes | -----|-----------------------------------------------------------------------| 7 | Ending Aseconds | -----|-----------------------------------------------------------------------| 8 | Ending Aframe | -----|-----------------------------------------------------------------------| 9 | Reserved | Reserved | Flag | Link | ============================================================================== The PLAY AUDIO TRACK command requests that the controller output the audio signals starting at the specified starting address and continue the audio play operation until the specified ending address is detected. The audio signals are output in the specified play mode. The Starting Aminutes, Aseconds, Aframe specify the starting address in absolute time. The Ending Aminutes, Aseconds, Aframe specify the ending address in absolute time. This command returns the status byte when the address requested is found. If the address is not found , or if the ready condition does not exist, or if the address is not within an audio track, a CHECK CONDITION status will be returned and the appropriate sense key set. See Section 2.5 for exception handling and command usage. PLAYBACK STOP Command ============================================================================== Bit| 7 | 6 | 5 | 4 | 3 | 2 | 1 | 0 | Byte | | | | | | | | | ============================================================================== 0 | Operation Code (48h) | -----|-----------------------------------------------------------------------| 1 | Logical Unit Number |Reserved| Play Mode | -----|-----------------------------------------------------------------------| 2 | Reserved | -----|-----------------------------------------------------------------------| 3 | Starting Aminutes | -----|-----------------------------------------------------------------------| 4 | Starting Aseconds | -----|-----------------------------------------------------------------------| 5 | Starting Aframe | -----|-----------------------------------------------------------------------| 6 | Ending Aminutes | -----|-----------------------------------------------------------------------| 7 | Ending Aseconds | -----|-----------------------------------------------------------------------| 8 | Ending Aframe | -----|-----------------------------------------------------------------------| 9 | Reserved | Reserved | Flag | Link | ============================================================================== The PLAYBACK STOP command requests that the controller stop the audio output signals, and enter the hold track state. See Section 2.5 for exception handling and command usage. ****************************************************************************** END OF DOCUMENT ****************************************************************************** CDSCSI.TXT