psx.wiki

CD-ROM Commands: Difference between revisions

Revision as of 02:46, 23 October 2026
RemmyLee
(GTE, MDEC, controllers, Memory Card, SIO and expansion port at register depth)
Revision as of 02:46, 23 October 2026
RemmyLee
(SPU and CD-ROM at register depth; CPU overview rewritten)
Line 1:Line 1:
+---
+title: CD-ROM Commands
+type: register
+summary: Commands of the CD-ROM controller with their parameters, responses and timing.
+category: Hardware
+---
+
+## Summary
+
+The lowest level of operation of the [CD-ROM](/hardware/cd-rom/) is a primitive command issued directly to the CD-ROM subsystem. Sony's libcd issues them with CdControl(), which takes the command code, a pointer to the parameters and a pointer to an 8-byte result buffer.[^ovr115][^ovr118] Primitive commands are either blocking, which wait for processing to complete before returning, or non-blocking, which return at once. Commands are not queued, so a new command is held until the previous one is complete.[^ovr116]
+
+At the register level the parameters are written to PARAMETER and the command code to COMMAND. [CD-ROM Registers](/hardware/cd-rom/registers/) describes both registers. Every command answers first with INT3 (or INT5 on an error), and some commands send a second response with INT2 when their operation has finished.[^spxresp]
+
+## Command List
+
+Sony documents the following primitive commands. B marks a blocking command and N a non-blocking one.[^ovr116][^ref1010]
+
+Table: Primitive commands and corresponding codes
+
+| Code | Symbol | Type | Details |
+| --- | --- | --- | --- |
+| 01h | CdlNop | B | NOP (No Operation) |
+| 02h | CdlSetloc | B | Set the seek target position |
+| 03h | CdlPlay | B | Commence CD-DA play |
+| 04h | CdlForward | B | Fast forward |
+| 05h | CdlBackward | B | Rewind |
+| 06h | CdlReadN | B | Start data read (with retry) |
+| 07h | CdlStandby | N | Stand by with disk rotating |
+| 08h | CdlStop | N | Stop disk rotation |
+| 09h | CdlPause | N | Pause at current position |
+| 0Bh | CdlMute | B | CD-DA mute |
+| 0Ch | CdlDemute | B | Cancel mute |
+| 0Dh | CdlSetfilter | B | Choose ADPCM play sector |
+| 0Eh | CdlSetmode | B | Set basic mode |
+| 0Fh | CdlGetparam | B | Get current CD subsystem mode |
+| 10h | CdlGetlocL | B | Get logical location (data sector) |
+| 11h | CdlGetlocP | B | Get physical location (audio sector) |
+| 13h | CdlGetTN | | Get number of TOC entries |
+| 14h | CdlGetTD | | Get TOC entry of a track |
+| 15h | CdlSeekL | N | Logical seek (data sector seek) |
+| 16h | CdlSeekP | N | Physical seek (audio sector seek) |
+| 1Bh | CdlReadS | B | Start data read (no retry) |
+
+The Overview spells two of the symbols CdlStanby and CdlBackword, while the Reference has CdlStandby and CdlBackward.[^ovr116][^ref1010] CdlGetTN and CdlGetTD are described in the Overview without a code. psx-spx gives 13h and 14h for them.[^ovr1111][^spxsum]
+
+psx-spx lists the full command set of the controller, including the commands Sony did not document:[^spxsum]
+
+Table: Controller commands
+
+| Code | psx-spx name | Parameters | First response | Second response |
+| --- | --- | --- | --- | --- |
+| 00h | (unused) | | INT5 11h, 40h | |
+| 01h | Nop | | INT3 status | |
+| 02h | Setloc | min, sec, frame | INT3 status | |
+| 03h | Play | track (optional) | INT3 status | |
+| 04h | Forward | | INT3 status | |
+| 05h | Backward | | INT3 status | |
+| 06h | ReadN | | INT3 status | |
+| 07h | MotorOn (Standby) | | INT3 status | INT2 status |
+| 08h | Stop | | INT3 status | INT2 status |
+| 09h | Pause | | INT3 status | INT2 status |
+| 0Ah | Init | | INT3 status (late) | INT2 status |
+| 0Bh | Mute | | INT3 status | |
+| 0Ch | Demute | | INT3 status | |
+| 0Dh | Setfilter | file, channel | INT3 status | |
+| 0Eh | Setmode | mode | INT3 status | |
+| 0Fh | Getparam | | INT3 status, mode, 00h, file, channel | |
+| 10h | GetlocL | | INT3 min, sec, frame, mode, file, channel, sm, ci | |
+| 11h | GetlocP | | INT3 track, index, rmin, rsec, rframe, min, sec, frame | |
+| 12h | Setsession | session | INT3 status | INT2 status |
+| 13h | GetTN | | INT3 status, first, last | |
+| 14h | GetTD | track | INT3 status, min, sec | |
+| 15h | SeekL | | INT3 status | INT2 status |
+| 16h | SeekP | | INT3 status | INT2 status |
+| 17h, 18h | (unused) | | INT5 11h, 40h | |
+| 19h | Test | sub function, ... | INT3 ... | |
+| 1Ah | GetID | | INT3 status | INT2 or INT5 status, flags, type, atip, "SCEx" |
+| 1Bh | ReadS | | INT3 status | |
+| 1Ch | Reset | | INT3 status | |
+| 1Dh | GetQ | adr, point | INT3 status | INT2 10 bytes of subchannel Q, peak low |
+| 1Eh | ReadTOC | | INT3 status (late) | INT2 status |
+| 1Fh | VideoCD | sub function, ... | INT3 status, ... | |
+| 50h to 57h | Unlock and Lock | strings | INT5 11h, 40h | |
+| 58h to 5Fh | (unused) | | none, the HC05 crashes | |
+
+Codes 20h to 4Fh and 60h to FFh are unused and return INT5 with the bytes 11h and 40h.[^spxsum] GetQ and ReadTOC exist from controller version C1, and VideoCD only on the SCPH-5903.[^spxsum] Play, Forward and Backward send INT1 report packets while playing, and ReadN and ReadS send INT1 for every sector.[^spxsum]
+
+## Status Byte
+
+The first byte of the result of almost every command is the CD-ROM status. CdlNop is used to read the status alone.[^ovr118]
+
+Table: Bit assignments of status byte
+
+| Symbol | Code | Details |
+| --- | --- | --- |
+| CdlStatPlay | 0x80 | 1: CD-DA playing |
+| CdlStatSeek | 0x40 | 1: seeking |
+| CdlStatRead | 0x20 | 1: reading data sector |
+| CdlStatShellOpen | 0x10 | 1: shell open |
+| | 0x08 | psx-spx: GetID denied, also set when Setmode bit 4 is set |
+| CdlStatSeekError | 0x04 | 1: error during seeking or reading |
+| CdlStatStandby | 0x02 | 1: motor rotating |
+| CdlStatError | 0x01 | 1: command issue error |
+
+CdlStatShellOpen is cleared by CdlNop. Whether the cover is open now is therefore known only after CdlNop has been issued at least once.[^ovr118] psx-spx adds that other commands do not clear the bit, and that only one of the Play, Seek and Read bits is set at a time. Read or Play is therefore not set until the seek is complete.[^spxstat] Bit 3 is not in Sony's table; psx-spx reports it as the GetID denial flag.[^spxstat]
+
+When bit 0 or bit 2 is set, the controller sends INT5 in place of the normal response, and an error byte follows the status:[^spxstat]
+
+Table: Error bytes
+
+| Byte | Response | Contents |
+| --- | --- | --- |
+| 10h | First, with bit 0 | Invalid sub function (command 19h) or invalid parameter value |
+| 20h | First, with bit 0 | Wrong number of parameters |
+| 40h | First, with bit 0 | Invalid command |
+| 80h | First, with bit 0 | Cannot respond yet: TOC not read, or no disc |
+| 04h | Second, with bit 2 | Seek failed, as with SeekL on an audio CD |
+| 08h | Any time, with bit 2 | Drive door opened |
+
+Opening the shell raises INT5 whether a command is running or not. All status bits except shell open and error are then cleared, and the error byte is 08h.[^spxstat]
+
+## Mode Byte
+
+CdlSetmode sets the basic operation mode from the logical OR of the following bits. CdlGetparam returns the current mode.[^ovr1110]
+
+Table: Mode settings of CdlSetmode
+
+| Symbol | Code | Details |
+| --- | --- | --- |
+| CdlModeSpeed | 0x80 | Transfer speed. 0: normal speed. 1: double speed. |
+| CdlModeRT | 0x40 | ADPCM play. 0: ADPCM off. 1: ADPCM on. |
+| CdlModeSize1 | 0x20 | Sector size. 0: 2048 byte. 1: 2340 byte. |
+| CdlModeSize0 | 0x10 | Sector size. 1: 2328 byte. |
+| CdlModeSF | 0x08 | Subheader filter. 0: off. 1: on. |
+| CdlModeRept | 0x04 | Report mode. 0: off. 1: on. |
+| CdlModeAP | 0x02 | Autopause. 0: off. 1: on. |
+| CdlModeDA | 0x01 | CD-DA play. 0: CD-DA off. 1: CD-DA on. |
+
+libcd also defines CdlModeStream (0x100) for normal streaming and CdlModeStream2 (0x120), which includes the subheader. These lie outside the 8-bit mode byte of the command.[^ovr1110]
+
+The 2340-byte size is the whole sector after the 12 sync bytes (924h bytes), and it lets a program check the sector header for skipped sectors.[^spxsetmode][^ovr1121] psx-spx did not find the 2328-byte size of CdlModeSize0. It reports that bit 4 instead keeps the sector size of the last Setmode without bit 4, returns data from up to 3 sectors before the Setloc position and sets status bit 3.[^spxsetmode] CdlModeDA also allows CD-DA sectors to be read as data, since the missing EDC is then ignored.[^spxsetmode] During Play only bits 7, 2 and 1 are used, and the drive is always in CD-DA mode.[^spxplaymode]
+
+After a reset the mode is: standard speed, real time, ADPCM off, 2340-byte transfer, subheader filter off, report off, autopause off and CD-DA playback in CD-ROM mode disabled. The Setloc position and the previous error status are also cleared.[^ovr1120] Because reset returns the drive to standard speed, a program that reads at double speed should set the mode it wants at once. Otherwise the drive loses time changing between the two speeds.[^ovr1119]
+
+## CdlNop (01h) - Get status
+
+CdlNop does nothing and returns the status.[^ovr119] Unlike other commands it also clears the shell open bit, unless the shell is still open. A program that waits for a new disc can therefore send Nop until bit 4 clears.[^spxnop][^spxstat]
+
+## CdlSetloc (02h) - Set seek target
+
+CdlSetloc sets the target position without moving the head. The target is used by the next CdlPlay, CdlReadN, CdlReadS, CdlSeekP or CdlSeekL.[^ovr119] The three parameters give the absolute position on the disc (minute, second and sector) in BCD. In BCD each decimal digit takes 4 bits, so decimal 60 is written 0x60.[^ovr117] Each parameter must be valid BCD with the second below 60h and the sector below 75h. An invalid value returns INT5 with error 10h.[^spxsetloc]
+
+The libcd CdlLOC structure holds minute, second, sector and a reserved track byte. CdIntToPos() and CdPosToInt() convert between that form and the absolute sector number counted from 00:02:00.[^ovr117][^ovr114]
+
+A Setloc marks its target as unprocessed. A read issued with an unprocessed Setloc seeks first. A read issued without one continues a read in progress, or resumes a paused read at the last sector received, which is then delivered again.[^spxslrp]
+
+## CdlPlay (03h) - Commence CD-DA play
+
+CdlPlay seeks the target position and then starts CD-DA play. With no argument it uses the position of the last CdlSetloc or CdlSeekP.[^ovr119] At the register level the parameter is an optional track number. Track 1 to N starts that track, and a higher number restarts the current track. Without a parameter play starts at a pending Setloc or at the current position.[^spxplay] Play stops the motor at the end of the disc and raises INT4.[^spxplay]
+
+With report mode on, Play, Forward and Backward raise INT1 with 8 bytes: status, track, index, minute, second, sector and a 2-byte peak level. The time alternates between absolute time and time within the track. Bit 7 of the second byte marks the relative time.[^spxreport] Sony describes the same scheme: the absolute time is sent when the tens digit of the absolute time is even and the relative time when it is odd, and 15 bits of the level carry the peak with 1 bit for the L/R channel.[^ovr1119] Report mode should be on only while CD-DA plays, because during a data read its interrupt cannot be told apart from the data ready interrupt.[^ovr1119]
+
+With autopause on, the drive raises INT4 and pauses at the end of the track. Otherwise it raises INT4 and stops at the end of the disc.[^spxautop] Autopause may fail on a disc with no gap or very short gaps between tracks, so Sony requires gaps of at least two seconds.[^ovr1119]
+
+## CdlForward (04h) and CdlBackward (05h) - Fast forward and rewind
+
+These commands start fast forward or rewind of an audio sector during play.[^ovr119] They work only after Play has started, and otherwise return INT5 with error 80h. A new Play without a parameter ends them at the position reached.[^spxfwd] They cannot be used while data is being read.[^ovr1120]
+
+## CdlReadN (06h) and CdlReadS (1Bh) - Read data
+
+CdlReadN and CdlReadS seek the target position and then read the data sectors into the sector buffer. They raise one INT1 per sector until CdlPause stops them.[^ovr119][^spxreadn] CdlReadS does not retry after an error and is used for real-time reading such as streaming. CdlReadN retries for at most 8 seconds, although it can still fail.[^ovr119] Retrying reads a sector again, so CdlReadN cannot be used during ADPCM play or for a stream that needs a fixed rate.[^ovr1114]
+
+The drive reads 75 sectors a second at normal speed and 150 at double speed.[^ovr114] Sony states that the decoder does not read ahead in its 32KB local memory, so a read must start within 13.3 ms at standard speed or 6.6 ms at double speed after the data ready interrupt. Otherwise the data may be overwritten and a sector skipped.[^ovr1120] A sector skipped this way gives no error, and Sony therefore recommends the 2340-byte mode and a check of the sector address in the first 12 bytes against the previous sector.[^ovr1121]
+
+On an audio CD a read works only with CdlModeDA set. Otherwise, and on a disc whose region does not match the console, it returns error 40h.[^spxreadn]
+
+## CdlStandby (07h) - Stand by with disk rotating
+
+Sony describes CdlStandby as a wait with the spindle motor rotating. The next seek, read or play therefore starts faster than it does from stop.[^ovr119] psx-spx calls the command MotorOn and finds that it only starts the motor. When the motor is already on it returns INT5 with error 20h, and with no disc INT5 with error 80h. Read, Seek and Play start the motor themselves, so the command is seldom needed.[^spxmotor]
+
+## CdlStop (08h) - Motor halt
+
+CdlStop halts the spindle motor and returns the head to the home position.[^ovr119] psx-spx finds that the motor stops within about a second, and the first response still shows the old status while the second shows the motor bit cleared.[^spxstop]
+
+## CdlPause (09h) - Pause at current position
+
+CdlPause stops a read or play and waits at the head's position with the motor rotating.[^ovr119] The first response shows the read bit still set and the second response shows it cleared. During some phases of a seek, including the seek at the start of a read or play, Pause fails with INT5 and error 80h.[^spxpause]
+
+## Init (0Ah) - Initialize
+
+Init sets the mode to 20h, starts the motor and aborts all commands. A second Init sent while one is in progress is dropped without a response.[^spxinit]
+
+## CdlMute (0Bh) and CdlDemute (0Ch) - CD audio mute
+
+These commands mute or release the mute of CD-DA or ADPCM play.[^ovr1110] Mute only forces the output volume to zero, so the controller still processes audio sectors.[^spxmute] The mute release does not work when a CD-DA track plays straight after a data track. In that case Demute is sent again when the CD-DA track is reached.[^ovr1119]
+
+## CdlSetfilter (0Dh) - Choose ADPCM play sector
+
+CdlSetfilter sets the channel for multichannel ADPCM play. A file number and a channel number select the channel. The default is (1, 1).[^ovr1110] With the subheader filter on, only ADPCM sectors with matching numbers are played. Data sectors are still delivered whatever their numbers.[^spxfilter]
+
+## CdlGetparam (0Fh) - Get current mode
+
+CdlGetparam returns the status and the mode.[^ovr1110] psx-spx finds three more bytes: 00h, the filter file and the filter channel.[^spxgetparam]
+
+## CdlGetlocL (10h) - Get logical location
+
+CdlGetlocL returns the position of the data sector being read or the ADPCM being played. It does not work while an audio sector plays.[^ovr1110] The first three bytes are the minute, second and sector in BCD, which is the CdlLOC form.[^ovr1123] psx-spx gives the full response as the 4-byte sector header and the 4-byte subheader: minute, second, sector, mode, file, channel, submode and coding information.[^spxgetlocl] Sony's Table 11-8 gives byte 3 as Status, while Table 11-4 gives Mode.[^ovr118][^ovr1110]
+
+GetlocL returns the newest sector in the buffer, while INT1 delivers the oldest. A large difference between the two shows a buffer overrun.[^spxgetlocl] During a seek GetlocL fails with error 80h, and Sony warns that a watchdog that retries a seek and a GetlocL during the seek can loop forever.[^spxgetlocl][^ovr1123]
+
+## CdlGetlocP (11h) - Get physical location
+
+CdlGetlocP returns the subcode address of the sector being read or played, so it works on every sector type.[^ovr1111]
+
+Table: CdlGetlocP result
+
+| Result byte no. | Details |
+| --- | --- |
+| 0 | Track number (BCD) |
+| 1 | Index number (BCD) |
+| 2 | Track relative minute (BCD) |
+| 3 | Track relative second (BCD) |
+| 4 | Track relative sector (BCD) |
+| 5 | Absolute minute (BCD) |
+| 6 | Absolute second (BCD) |
+| 7 | Absolute sector (BCD) |
+
+The track number is AAh in the lead-out area.[^spxgetlocp]
+
+## Setsession (12h) - Select session
+
+Setsession moves the head to the given session and reads its TOC. Session 0 returns error 10h. On a single-session disc session 1 works and session 2 or higher fails with a seek error, after which the motor stops.[^spxsession]
+
+## CdlGetTN (13h) and CdlGetTD (14h) - Read the TOC
+
+CdlGetTN returns the status and the first and last track numbers in BCD.[^ovr1111] CdlGetTD takes a track number in BCD and returns the status and the minute and second of that track from the TOC. Track 0 returns the total playing time.[^ovr1111] psx-spx adds that GetTD rounds down to the second and points to index 1 of the track. A track number past the last track or a value that is not BCD returns error 10h.[^spxgettd]
+
+Sony's Table 11-4 gives the results "Status, Btrack, Etrack" for CdlSeekL and "Status, Min, Sec" for CdlSeekP.[^ovr118] These match the GetTN and GetTD results, and psx-spx finds that SeekL and SeekP return only the status.[^spxsum]
+
+After a disc change the drive reads the TOC. Until it has finished only CdlNop and CdlGetTN may be issued, and CdlGetTN is repeated until it succeeds.[^ovr1124]
+
+## CdlSeekL (15h) and CdlSeekP (16h) - Seek
+
+Both commands seek the target position and then wait in pause. A CD-ROM has a long seek time, and a seek made in advance therefore speeds up a later access.[^ovr119] CdlSeekL is a logical seek that uses the address in the sector header. It is therefore accurate but works only on data sectors. CdlSeekP is a physical seek that uses the subcode, which works on every sector but with low precision.[^ovr119]
+
+Table: The operation of CdlSeekL and CdlSeekP
+
+| Command | Seek | Method precision | Sector used on |
+| --- | --- | --- | --- |
+| CdlSeekL | Logical | High | Anything but audio sectors |
+| CdlSeekP | Physical | Low | All sectors |
+
+psx-spx measures where the head stays after a seek to sector N. SeekL holds at N-8 to N at single speed and N-5 to N+2 at double speed. SeekP holds at N-9 to N-1 and N-2 to N.[^spxseek] SeekL on an audio CD fails in the second response with error 04h.[^spxseek]
+
+## Test (19h) - Test functions
+
+Command 19h takes a sub function number as its first parameter. psx-spx finds that the kernel uses only sub function 20h, which returns the date and version of the controller firmware.[^spxtest]
+
+Table: Controller firmware versions
+
+| Response (yy, mm, dd, ver) | Board | Version |
+| --- | --- | --- |
+| 94h, 09h, 19h, C0h | PU-7 | C0, 19 Sep 1994 |
+| 94h, 11h, 18h, C0h | PU-7 | C0, 18 Nov 1994 |
+| 94h, 11h, 28h, 01h | DTL-H2000 | 01 (debug), 28 Nov 1994 |
+| 95h, 05h, 16h, C1h | LATE-PU-8 | C1, 16 May 1995 |
+| 95h, 07h, 24h, C1h | LATE-PU-8 | C1, 24 Jul 1995 |
+| 95h, 07h, 24h, D1h | LATE-PU-8 (debug) | D1, 24 Jul 1995 |
+| 96h, 08h, 15h, C2h | PU-16 (Video CD) | C2, 15 Aug 1996 |
+| 96h, 08h, 18h, C1h | LATE-PU-8 (Net Yaroze) | C1, 18 Aug 1996 |
+| 96h, 09h, 12h, C2h | PU-18 (Japan) | C2, 12 Sep 1996 |
+| 97h, 01h, 10h, C2h | PU-18 (US and Europe) | C2, 10 Jan 1997 |
+| 97h, 08h, 14h, C2h | PU-20 | C2, 14 Aug 1997 |
+| 98h, 06h, 10h, C3h | PU-22 | C3, 10 Jun 1998 |
+| 99h, 02h, 01h, C3h | PU-23, PM-41 | C3, 1 Feb 1999 |
+| A1h, 03h, 06h, C3h | PM-41(2) | C3, 2001 |
+
+Sub function 22h returns the region of the drive. A drive that answers "for Europe" requires SCEE discs; "for U/C" requires SCEA discs; "for Japan" requires SCEI discs. Version C0 returns an error, and debug units return "for US/AEP" and accept unlicensed discs.[^spxregion] Sub functions 23h to 25h return the names of the servo amplifier, signal processor and decoder chips the firmware was written for.[^spxchips]
+
+## GetID (1Ah) - Get disc identity
+
+GetID reports whether a disc is present and licensed and what type it is. The second response holds the status, a flag byte, the disc type from the TOC, an ATIP byte and the four-letter region string.[^spxgetid]
+
+Table: GetID responses
+
+| Drive status | First response | Second response |
+| --- | --- | --- |
+| Door open | INT5 11h, 80h | |
+| Spin-up | INT5 01h, 80h | |
+| Detect busy | INT5 03h, 80h | |
+| No disc | INT3 status | INT5 08h, 40h, 00h, 00h, 00h, 00h, 00h, 00h |
+| Audio disc | INT3 status | INT5 0Ah, 90h, 00h, 00h, 00h, 00h, 00h, 00h |
+| Unlicensed mode 1 | INT3 status | INT5 0Ah, 80h, 00h, 00h, 00h, 00h, 00h, 00h |
+| Unlicensed mode 2 | INT3 status | INT5 0Ah, 80h, 20h, 00h, 00h, 00h, 00h, 00h |
+| Licensed mode 2 | INT3 status | INT2 02h, 00h, 20h, 00h, "SCEx" |
+
+In the flag byte, bit 7 marks a denied data CD or an audio CD, bit 6 a missing disc and bit 4 an audio CD. The type byte is 00h for an audio or mode 1 disc and 20h for a mode 2 disc.[^spxgetid] The last letter of the region string is I for Japan, A for America and E for Europe, and the console refuses a disc whose region does not match.[^spxgetid]
+
+## Reset (1Ch) - Reset the controller
+
+Reset reboots the controller, which psx-spx compares to opening and closing the door. INT3 shows that it has started, and no interrupt shows that it has finished. Software therefore waits 1/8 second (400000h cycles) before the next command.[^spxreset]
+
+## GetQ (1Dh) and ReadTOC (1Eh)
+
+GetQ reads 10 bytes of subchannel Q for a given ADR and point from the lead-in. Unlike GetTD it reads the full position (minute, second and frame) from the disc itself. When the point does not exist it times out after about 6 seconds.[^spxgetq] ReadTOC reads the TOC of the current session again. Its second response comes after about 1 second. The TOC is read automatically at power on, after the door closes and on a session change.[^spxreadtoc] Both commands exist from controller version C1.[^spxsum]
+
+## Response Order and Timing
+
+The controller's HC05 polls for new sectors, new commands and drive work in one main loop. It executes a command only when no interrupt is pending, and the first response then follows at once.[^spxmain] The controller has no queue: it keeps one flag for a pending second response and one for a pending INT1. It can therefore hold only one undelivered INT1, although the decoder buffer has room for eight sectors.[^spxresp]
+
+The following commands send a second response after the operation:[^spxresp2]
+
+Table: Commands with a second response
+
+| Code | Command | Responses |
+| --- | --- | --- |
+| 07h | MotorOn | INT3 status, INT2 status |
+| 08h | Stop | INT3 status, INT2 status |
+| 09h | Pause | INT3 status, INT2 status |
+| 0Ah | Init | INT3 late status, INT2 status |
+| 12h | Setsession | INT3 status, INT2 status |
+| 15h | SeekL | INT3 status, INT2 status |
+| 16h | SeekP | INT3 status, INT2 status |
+| 1Ah | GetID | INT3 status, INT2 or INT5 identity |
+| 1Dh | GetQ | INT3 status, INT2 subchannel Q |
+| 1Eh | ReadTOC | INT3 late status, INT2 status |
+
+A seek or a spin-up can delay the second response by more than a second, and software waits for it before the next command. A command rejected with INT5 sends no second response.[^spxresp2]
+
+psx-spx measured the following times on a PAL PSone in CPU cycles at 33.8688 MHz:[^spxtime]
+
+Table: Response timing
+
+| Command | Average | Min | Max |
+| --- | --- | --- | --- |
+| Nop, first response | 000C4E1h | 0004A73h | 003115Bh |
+| Nop when stopped, first response | 0005CF4h | 000483Bh | 00093F2h |
+| Init, first response | 0013CCEh | 000F820h | |
+| GetID, second response | 0004A00h | 0004922h | 0004C2Bh |
+| Pause at single speed, second response | 021181Ch | 020EAEFh | 0216E3Ch |
+| Pause at double speed, second response | 010BD93h | 010477Ah | 011B302h |
+| Stop at single speed, second response | 0D38ACAh | 0C3BC41h | 0DA554Dh |
+| Stop at double speed, second response | 18A6076h | 184476Bh | 192B306h |
+| Read at single speed, INT1 interval | 006E1CDh | 00686DAh | 0072732h |
+| Read at double speed, INT1 interval | 0036CD2h | 00322DFh | 003AB2Bh |
+
+The second response of Pause takes about the time of 5 sectors. The exact INT1 interval in CPU cycles is 33.8688 MHz x 930h / 4 / 44100 at single speed and half that at double speed.[^spxtime]
+
+## References
+
+[^ovr114]: Sony Computer Entertainment Inc. Run-Time Library Overview. January 1999. Page 11-4.
+[^ovr115]: Sony Computer Entertainment Inc. Run-Time Library Overview. January 1999. Page 11-5.
+[^ovr116]: Sony Computer Entertainment Inc. Run-Time Library Overview. January 1999. Page 11-6, Table 11-2.
+[^ovr117]: Sony Computer Entertainment Inc. Run-Time Library Overview. January 1999. Page 11-7, Table 11-3.
+[^ovr118]: Sony Computer Entertainment Inc. Run-Time Library Overview. January 1999. Page 11-8, Table 11-4, Table 11-5.
+[^ovr119]: Sony Computer Entertainment Inc. Run-Time Library Overview. January 1999. Page 11-9, Table 11-6.
+[^ovr1110]: Sony Computer Entertainment Inc. Run-Time Library Overview. January 1999. Page 11-10, Table 11-7, Table 11-8.
+[^ovr1111]: Sony Computer Entertainment Inc. Run-Time Library Overview. January 1999. Page 11-11, Table 11-9, Table 11-10, Table 11-11.
+[^ovr1114]: Sony Computer Entertainment Inc. Run-Time Library Overview. January 1999. Page 11-14, Table 11-14.
+[^ovr1119]: Sony Computer Entertainment Inc. Run-Time Library Overview. January 1999. Page 11-19.
+[^ovr1120]: Sony Computer Entertainment Inc. Run-Time Library Overview. January 1999. Page 11-20.
+[^ovr1121]: Sony Computer Entertainment Inc. Run-Time Library Overview. January 1999. Page 11-21.
+[^ovr1123]: Sony Computer Entertainment Inc. Run-Time Library Overview. January 1999. Page 11-23.
+[^ovr1124]: Sony Computer Entertainment Inc. Run-Time Library Overview. January 1999. Page 11-24.
+[^ref1010]: Sony Computer Entertainment Inc. Run-Time Library Reference. January 1999. Pages 10-9 and 10-10, Table 10-1.
+[^spxsum]: psx-spx. CDROM Drive, CDROM Controller Command Summary. https://psx-spx.consoledev.net/cdromdrive/
+[^spxstat]: psx-spx. CDROM Drive, CDROM - Status Commands, Status code (stat). https://psx-spx.consoledev.net/cdromdrive/
+[^spxsetmode]: psx-spx. CDROM Drive, CDROM - Control Commands, Setmode. https://psx-spx.consoledev.net/cdromdrive/
+[^spxplaymode]: psx-spx. CDROM Drive, CDROM - CD Audio Commands, Setmode bits used for Play command. https://psx-spx.consoledev.net/cdromdrive/
+[^spxnop]: psx-spx. CDROM Drive, CDROM - Status Commands, Nop. https://psx-spx.consoledev.net/cdromdrive/
+[^spxsetloc]: psx-spx. CDROM Drive, CDROM - Seek Commands, Setloc. https://psx-spx.consoledev.net/cdromdrive/
+[^spxslrp]: psx-spx. CDROM Drive, CDROM - Read Commands, Setloc, Read, Pause. https://psx-spx.consoledev.net/cdromdrive/
+[^spxplay]: psx-spx. CDROM Drive, CDROM - CD Audio Commands, Play. https://psx-spx.consoledev.net/cdromdrive/
+[^spxreport]: psx-spx. CDROM Drive, CDROM - CD Audio Commands, Report. https://psx-spx.consoledev.net/cdromdrive/
+[^spxautop]: psx-spx. CDROM Drive, CDROM - CD Audio Commands, AutoPause. https://psx-spx.consoledev.net/cdromdrive/
+[^spxfwd]: psx-spx. CDROM Drive, CDROM - CD Audio Commands, Forward and Backward. https://psx-spx.consoledev.net/cdromdrive/
+[^spxreadn]: psx-spx. CDROM Drive, CDROM - Read Commands, ReadN. https://psx-spx.consoledev.net/cdromdrive/
+[^spxmotor]: psx-spx. CDROM Drive, CDROM - Control Commands, MotorOn. https://psx-spx.consoledev.net/cdromdrive/
+[^spxstop]: psx-spx. CDROM Drive, CDROM - Control Commands, Stop. https://psx-spx.consoledev.net/cdromdrive/
+[^spxpause]: psx-spx. CDROM Drive, CDROM - Control Commands, Pause. https://psx-spx.consoledev.net/cdromdrive/
+[^spxinit]: psx-spx. CDROM Drive, CDROM - Control Commands, Init. https://psx-spx.consoledev.net/cdromdrive/
+[^spxmute]: psx-spx. CDROM Drive, CDROM - CD Audio Commands, Mute. https://psx-spx.consoledev.net/cdromdrive/
+[^spxfilter]: psx-spx. CDROM Drive, CDROM - Control Commands, Setfilter. https://psx-spx.consoledev.net/cdromdrive/
+[^spxgetparam]: psx-spx. CDROM Drive, CDROM - Status Commands, Getparam. https://psx-spx.consoledev.net/cdromdrive/
+[^spxgetlocl]: psx-spx. CDROM Drive, CDROM - Status Commands, GetlocL. https://psx-spx.consoledev.net/cdromdrive/
+[^spxgetlocp]: psx-spx. CDROM Drive, CDROM - Status Commands, GetlocP. https://psx-spx.consoledev.net/cdromdrive/
+[^spxsession]: psx-spx. CDROM Drive, CDROM - Seek Commands, SetSession. https://psx-spx.consoledev.net/cdromdrive/
+[^spxgettd]: psx-spx. CDROM Drive, CDROM - Status Commands, GetTD. https://psx-spx.consoledev.net/cdromdrive/
+[^spxseek]: psx-spx. CDROM Drive, CDROM - Seek Commands, SeekL and SeekP. https://psx-spx.consoledev.net/cdromdrive/
+[^spxtest]: psx-spx. CDROM Drive, CDROM - Test Commands - Version, Switches, Region, Chipset, SCEx. https://psx-spx.consoledev.net/cdromdrive/
+[^spxregion]: psx-spx. CDROM Drive, CDROM - Test Commands, 19h,22h. https://psx-spx.consoledev.net/cdromdrive/
+[^spxchips]: psx-spx. CDROM Drive, CDROM - Test Commands, 19h,23h to 19h,25h. https://psx-spx.consoledev.net/cdromdrive/
+[^spxgetid]: psx-spx. CDROM Drive, CDROM - Status Commands, GetID. https://psx-spx.consoledev.net/cdromdrive/
+[^spxreset]: psx-spx. CDROM Drive, CDROM - Control Commands, Reset. https://psx-spx.consoledev.net/cdromdrive/
+[^spxgetq]: psx-spx. CDROM Drive, CDROM - Status Commands, GetQ. https://psx-spx.consoledev.net/cdromdrive/
+[^spxreadtoc]: psx-spx. CDROM Drive, CDROM - Read Commands, ReadTOC. https://psx-spx.consoledev.net/cdromdrive/
+[^spxmain]: psx-spx. CDROM Drive, CDROM - Mainloop/Responses, SUB-CPU Mainloop. https://psx-spx.consoledev.net/cdromdrive/
+[^spxresp]: psx-spx. CDROM Drive, CDROM - Mainloop/Responses, Responses. https://psx-spx.consoledev.net/cdromdrive/
+[^spxresp2]: psx-spx. CDROM Drive, CDROM - Mainloop/Responses, Second Responses (INT2). https://psx-spx.consoledev.net/cdromdrive/
+[^spxtime]: psx-spx. CDROM Drive, CDROM - Response Timings. https://psx-spx.consoledev.net/cdromdrive/