Technote DV22CD-ROM Driver CallsRevised by: Sérgio J. Henriques Jan. 1997 Updated by: Mark Cookson Sept. 1998 Apple Worldwide Developer Technical Support |
Changes since May 1994: Added power management, play
list calls and an icon for CD-Extra discs, which is available starting in version 5.1.X of the Apple CD-ROM driver extension. Removed
SCSI-specific calls and support for block sizes of 256 and 1024
bytes/block, which are not available starting in version 5.2.X of the
Apple CD-ROM driver extension. Fixed the definition of the "CD
Features" flags in GetCDFeatures
. Corrected some minor
errors.
Topics
Version 5.2.X History: Version 5.2 adds support for ATAPI CD-ROM drives.
Version 5.1.X History: Version 5.1 adds support for the
AppleCD 600, support for multi-session CDs, support for an
independent icon for CD-Extra, support for asynchronous calls, and
support for playing audio track lists with 5 new calls:
SetTrackList
, GetTrackList
,
GetTrackIndex
, SetPlayMode
, and
GetPlayMode
.
Version 5.0.X History: Version 5.0 adds support for the
AppleCD 300 Plus and three new calls: DriverGestalt
,
ReturnDeviceIdent
, and GetCDFeatures
.
Version 5.0 is also the first version to support asynchronous I/O
using SCSI Manager 4.3. The ReadMCN
and
ReadISRC
calls did not return the correct information in
version 4.0.X when using an AppleCD 300. Those two calls now work in
version 5.0, but the format of the returned parameters has changed
for all drives. Version 5.0.1 fixes the following problems: an empty
tray can be ejected using the Eject
control call; when
third-party SCSI accelerator cards are installed, the driver now sees
the CD-ROM drives, and the WhoIsThere
call works
correctly; and DriverGestalt
will no longer modify
csParam[0]
.
Version 4.0.X History: Version 4.0 of the Apple CD-ROM extension was the first version to support dual-speed operation and multiple-session Photo CDs on the AppleCD 300. Version 4.0 also supports single-session Photo CDs on all other Apple CD-ROM drives. Version 4.0 had problems with certain CD-ROMs that used encryption technology to restrict access to files. When the customer was given a decryption key to gain access to a file, the file would not always appear in the Finder. Version 4.0.1 was produced to fix this problem. However, this version was tested only on the Macintosh IIvx and Performa 600. Version 4.0.2 was tested on all Macintosh computers, and a few changes were made to ensure compatibility across the Macintosh product line. Version 4.0.2 corrected problems when sending audio commands using block addressing only. Audio calls using minute-second-frame addressing continued to work correctly.
Audio compact discs and CD-ROM discs conform to two standards, called the Red Book and the Yellow Book. The Red book specifies audio standards; the Yellow book specifies additional standards for CD-ROM. "Red Book" is the common name of the "Compact Disc Digital Audio Standard" standard, CEI IEC 908. When a disc conforms to the Red Book standard, it will usually have "digital audio" printed below the "disc" logo. Most music CDs conform to this standard. "Yellow Book" is the standard for CD-ROM, ISO 10149. When a disc conforms to the Yellow Book, the words "data storage" usually are printed beneath the "disc" logo.
There are several other standards usually associated with CD-ROM technology: the "Green Book" standard defines CD-I (Compact Disc Interactive); "Orange Book" defines write-once compact discs; and "Blue Book" defines CD-Extra (Compact Disc Digital Audio plus Data).
You can get the Red Book and Yellow Book from:
ANSI
Attn: Sales
1430 Broadway
New York, NY 10018
(212) 642-4900
Red Book: CEI IEC 908
Yellow Book: ISO 10149:1989
You can get the Green Book from:
American CD-I Association
11111 Santa Monica, Suite 750
Los Angeles, CA 90025
(310) 444-6619
The other standards are available only to Sony/Philips licensees. Contact Sony or Philips for licensing details.
Beginning with version 4.0 of the Apple CD-ROM software, several
new Gestalt
selectors are installed by Foreign File
Access and various file system translators. Each selector is a
version number, as defined in Inside Macintosh volume VI, page
VI-3-34. The list includes:
Apple Photo Access |
|
Foreign File Access |
|
High Sierra File Access |
|
ISO 9660 File Access, version 1.0 through 4.0 |
|
ISO 9660 File Access, version 5.0 |
|
Audio CD Access |
|
To call the Macintosh driver, you need to understand the possible addressing formats for audio blocks on a CD. The three addressing formats are:
An audio CD contains up to 74 minutes of sound. (By decreasing the inter-track gap and other tricks, you can put more than 74 minutes of sound on a CD. Doing this is only marginally within the standard. Such CDs may not be playable on all drives.) These minutes are divided into 60 seconds. Each second contains 75 frames. There is a two-second lead-in area at the beginning of the disc that contains table of contents information about the tracks on that CD. You can have a maximum of 99 tracks on a CD.
You can address sound down to the frame level, that is, down to the 1/75th of a second. You can address sound by specifying an absolute block number (e.g., start playing at absolute block 1,234,567 from the start of the disc), or by absolute minute, second, and frame number (e.g., start playing at minute 42, second 30, frame 15 on the disc), or by logical track number (e.g., start playing at track 2).
The driver requires that the logical track number or absolute
minute-second-frame numbers be specified in BCD (e.g., the decimal
number 12 is stored as hex 0x0012
, not as
0x000C
).
Optical Positioning Type
Many calls require an optical pick-up positioning type. This is used to specify what kind of address is being used in other parameters of a given call. There are four different optical pick-up positioning types:
Type |
Description |
|
32-bit Logical Block Address |
|
An AMIN-ASEC-AFRAME descriptor that gives the running time from the beginning of the disc (in BCD) |
|
A track number (in BCD) |
|
An index into the driver's track play list |
Track Control Field
Many calls return a control field. This field describes the format of the current track, and has the following values:
Bits |
Function |
00x0
|
2 audio channels without pre-emphasis |
00x1
|
2 audio channels with pre-emphasis |
10x0
|
4 audio channels without pre-emphasis |
10x1
|
4 audio channels with pre-emphasis |
01x0
|
data track |
01x1
|
reserved |
11xx
|
reserved |
xx0x
|
digital copy prohibited |
xx1x
|
digital copy permitted |
Audio Play Mode
Many calls require a play mode. This field describes how to play the audio track, and this field has the following values:
Bits |
Effect |
0000
|
Muting on (no audio) |
0001
|
Right channel through right channel only |
0010
|
Left channel through right channel only |
0011
|
Left and right channel through right channel only * |
0100
|
Right channel through left channel only |
0101
|
Right channel through left and right channel |
0110
|
Right channel through left channel, left channel through right channel |
0111
|
Right channel through left channel, left and right channel through right channel * |
1000
|
Left channel through left channel only |
1001
|
Left channel through left channel, right channel through right channel (stereo) |
1010
|
Left channel through left and right channel |
1011
|
Left channel through left channel, left and right channel through right channel * |
1100
|
Left and right channel through left channel * |
1101
|
Left and right channel through left channel, right channel through right channel * |
1110
|
Left and right channel through left channel, left channel through right channel * |
1111
|
Left and right channel through left channel, left and right channel through right channel (monaural) * |
*Not available on AppleCD 300 Plus
In the absolute minute-second-frame address, the ranges are as follows:
Minutes |
00 to 99 (effectively, from 00 to 75) |
Seconds |
00 to 59 |
Frames |
00 to 74 |
Making a High-Level Driver Call
The Apple CD-ROM driver does not conform to the normal design of a
driver. In particular, the Apple CD-ROM driver returns some
additional status information in some of its control calls, and
expects to receive some additional control information in some of its
status calls. The high-level control and status calls weren't
designed with this in mind. The glue for control does not fill in the
csParamPtr
field with the results of any changes due to
a control call, and the glue for status does not use the
csParam
field passed in as part of the call it creates
on the stack. Do not use high-level control and status calls to
access the Apple CD-ROM driver; use only the PBControl
and PBStatus
calls.
Making a Low-Level Driver Call
The low-level calls require that you pass in two parameters: a pointer to a parameter block, and a flag indicating synchronous or asynchronous completion. You must fill in the parameter block yourself, and may find it easier to define your own custom parameter block variants for the various calls. Here's some example MPW C code to get audio status:
#include <Devices.h> short gDrvRefNum; // set up somewhere else // this is a custom version of the CntrlParam parameter // block defined on page II-181 and II-183 or in // Devices.h #if PRAGMA_STRUCT_ALIGN #pragma options align=mac68k #endif typedef struct { QElemPtr qLink; int qType; int ioTrap; Ptr ioCmdAddr; ProcPtr ioCompletion; OsErr ioResult; StringPtr ioNamePtr; int ioVRefNum; int ioRefNum; int csCode; // Everything below this replaces: short csParam[11] unsigned char status; unsigned char play; unsigned char control; unsigned char minute; unsigned char second; unsigned char frame; char unused[16]; // for the rest } CDCntrlParam; #if PRAGMA_STRUCT_ALIGN #pragma options align=reset #endif // GetAudioStuff // requires one input, the driver reference number that we // got by calling PBOpen(). // fills in six parameters with appropriate information // from the driver call. // We're assuming that only one CD player is attached. // To generalize this code, fill in the ioVRefNum dynamically. OSErr GetAudioStuff(status, play, control, minute, second, frame) unsigned char *status, *play, *control, *minute, *second, *frame; { OSErr result; CDCntrlParam myPB; myPB.ioCompletion = 0; myPB.ioVRefNum = 1; // assuming only 1 volume myPB.ioRefNum = gDrvRefNum; // determined elsewhere myPB.csCode = 107; result = PBControl(&myPB, false); if (result == noErr) { *status = myPB.status; *play = myPB.play; *control = myPB.control; *minute = myPB.minute; *second = myPB.second; *frame = myPB.frame; } return(result); } |
Driver Summary
Name
.AppleCD
Conventions
A detailed description of the device driver function is given here.
Input Parameters:
Relevant csCode
and
csParam[]
requirements are listed
here.
Output Produced:
Any returned data is listed here.
Status Return Codes:
A list of possible status return codes this function can return are listed here.
controlErr
badUnitErr
notOpenErr
ioErr
wPrErr
paramErr
offLinErr
controlErr.
Supported Control Calls
csCode |
Function |
Name Description |
1 |
|
Interrupt all asynchronous driver operations. |
|
5 |
|
Verify the data on the disc. |
|
6 |
|
Format the disc. |
|
7 |
|
Eject disc from drive. |
|
21 |
|
Return |
|
22 |
|
Return |
|
23 |
|
Return drive characteristics information. |
|
65 |
|
Driver-specific |
70 |
|
Allow users to set the power mode of a CD-ROM drive. |
|
76 |
|
Enable/disable |
|
79 |
|
Modify block size of device. |
|
80 |
|
Enable/disable the button on the front of the CD-ROM device. |
|
81 |
|
Modify period of the |
100 |
|
Return a disc's Table of Contents (TOC) information. |
|
101 |
|
Return Q-Subcode information. |
|
102 |
|
Return 4-byte header information for a specified block. |
|
103 |
|
Search disc for a specified track. |
|
104 |
|
Cause drive to play a given range of audio. |
|
105 |
|
Cause drive to enter/exit the Hold Track State. |
|
106 |
|
Specify an address to cause the CD-ROM to stop. |
|
107 |
|
Request the play status information from a drive. |
|
108 |
|
Cause drive to fast-forward/reverse. |
|
109 |
|
Set volume level for drive (not available on AppleCD SC). |
|
110 |
|
Return Media Catalog Number (not available on AppleCD SC). |
|
111 |
|
Return International Standard Recording Code (not available on AppleCD SC). |
|
112 |
|
Return Audio Volume Control Data (not available on AppleCD SC). |
|
113 |
|
Return the current spindle speed. |
|
114 |
|
Set the spindle speed. |
|
115 |
|
Return digital audio data (not supported by AppleCD SC, SC Plus/AppleCD 150). |
|
116 |
|
Return subcodes while playing audio (not supported by AppleCD SC, AppleCD SC Plus/AppleCD 150). |
122 |
|
Set the audio tracks playlist. |
|
123 |
|
Get the current audio tracks playlist. |
|
124 |
|
Get the current audio tracks playlist index. |
|
125 |
|
Set the audio tracks play mode (including repeat). |
|
126 |
|
Get the current audio tracks play mode (including repeat). |
-1 |
|
Executes necessary cleanup before shutdown. |
|
Function Name |
Description |
8 |
|
Provides drive/disc information about a specified device ID. |
|
43 |
|
Returns various driver information. |
|
70 |
|
Returns the current power mode of a CD drive at a given device ID. |
|
95 |
|
Returns last |
|
96 |
|
Returns the type of CD drive at a given device ID. |
|
98 |
|
Returns the block size of the disc at a given device ID. |
|
120 |
|
Returns the |
|
121 |
|
Returns various CD-ROM drive features (spindle speed, drawer or tray type, etc.). |
KillIO
noErr
if called.
Input Parameters:
|
1 |
|
|
Reserved. |
|
This is the only expected status return code. |
VerifyTheDisc
noErr
(as long as a disc is mounted). If no disc
is mounted, the CD-ROM driver will return offLinErr
.
Input Parameters:
|
5 |
|
|
Reserved. |
|
The entire disc was successfully verified with no errors detected. |
|
|
No disc inserted at the specified device ID. |
FormatTheDisc
writErr
status code.
Input Parameters:
|
6 |
|
|
Reserved. |
|
This control call is not valid for this device. |
EjectTheDisc
Prevent/Allow Medium Removal
command
is issued to reactivate the external Eject button on the front panel
of the CD-ROM drive. Then, the specified device is sent an "eject"
command to eject the disc. Next, the dNeedTime
flag in
the specified device ID's DCE is set so that new disc insertions will
be periodically checked for (see the accRun
control call
for more details). Finally, the drive queue entry associated with
this drive is marked as being Off-Line and Ejected.
Input Parameters:
|
7 |
|
|
Reserved. |
|
The entire disc was successfully ejected. |
|
|
No disc inserted at the specified device ID. |
GetDriveIcon
ICN#
-style icon
data and name string that is typically displayed by the Startup Disk
Control Panel module. The drive icon is the same as the media icon in
this driver. There is no true drive icon because there is no way of
determining if an internal or external drive should represented.
Starting on version 5.1, the driver returns a special icon when a
CD-Extra is present in the drive, and a generic icon when any other
type of CD is present. See Figure 1 for a picture of the icons
returned.
Input Parameters:
|
21 |
|
|
Reserved. |
|
Address of |
|
This is the only possible status return code. |
Generic CD icon |
CD-Extra icon |
GetDriveIcon
control call
GetMediaIcon
ICN#
-style icon
data and name string that is displayed whenever the disc media is
shown. This icon can be seen on the desktop or when the "Get Info"
(Cmd-I) command from the Finder is executed under System 7. See
Figure 2 for a picture of the icons returned.
Input Parameters:
|
22 |
|
|
Reserved. |
|
Address of |
|
This is the only possible status return code. |
Generic CD icon |
CD-Extra icon |
GetDriveIcon
control call
DriveInfo
$00000B01
. Bits 7-0 equal to 0x01
means
that this is an "unspecified" drive. Bit 8 equal to 1 means that this
is an "external" drive (this will be set even if the drive is
actually mounted internally). Bit 9 equal to 1 means that this is a
SCSI drive (this will be set even if the drive is actually an ATAPI
drive). Bit 10 equal to 0 means that this is a removable media drive.
Bit 11 equal to 1 means that this is a "secondary" drive. All other
bits are reserved.
Input Parameters:
|
23 |
|
|
Reserved. |
|
Drive information |
|
This is the only possible status return code. |
accRun
There is no need for an application to issue this call. Almost all
Macintosh programs make a call to the MacOS routine
SystemTask()
, and one of the functions of that routine
is occasionally to make some CPU time available to all devices that
request it by executing its accRun
call. (See Inside
Macintosh, Volume II, pg. 189 for a further discussion of
accRun
). This is done by setting the
dNeedTime
flag in the Device Control Entry (DCE) for a
given device.
Since the CD-ROM device is a removable media device and does not
generate interrupts when a disc is inserted, the only way to detect
disc insertion is by occasionally polling all devices known by the
driver to be "empty" (disc is not inserted or is still off-line). So,
the main function of the accRun
control call is testing
for disc insertions.
In addition, during the Macintosh boot process, if the driver is
installed before the System file is read in, the driver cannot
install its custom CD-ROM Disk Switch subroutine. When the System
file is read in and installed, it will overwrite the low-memory
global that defines the address of the standard Disk Switch routine.
So, the installation of our custom Disk Switch routine is held off
until the first invocation of SystemTask()
. At that
time, the System file has already been loaded and the standard Disk
Switch routine has been initialized. The accRun
control
call also handles track play lists.
Input Parameters:
|
65 |
|
|
Reserved. |
|
This is the only possible status return code. |
SetPowerMode
pmActive
pmStandby
pmIdle
pmSleep
Input Parameters:
|
|
70 |
|
New power mode to be set: |
|
0 -- Active, normal operation. |
||
1 -- Standby, minimal energy-saving state. |
||
2 -- Idle, substantial energy-saving state. |
||
3 -- Sleep, maximum energy-saving state. |
||
|
Reserved. |
|
|
Reserved. |
|
Drive set to the new power mode. |
|
|
Invalid power mode sent to the driver. |
ModifyPostEvent
ModifyPostEvent
, or
until the machine is restarted.
Input Parameters:
|
|
76 |
|
|
|
0 |
-- Do not issue disc-insert events for non-HFS CD-ROM discs |
|
¬0 |
-- Issue disc-insert events for non-HFS CD-ROM discs |
|
|
|
Reserved |
|
|
This is the only possible status return code. |
ChangeBlockSize
The supported block sizes are 512, 2048, 2056, 2336, 2340, 2352, 2646, and 2647 bytes. The AppleCD SC cannot handle block sizes of 2056, 2352, 2646, and 2647 bytes. The AppleCD SC Plus cannot handle block sizes of 2352, 2646, and 2647 bytes.
The following tables show the type of data that is returned for each of the valid block sizes:
CD-ROM Mode 1 Data Format:
Block Size |
Block Contents |
512 |
User data (512) |
2048 |
User data (2048) |
2336 |
User data (2048) + EDC (4) + Zero (8) + ECC (276) |
2340 |
Header (4) + User data (2048) + EDC (4) + Zero (8) + ECC (276) |
2352 |
Sync (12) + Header (4) + User data (2048) + EDC (4) + Zero (8) + ECC (276) |
CD-ROM Mode 2 Data Format:
Block Size |
Block Contents |
2336 |
Mode 2 User data (2336) |
2340 |
Header (4) + Mode 2 User data (2336) |
2352 |
Sync (12) + Header (4) + Mode 2 User data (2336) |
CD-ROM Mode 2 Form 1 Data Format (CD-XA or CD-I):
Block Size |
Block Contents |
512 |
User data (512) |
2048 |
User data (2048) |
2056 |
Subheader (8) + User data (2048) |
2336 |
Subheader (8) + User data (2048) + EDC (4) + ECC (276) |
2340 |
Header (4) + Subheader (8) + User data (2048) + EDC (4) + ECC (276) |
2352 |
Sync (12) + Header (4) + Subheader (8) + User data (2048) + EDC (4) + ECC (276) |
2646 |
Sync (12) + Header (4) + Subheader (8) + User data (2048) + EDC (4) + ECC (276) + Byte Error Flags (294) |
2647 |
Sync (12) + Header (4) + Subheader (8) + User data (2048) + EDC (4) + ECC (276) + Block Error Flag (1) + Byte Error Flags (294) |
CD-ROM Mode 2 Form 2 Data Format (CD-XA or CD-I):
Block Size |
Block Contents |
2336 |
Subheader (8) + User data (2324) + Reserved or EDC (4) |
2340 |
Header (4) + Subheader (8) + User data (2324) + Reserved or EDC (4) |
2352 |
Sync (12) + Header (4) + Subheader (8) + User data (2324) + Reserved or EDC (4) |
2646 |
Sync (12) + Header (4) + Subheader (8) + User data (2324) + Reserved or EDC (4) + Byte Error Flags (294) |
2647 |
Sync (12) + Header (4) + Subheader (8) + User data (2324) + Reserved or EDC (4) + Block Error Flag (1) + Byte Error Flags (294) |
Input Parameters:
|
79 |
|
|
Block size the drive should use from now on. |
|
|
Reserved. |
|
The block size change completed successfully. |
|
|
An invalid block size was specified. |
SetUserEject
The CD-ROM device does not generate an interrupt when a disc is
inserted or ejected, so if the button is left active we have no way
of accurately knowing whether or not there is really a disc in the
drive. The MacOS assumes it has final say over when an ejectable disc
is actually ejected, and issues an EjectTheDisc
control
call when it wishes to eject the disc.
This call provides a method to disable/enable the manual eject
button for the drive on the specified device ID. Internal variables
are maintained for each device ID that reflect the current state of
the manual eject button. If the button is enabled, the driver sets
the dNeedTime
flag in the appropriate DCE, telling the
driver to periodically poll the device to see whether a disc has been
ejected, or inserted. This is the only way the driver has to ensure
the validity of its global variables in this situation. When a disc
is inserted, the button setting reverts back to disabled.
Input Parameters:
|
|
80 |
|
|
|
1 |
Enable the manual eject button. |
|
|
¬1 |
Disable the manual eject button. {default} |
|
|
Reserved. |
|
noErr |
The button was successfully enabled/disabled. |
|
offLinErr |
No disc inserted in the drive. |
SetPollFreq
accRun
control call is issued,
as well as the polling frequency for a VBL task initiated during the
execution of the driver's custom Disk Switch routine.
Input Parameters:
|
81 |
|
|
Number of Macintosh ticks to be used for polling frequency. |
|
|
Reserved. |
|
|
This is the only possible status return code. |
ReadTOC
ReadTOC
call:
|
Description |
1 |
Transfers the first track number of the first (or only)
session and the last track number of the last (or only)
session. |
2 |
Transfers the starting address of the Lead Out area of
the last (or only) session in BCD MIN-SEC-FRAME format. |
3 |
Transfers the starting address of each track in a range
of specified tracks, starting from the specified starting
track and proceeding in ascending order until the specified
buffer is filled or the data for the last track on the disc
is transferred, whichever is less. Four bytes of information
are transferred to describe the starting address. |
4 |
Transfers the entire table of contents for a disc (all
track entries and points A0, A1, and A2) to the specified
buffer. |
5 |
Transfers information about the number of sessions on the
disc and the location of the last session. |
6 |
Transfers all Q-subcode entries in the lead-in areas of a
disc (including TOC information), starting from the
specified session number and proceeding in ascending order
until the specified buffer is filled, or the data for the
last Q-subcode entry on the disc is transferred, whichever
is less. |
csParam[0-10]
array. For types 3,
4, and 6, the caller is required to specify a buffer to
place the information into. In the case of a type 4 transfer,
the buffer must be 512 bytes long.
Input Parameters:
|
|
100 |
For Type 1: |
|
|
|
|
The transfer type value 1. |
|
|
Reserved. |
For Type 2: |
|
|
|
|
The transfer type value 2. |
|
|
Reserved. |
For Type 3: |
||
|
|
The transfer type value 3. |
|
|
The address of a buffer to return the requested information. |
|
|
The size of the buffer specified in
|
|
|
The MSByte (the upper 8 bits) of this 16-bit word must contain the starting track number (in BCD). |
For Type 4 (Not available on AppleCD SC): |
||
|
|
The transfer type value 4. |
|
|
The address of a buffer to return the requested information. |
For Type 5 (Not available on AppleCD SC, AppleCD SC Plus, and AppleCD): |
||
|
|
The transfer type value 5. |
|
|
Reserved. |
For Type 6 (Not available on AppleCD SC, AppleCD SC Plus, and AppleCD): |
||
|
|
The transfer type value 6. |
|
|
The address of a buffer to return the requested information. |
|
|
The size of the buffer specified in
|
|
|
The |
For Type 1:
|
|
First user track number (in BCD). |
|
|
Last user track number (in BCD). |
|
|
MIN field of a MIN-SEC-FRAME descriptor that describes the Lead Out starting address (in BCD). |
|
|
SEC field of the Lead Out starting address descriptor. |
|
|
FRAME field of the Lead Out starting address descriptor. |
The user must specify a return buffer address and the size of the buffer. The buffer is filled with 4-byte entries for each track in the requested range. Each entry is of the form:
Entry (byte offset) |
Contents |
|
0 |
Bits 7-4: |
Reserved. |
|
Bits 3-0: |
Control Field (see Track Control Field at the beginning of this document for more information). |
1 |
The MIN field of a MIN-SEC-FRAME descriptor that describes the start of the associated track. |
|
2 |
The SEC field of the track starting address descriptor. |
|
3 |
The FRAME field of the track starting address descriptor. |
For Type 4 (Not available on AppleCD SC):
The user must specify a return buffer address. The buffer must be 512 bytes long, and is filled with the entire table of contents, which is returned in the form:
|
Entry |
Contents |
|
|
0 |
Reserved. |
|
|
1-5 |
TOC entry for point A0 (first track number). |
|
|
6-10 |
TOC entry for point A1 (last track number). |
|
|
11-15 |
TOC entry for point A2 (address of beginning of lead out area). |
|
|
16-20 |
TOC entry for track 1. |
|
|
. |
. |
|
|
. |
. |
|
|
. |
. |
|
|
506-510 |
TOC entry for track 99. |
|
Entry |
Contents |
|
|
0 |
Reserved. |
|
|
|
Bits 7-4: |
Reserved. |
|
|
Bits 3-0: |
Control Field (see Track Control Field at the beginning of this document for more information). |
|
1 |
Point or track number. |
|
|
2 |
PMIN. |
|
|
3 |
PSEC. |
|
|
4 |
PFRAME. |
Type 5 (Not available on AppleCD SC, APPLECD SC Plus, and AppleCD 150):
|
The first session number (in BCD). |
|
|
The last session number (in BCD). |
|
|
First track number of last session (in BCD). |
|
|
Reserved |
|
|
Control Field of first track in last session. (see Track Control Field at the beginning of this document for more information). |
|
|
The MIN field of a MIN-SEC-FRAME descriptor that describes the start of the first track of the last session (in BCD). |
|
|
The SEC field of the track starting address descriptor (in BCD). |
|
|
The FRAME field of the track starting address descriptor (in BCD). |
The user must specify a return buffer address and the size of the buffer. The buffer is filled with a 4-byte header and 8-byte entries for each Q-subcode entry in the requested range. The first three entries are for points A0, A1, and A2, and are followed by the track entries for that session. After that, the Q-subcode entries are sorted in ascending order using the ADR field and within each ADR group by ascending order of the POINT field. This pattern is repeated for each session on the disc.
The 4-byte header is of the form:
Header |
Contents |
0-1 |
Total number of TOC data bytes transferred excluding these two length bytes. |
2 |
First session number on the disc (in BCD). |
3 |
Last session number on the disc (in BCD). |
Entry (byte offset) |
Contents |
|
0 |
The session number (in hex). |
|
1 |
Bits 7-4: |
ADR field, i.e., Q-subcode mode field |
|
Bits 3-0: |
Control Field (see Track Control Field at the beginning of this document for more information) |
2 |
TNO - Track number. |
|
3 |
POINT. |
|
4 |
MIN. |
|
5 |
SEC. |
|
6 |
FRAME. |
|
7 |
ZERO. |
|
8 |
PMIN. |
|
9 |
PSEC. |
|
10 |
PFRAME. |
|
The values come directly from the disc and will be in either BCD or hexadecimal format, depending on the field. The session number, ADR/Control and POINT fields are in hexadecimal. All other fields are in BCD. For more information on the format of the TOC, please refer to the "Yellow Book" specification for CD-ROM discs, ISO 10149.In some early CD-300 units, the values for Entries 2 and 3 are swapped. This is due to a firmware bug, which was corrected on later drives. You should always
OR
the two values together to always receive the proper value.
Status Return Codes:
|
TOC data successfully retrieved. |
|
|
An invalid TOC type specified. This can happen due to the TOC type being out of range, or due to the call not being supported by the drive in question (e.g., Type 6 call issued to AppleCD SC drive). |
ReadTheQSubcode
Input Parameters:
|
101 |
|
|
Reserved (Q-Subcode data will be returned here). |
|
|
Reserved. |
|
Control Field information (see Track Control Field at the beginning of this document for more information). |
|
|
Current track number (in BCD). |
|
|
Current index number in the current track. |
|
|
MIN field of a MIN-SEC-FRAME descriptor, which describes the relative running time from the beginning of the track. |
|
|
SEC field for a MIN-SEC-FRAME descriptor. |
|
|
FRAME field for a MIN-SEC-FRAME descriptor. |
|
|
AMIN field of an AMIN-ASEC-AFRAME descriptor, which describes the relative running time from the beginning of the disc. |
|
|
ASEC field of an AMIN-ASEC-AFRAME descriptor. |
|
|
AFRAME field of an AMIN-ASEC-AFRAME descriptor. |
|
|
LSB unused. |
|
Q-subcode data successfully retrieved. |
ReadHeader
paramErr
will be returned.
Input Parameters:
|
102 |
|
|
32-bit logical block address from which to retrieve Header information. |
|
|
Reserved. |
|
AMIN field of an AMIN-ASEC-AFRAME descriptor, which describes the absolute running time from the beginning of the disc. Value is in BCD format. |
|
|
ASEC field of an AMIN-ASEC-AFRAME descriptor. Value is in BCD format. |
|
|
AFRAME field of an AMIN-ASEC-AFRAME descriptor. Value is in BCD format. |
|
|
CD-ROM data mode of the logical block which defines what type of data will be within the 2048 data bytes and 288 auxiliary bytes of the logical block: |
Data Mode |
User Data Field |
Auxiliary Field |
0 |
all bytes zero |
all bytes zero |
1 |
user data |
EDC, L-EC bytes |
2 |
user |
data user data |
|
|
Header information successfully retrieved. |
|
|
The requested block is within an audio track (CD-DA) of the disc. |
AudioTrackSearch
AudioPlay
command is executed and in
what Play Mode it should output the audio information.
Input Parameters:
|
|
103 |
|
|
|
The optical pick-up positioning address type (see "Optical Positioning Types" at the beginning of this document for more information). |
|
|
|
32-bit value representing the search address required by
the corresponding type value in
|
|
|
|
A boolean value indicating what the drive should do when positioning of the pick-up is complete: |
|
|
|
0 |
Enter a Hold Track state ("pause") |
|
|
¬0 |
Start playing the audio track, according to the specified Play Mode. |
|
|
The "Play Mode" (see "Audio Play Modes" at the beginning of this document for more information). |
|
|
|
Reserved. |
|
|
Optical pick-up successfully positioned. |
|
|
Invalid type, Play Mode, or Search Address value specified or tried to execute this audio operation on a data track. |
AudioPlay
AudioTrackSearch
command that automatically begins playing at the specified Search
Address (see the documentation on the AudioTrackSearch
call for more detail). However, this command can also be used to
specify a "Stop Address."
The proper way to use the AudioPlay
-related commands
is:
|
First, specify where the audio playback should stop, by
issuing an |
|
|
Next, (optionally) to pre-position the optical pick-up
where the audio playback should start, by issuing an
|
|
|
At this point, playback can then be started by an
|
This model should always be followed irregardless of the audio play mode to be used, even when playing track lists.
Input Parameters:
|
|
104 |
|
|
|
The optical pick-up positioning address type (see "Optical Positioning Types" at the beginning of this document for more information). |
|
|
|
32-bit value representing the search address required by
the corresponding type value in
|
|
|
|
A boolean value indicating whether the address specified
in |
|
|
|
0 |
The address specified is a Starting Address. |
|
|
¬0 |
The address specified is a Stopping Address. |
|
|
The "Play Mode" (see "Audio Play Modes" at the beginning of this document for more information). |
|
|
|
Reserved. |
|
Operation successful. |
|
|
Invalid type, Play Mode, or Search Address value specified or tried to execute this audio operation on a data track. |
AudioPause
Note: This command is only valid after the issuance of an
AudioTrack
Search, or AudioPlay
command.
Input Parameters:
|
|
105 |
|
|
A (long) boolean value that tells the CD-ROM drive either to pause or continue: |
||
|
|
0 |
Release the "Pause" state and continue playing at the
same Q-subcode address before the last
|
|
|
1 |
Enter a Hold Track ("Pause") state. |
|
|
Reserved. |
|
CD-ROM device successfully paused or released from pause. |
|
|
Invalid pause value specified or tried to execute this audio operation on a data track. |
AudioStop
Play
operation.
Note: If the optical pick-up positioning address type is 0 and the stop address is also 0, the command will immediately stop the Play operation.
Input Parameters:
|
106 |
|
|
The optical pick-up positioning address type (see "Optical Positioning Types" at the beginning of this document for more information). |
|
|
32-bit value representing the stop address required by
the corresponding type value in
|
|
|
Reserved. |
|
Optical pick-up successfully positioned. |
|
|
Invalid type or Search Address value specified or tried to execute this audio operation on a data track. |
AudioStatus
Input Parameters:
|
107 |
|
|
Reserved (Audio Status data will be returned here). |
|
|
The Status Field: |
|
|
|
0 |
Audio Play operation in progress. |
|
|
1 |
CD-ROM device currently in Hold Track ("Pause") state |
|
|
2 |
MUTING-ON operation in progress |
|
|
3 |
Audio Play completed |
|
|
4 |
Error occurred during audio play operation |
|
|
5 |
Audio play operation not requested |
|
|
Reserved. |
|
|
|
Play Mode (see "Audio Play Modes" at the beginning of this document for more information). |
|
|
|
Reserved. |
|
|
|
The Control Field (see Track Control Field at the beginning of this document for more information). |
|
|
|
The AMIN field of an AMIN-ASEC-AFRAME descriptor that describes the current Q-subcode. |
|
|
|
The ASEC field of an AMIN-ASEC-AFRAME descriptor for the current Q-subcode. |
|
|
|
The AFRAME field of an AMIN-ASEC-AFRAME descriptor for the current Q-subcode. |
|
|
Status information successfully read. |
|
|
Tried to execute this audio operation on a data track. |
AudioScan
Input Parameters:
|
|
108 |
|
|
|
The optical pick-up positioning address type (see "Optical Positioning Types" at the beginning of this document for more information). |
|
|
|
32-bit value representing the search address required by
the corresponding type value in
|
|
|
|
The direction the scan should take place: |
|
|
|
0 |
Scan in the fast-forward direction |
|
|
¬0 |
Scan in the fast-reverse direction |
|
|
Reserved. |
Status Return Codes:
|
Optical pick-up successfully positioned. |
|
|
Invalid type or Search Address value specified or tried to execute this audio operation on a data track. |
AudioControl
Notes: |
· |
This call can be used even if no disc is mounted. |
|
· |
Beginning with driver version 4.0.5, the last volume
setting used before powering down a drive will be restored
when the drive is reinitialized. |
|
· |
This command is not available on the AppleCD SC. |
|
109 |
|
|
Left channel volume (0- |
|
|
Right Channel volume (0- |
|
|
Reserved. |
|
Audio volume successfully set. |
ReadMCN
The Media Catalog Number consists of the UPC/Bar Code information
for the disc. The output format was changed from binary data to a
Pascal string beginning with driver version 5.0. Applications can
check the upper bit of csParam[0]
for the
MCVal
bit. If set, the application can use the version
4.0 output format. If the MCVal
is not set, but the upper
byte in csParam[0]
is not equal to zero, then
the application can use the version 5.0 output.
Notes: |
|
This command is not available on the AppleCD SC. |
|
Driver version 4.0.X does not return the correct MCN data when using an AppleCD 300. |
Input Parameters:
|
110 |
|
|
Reserved (MCN data will be returned here). |
|
|
Reserved. |
|
Pascal string containing the MCN (UPC/Bar Code). If the
string length (upper eight bits of
|
|
|
|
|
MSB of the Media Catalog Number (UPC/Bar Code) data if
the |
|
|
Contains the rest of the Media Catalog Number (UPC/Bar
Code) data if the |
|
Media Catalog Number data successfully retrieved, or no MCN was found on the disc. |
|
|
Tried to execute this audio operation on a data track. |
ReadISRC
csParam[0]
for the
TCVal
bit. If set, the application can use the version
4.0 output format. If the TCVal
is not set but the upper
byte in csParam[0]
is not equal to zero, then
the application can use the version 5.0 output.
Notes: |
|
This command is not available on the AppleCD SC. |
|
Driver version 4.0.X does not return the correct ISRC data when using an AppleCD 300. |
Input Parameters:
|
111 |
|
|
A track number (in BCD). |
|
|
Reserved (ISRC data will be returned here). |
|
Pascal string containing the ISRC. If the string length
(upper eight bits of |
|
|
|
|
MSB of the ISRC data for the specified track if the
|
|
|
Contains the rest of the ISRC data if the
|
|
ISRC data successfully retrieved. |
|
|
Tried to execute this audio operation on a data track. |
ReadAudioVolume
Notes: |
|
This call can be used even if no disc is mounted. |
|
This call is not available on the AppleCD SC. |
Input Parameters:
|
112 |
|
|
Reserved (Audio Volume data will be returned here). |
|
|
Reserved. |
|
The left channel volume |
|
|
The right channel volume |
|
Status information successfully read. |
GetSpindleSpeed
Input Parameters:
|
113 |
||
|
Reserved (Speed information will be returned here). |
||
|
Reserved. |
|
|
The current rotational speed: |
|
|
|
00 |
Normal speed. |
|
|
FF |
Maximum speed. |
|
Speed information successfully read. |
SetSpindleSpeed
paramErr
for an AppleCD SC or
AppleCD SC Plus/AppleCD 150 if the input parameter is not 00
(normal speed).
Input Parameters:
|
|
114 |
|
|
|
Speed setting: |
|
|
|
00 |
Normal speed |
|
|
FF |
Maximum speed |
|
|
Reserved. |
|
Rotational speed successfully set. |
|
|
An invalid speed setting was specified. |
ReadAudio
There are four possible formats for the audio data that is returned:
Type Values |
Description |
0 |
Audio data only--2352 bytes per audio block. |
1 |
Audio data with Q-subcode--2352 audio bytes, 10 bytes Q-subcode,and 6 zero bytes = 2368 bytes per block. |
2 |
Audio data with all subcode data (P~W)--2352 audio bytes and 96 subcode bytes = 2448 bytes per block. |
3 |
All subcode data only (P~W)--96 subcode bytes per block. |
The position of an audio block cannot be determined exactly. Thus,
two ReadAudio
calls with the same starting address will
not necessarily return the same data in the same position. Typically
the data will be shifted up to 1.5 frames (3528 bytes). To read large
sections of audio data using multiple ReadAudio
calls
and not have a gap are overlap in the audio data, the
ReadAudio
calls must occur frequently enough to prevent
the internal drive buffer from overflowing. If the Macintosh is too
slow, a controlErr
will be returned along with the audio
data. The controlErr
indicates that the audio data just
received has a gap or overlap in it.
For type 2 and type 3, the P- and Q-subcodes are accurately aligned to the CD block boundary, but the R- through W-subcodes may be offset by one pack (i.e. 24 subcode bytes) from the P- and Q-subcodes. Thus, in any 96-byte subcode data from block n, the last 24 bytes contain R- through W-subcodes from the next block (n+1).
The current volume setting has no effect on the audio data that is
returned. When using ReadAudio
with type 3, the
audio is played through any connected speakers. The audio can be
muted to avoid hearing anything while reading the subcode data. For
types 0, 1, and 2 the data rate can be adjusted
by changing the drive speed prior to calling ReadAudio
.
For type 3 only, subcode data is always transferred at an
average throughput of 150 KBytes per second.
This call is not supported by AppleCD SC, AppleCD SC Plus/AppleCD
150. Most ATAPI drives will not support ReadAudio
type
1, 2 or 3.
Input Parameters:
|
115 |
|
|
Audio Type (see above) |
|
|
The address of the buffer to return the requested information. |
|
|
The starting address type (see "Optical Positioning Types" at the beginning of this document for more information). |
|
|
32-bit value representing the start address required by
the corresponding type value in
|
|
|
The number of consecutive audio blocks to return. |
|
|
Reserved. |
|
Audio data successfully retrieved. |
|
|
An invalid audio type, address type, or audio address specified or tried to execute this audio operation on a data track. |
ReadAllSubcodes
ReadAllSubcodes
retrieves the subcode
information from this buffer. If the number of subcode blocks
requested exceeds the quantity currently in the buffer, the control
call waits until more subcode blocks are available before returning
data. An option allows any subcode data currently in the buffer to be
purged, allowing the host to re-synchronize to the latest subcode
data.
If the Macintosh does not send ReadAllSubcode
requests frequently enough, a controlErr
will be
returned indicating that the internal drive buffer overflowed and
some subcode data was lost. A ReadAllSubcodes
call must
be made with the purge parameter set to clear the overflow
condition.
Note: The R- through W-subcodes that are returned are accurately aligned to the CD block boundary, but the P- and Q-subcodes may be offset by one pack (i.e. 24 subcode bytes) from the R- through W-subcodes. Thus, in any 96-byte subcode data from block n, the first 24 bytes may contain the P and Q subcodes from the previous block (n-1). |
Input Parameters:
|
|
116 |
|
|
|
The address of the buffer to return the requested subcode blocks. |
|
|
|
A boolean value indicating whether the current information in the drive buffer should be purged before retrieving any subcode data: |
|
|
|
0 |
retrieve buffered subcode blocks |
|
|
¬0 |
delete any blocks in the subcode buffer and wait for new data |
|
|
The number of consecutive subcode blocks (96 bytes per block) to return. |
|
|
|
Reserved. |
|
Audio data successfully retrieved. |
|
|
A buffer overflow occurred during the
|
|
|
Audio operation on a data track. |
SetTrackList
The proper way to use the audio track list related commands is:
· |
First, use the |
· |
Next, specify where the audio playback should stop, by
issuing an |
· |
Next (optionally), to pre-position the optical pick-up on
the track in the list where the audio playback should start,
by issuing an |
· |
At this point, playback can then be started by an
|
AudioPlay
and AudioTrackSearch
commands issued should use the optical positioning type
(csParam[0]
) set to 3 so the address
field (csParam[1-2]
) can be interpreted as an
index into the driver's audio track play list.
Input Parameters:
|
122 |
|
|
Length of the new track play list (must be less than 100). |
|
|
Pointer to new track play list. |
|
|
Reserved. |
|
Track list data successfully set. |
|
|
Either (1) the pointer to track list wasn't provided by the client code, (2) at least one element of the play list wasn't valid, or (3) more than 99 elements were passed in. |
GetTrackList
SetTrackList
command).
Input Parameters:
|
123 |
|
|
Reserved (Length of current track play list will be returned here). |
|
|
The address of a buffer to return the current track play list data. |
|
|
Reserved. |
|
Length of current track play list. |
|
|
The address of the buffer containing the current track play list data. |
|
Track list data successfully retrieved. |
|
|
Pointer to track list wasn't provided by the client code. |
GetTrackIndex
AudioPlay
and AudioTrack
Search commands set track play list index
when called with optical positioning type
(csParam[0]
) set to 3. The
AudioStop
command and Prime
calls (i.e.,
Read
) will stop audio play and reset the track play list
index (to -1).
Input Parameters:
|
124 |
|
|
Reserved (Current track index will be returned here). |
|
|
Reserved. |
|
The current track index. |
|
This is the only possible status return code. |
SetPlayMode
kNormalMode
), to randomly
shuffle between tracks (kShuffleMode
), or to play tracks
in a specified order (kProgMode
). For
kNormalMode
and kProgMode
, play can be
extended by repeating the tracks.
The SetPlayMode
command is used to set the track play
mode and the repeat mode.
The three possible track play modes are:
|
0 |
||
|
1 |
||
|
2 |
|
|
125 |
||
|
|
The repeat flag: |
||
|
|
|
True -- Repeat function is on. |
|
|
|
|
False -- Repeat function is off. |
|
|
|
The track play mode. |
||
|
|
Reserved. |
|
This is the only possible status return code. |
GetPlayMode
SetPlayMode
).
Input Parameters:
|
126 |
|
|
Reserved (Track play mode will be returned here). |
|
|
Reserved. |
|
|
The repeat flag: |
|
|
|
|
True -- Repeat function is on. |
|
|
|
False -- Repeat function is off. |
|
|
The track play mode. |
|
This is the only possible status return code. |
GoodBye
Input Parameters:
|
-1 |
|
|
Reserved. |
|
This is the only possible status return code. |
DriveStatus
Input Parameters:
|
8 |
|
|
Reserved (On exit, contains information that maps to the
|
|
Current track( always 0. |
|
|
Volume locked bit: |
|
0 (volume not locked) |
||
1 (volume locked) |
||
|
Disc in place: |
|
0 (disc not in drive) |
||
1 (disc in drive) |
||
|
Drive installed (always 1). |
|
|
Sides flag (always 0) (single-sided). |
|
|
Number of sides (always 1) (single-sided). |
|
|
Next queue entry (always 0). |
|
|
Reserved. |
|
|
Drive number. |
|
|
Drive reference number. |
|
|
File system identifier (always 1). |
|
|
Two-sided format (always 0) (single-sided). |
|
|
Reserved. |
|
|
Disk error count (always 0). |
|
This is the only possible status return code. |
DriverGestalt
Gestalt
-type
information about the driver itself.
Currently defined driverGestalt
selectors are:
|
True if the driver only behaves synchronously. |
|
|
Version number of the driver (First 4 bytes of the vers #1 resource). |
|
|
Physical interface to device. |
|
|
Type of device the driver is driving. |
|
|
PRAM value to designate this driver/drive. Valid only for ATAPI drives or when SCSI Manager 4.3 is active. |
The following response buffers are defined for the driverGestalt
selectors:
struct driverGestaltSyncResponse { Boolean behavesSynchronously; // true/false = sync/async }; typedef struct driverGestaltSyncResponse driverGestaltSyncResponse struct driverGestaltVersResponse { NumVersion driverVersion; }; typedef struct driverGestaltVersResponse driverGestaltVersResponse struct driverGestaltIntfResponse { OSType interfaceType; // 'scsi' or 'atpi' }; typedef struct driverGestaltIntfResponse driverGestaltIntfResponse struct driverGestaltDevTResponse { OSType deviceType; // 'cdrm' }; typedef struct driverGestaltDevTResponse driverGestaltDevTResponse typedef struct { unsigned char extDev; // SCSI = Target (upper 5 bits) // SCSI = LUN (lower 3 bits) // ATAPI = Bus unsigned char partition; // Unused unsigned char SIMSlot; // SCSI = Slot // ATAPI = 0x20 (internal ATA) unsigned char SIMsRSRC; // SCSI = sRsrcID // ATAPI = 0 (unused) } driverGestaltBootResponse; |
|
43 |
|
|
|
|
|
Reserved ( |
|
|
Reserved. |
|
|
|
This is the only possible status return code. |
GetPowerMode
SetPowerMode
).
Input Parameters:
|
70 |
|
|
Reserved. |
|
The current power mode. |
|
This is the only possible status return code. |
Get2KOffset
Prime
calls to be aligned to the 2K
physical block size of the CD-ROM. This can be used in applications
(e.g., QuickTime) to increase streaming performance by avoiding data
requests that span across a 2K-disc block. This call returns the
number of bytes between the beginning of the 2K physical block and
the first byte read in the previous Prime
call. Possible
values are 0, 512, 1024, and 1536. For example, if a
Prime
call causes a read of the last 512 bytes within a
2K physical block, this call will return 3 x 512 = 1536 bytes. This
is the offset from the beginning of the 2K block to the start of the
first data byte read. Note that this call assumes that the file
system actually makes a Prime
call and that a file
system cache did not fill the read request.
Input Parameters:
|
95 |
|
|
Reserved (on exit contains 2K offset). |
|
|
Reserved. |
|
The offset between the beginning of the 2K physical block and the first byte of the last read call. |
|
The offset for the specified device ID was returned. |
|
|
|
GetDriveType
Note: Applications should begin using the new
GetCDFeatures
call instead of
GetDriveType
.
Input Parameters:
|
96 |
|
|
Reserved (on exit contains the type of CD-ROM drive). |
|
|
Reserved. |
|
A code indicating the type of CD-ROM drive located at the specified device ID. These codes are defined as follows: |
|
1 -- Drive is an AppleCD SC |
||
2 -- Drive is an AppleCD SC Plus / AppleCD 150 |
||
3 -- Drive is an AppleCD 300 or newer (multiple speed drives) |
|
The drive type for the specified device ID was returned. |
|
|
The specified device ID is not a CD-ROM drive. |
GetBlockSize
Note: If the user has set the block size to 512, but the driver has set the actual block size to 2048 and does the 2048-byte to 512-byte conversion, this call will return 512 as the current block size.
Input Parameters:
|
98 |
|
|
Reserved (on exit, it contains the block size). |
|
|
Reserved. |
|
The block size of the disc inserted in the specified device ID. |
|
The block size of the disc in the specified device ID was returned. |
ReturnDeviceIdent
DeviceIdent
for the CD-ROM drive being controlled by this instance (entry in the
unit table) of the driver. This call was first available in driver
version 5.0.
The following is the format of the DeviceIdent
:
|
|
120 |
|
|
Reserved ( |
|
|
Reserved. |
|
The |
|
The |
GetCDFeatures
GetDriveType
status call, which returned a specific
model of CD-ROM drive. This makes client code difficult to maintain
since it must be modified each time a new CD-ROM drive is introduced.
To alleviate this problem, the features of the device have been
broken out into testable bits.
A fixed point number containing the sustained transfer rate of the drive relative to an AppleCD 150 is also included (e.g., AppleCD 300 Plus = 2.0, AppleCD 150 = 1.0).
This information is returned in the following structure:
struct CDDeviceCharacteristics { unsigned char speedMajor; // High byte of fixed point speed unsigned char speedMinor; // Low byte of fixed point speed. unsignedshort cdFlags; // Flags for features of this drive }; typedef struct CDDeviceCharacteristics CDDeviceCharacteristics; enum /* Flags for CD Features field */ { cdPowerInject = 0, // device supports power inject of media cdNotPowerEject = 1, // device does not support power eject of media cdMute = 2, // device supports audio channels muting cdLeftToChannel = 3, // device supports left channel only mono audio cdRightToChannel = 4, // device supports right channel only mono audio cdLeftPlusRight = 5, // device supports left + right channels mono audio cdSCSI_2 = 10, // device supports SCSI2 command set (SCSI only) cdStereoVolume = 11, // device supports independent volume per channel cdDisconnect = 12, // device supports disconnect / reconnect (SCSI only) cdWriteOnce = 13, // device is a write-once type of drive cdPowerInject_Mask = 1 << cdPowerInject, cdNotPowerEject_Mask = 1 << cdNotPowerEject, cdMute_Mask = 1 << cdMute, cdLeftToChannel_Mask = 1 << cdLeftToChannel, cdRightToChannel_Mask = 1 << cdRightToChannel, cdLeftPlusRight_Mask = 1 << cdLeftPlusRight, cdSCSI_2_Mask = 1 << cdSCSI_2, cdStereoVolume_Mask = 1 << cdStereoVolume, cdDisconnect_Mask = 1 << cdDisconnect, cdWriteOnce_Mask = 1 << cdWriteOnce }; |
|
121 |
|
|
Reserved (CD-ROM drive features will be returned here). |
|
|
Reserved. |
|
The CD-ROM drive features as defined above. |
|
The CD-ROM drive features were returned. |
|
The Apple Store | Hot News | About Apple | Products | Support Design & Publishing | Education | Developer | Where to Buy | Home Contact Us Copyright 1998 Apple Computer, Inc. All rights reserved. |