ReactOS 0.4.15-dev-5672-gf73ac17
scsi.h
Go to the documentation of this file.
1/*++
2
3Copyright (c) 2002-2005 Alexandr A. Telyatnikov (Alter)
4
5Module Name:
6 scsi.h
7
8Abstract:
9 This file contains SCSI protocol definitions
10
11Author:
12 Alexander A. Telyatnikov (Alter)
13
14Environment:
15 kernel mode only
16
17Notes:
18
19 THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
20 IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
21 OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
22 IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
23 INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
24 NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
25 DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
26 THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
27 (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
28 THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
29
30Revision History:
31
32--*/
33#ifndef __CDRW_DEVICE_H__
34#define __CDRW_DEVICE_H__
35
36#include "srb.h"
37
38#pragma pack(push, 1)
39
40// Command Descriptor Block. Passed by SCSI controller chip over the SCSI bus
41
42typedef union _CDB {
43
44 // Generic 6-Byte CDB
45 struct _CDB6 {
47 UCHAR Immediate : 1;
49 UCHAR Lun : 3;
51 UCHAR Link : 1;
52 UCHAR Flag : 1;
53 UCHAR Reserved : 4;
55 } CDB6, *PCDB6;
56
57 struct _REQUEST_SENSE {
59 UCHAR Reserved0 : 5;
60 UCHAR Lun : 3;
63 UCHAR Link : 1;
64 UCHAR Flag : 1;
65 UCHAR Reserved2 : 6;
67
68 // Standard 6-byte CDB
69 struct _CDB6READWRITE {
71 UCHAR LBA2 : 5;
72 UCHAR Lun : 3;
73 UCHAR LBA0[2];
77
78 // SCSI Inquiry CDB
79 struct _CDB6INQUIRY {
81 UCHAR Reserved1 : 5;
82 UCHAR Lun : 3;
88
89 // SCSI Format CDB
90
91 struct _ERASE {
93 UCHAR Long : 1;
94 UCHAR Immediate : 1;
95 UCHAR Reserved1 : 3;
96 UCHAR Lun : 3;
99 } ERASE, *PERASE;
100
101 struct _ERASE10 {
113
114#define FormatUnit_Code_Mask 0x07
115#define FormatUnit_Cmp 0x08
116#define FormatUnit_Fmt 0x10
117
118 struct _CDB6FORMAT {
120 union {
121 UCHAR Flags;
122 struct {
123 UCHAR FormatCode : 3;
124 UCHAR Cmp:1;
125 UCHAR Fmt:1;
126 UCHAR Lun : 3;
130 UCHAR Interleave[2];
133
134 // Standard 10-byte CDB
135 struct _CDB10 {
138 UCHAR Reserved1 : 2;
141 UCHAR Lun : 3;
142 UCHAR LBA[4];
146 } CDB10, *PCDB10;
147
148 // Service Action 16-byte CDB
155
156 // CD Rom Audio CDBs
157
158#define PauseResume_Pause 0x00
159#define PauseResume_Resume 0x01
160
161 struct _PAUSE_RESUME {
163 UCHAR Reserved1 : 5;
164 UCHAR Lun : 3;
165 UCHAR Reserved2[6];
169
170 // Read Table of Contents (TOC)
171
172#define ReadTOC_Format_Mask 0x0f
173#define ReadTOC_Format_TOC 0x00
174#define ReadTOC_Format_SesInfo 0x01
175#define ReadTOC_Format_FullTOC 0x02
176#define ReadTOC_Format_PMA 0x03
177#define ReadTOC_Format_ATIP 0x04
178#define ReadTOC_Format_CdText 0x05
179
180 struct _READ_TOC {
182 UCHAR Reserved0 : 1;
183 UCHAR Msf : 1; // HMSF MMC-3
184 UCHAR Reserved1 : 3;
185 UCHAR Lun : 3;
186
187 union {
188 UCHAR Flags;
189 struct {
190 UCHAR Format : 4;
191 UCHAR Reserved : 4;
194
195 UCHAR Reserved2[3];
198 UCHAR Control : 6;
199 UCHAR Format : 2;
201
202 // Play Audio MSF
203 struct _PLAY_AUDIO_MSF {
205 UCHAR Reserved1 : 5;
206 UCHAR Lun : 3;
209 UCHAR EndingMSF[3];
212
213 // Read SubChannel Data
214
215#define SubChannel_SubQ_Header 0x00
216#define SubChannel_SubQ_Block 0x01
217
218 struct _SUBCHANNEL {
220 UCHAR Reserved0 : 1;
221 UCHAR Msf : 1;
222 UCHAR Reserved1 : 3;
223 UCHAR Lun : 3;
224 UCHAR Reserved2 : 6;
225 UCHAR SubQ : 1;
226 UCHAR Reserved3 : 1;
228 UCHAR Reserved4[2];
233
234 // Read CD (by LBA/MSF). Used by Atapi for raw sector reads.
235
236#define ReadCD_SecType_Mask 0x1c
237#define ReadCD_SecType_Any 0x00
238#define ReadCD_SecType_CDDA 0x04
239#define ReadCD_SecType_M1 0x08
240#define ReadCD_SecType_M2 0x0c
241#define ReadCD_SecType_M2F1 0x10
242#define ReadCD_SecType_M2F2 0x14
243
244 struct _READ_CD_MSF {
246
247 UCHAR Reserved0 : 2;
249 UCHAR Reserved1 : 3;
250
253 UCHAR Ending_MSF[3];
254
255 UCHAR Reserved3 : 1;
256 UCHAR ErrorFlags : 2;
257 UCHAR IncludeEDC : 1;
259 UCHAR HeaderCode : 2;
261
263 UCHAR Reserved4 : 5;
264
267
268 struct _READ_CD {
270
273 UCHAR Reserved1 : 3;
274
275 UCHAR LBA[4];
277
278 UCHAR Reserved3 : 1;
279 UCHAR ErrorFlags : 2;
280 UCHAR IncludeEDC : 1;
282 UCHAR HeaderCode : 2;
284
286 UCHAR Reserved4 : 5;
287
289 } READ_CD, *PREAD_CD;
290
291#define WriteCd_RELADR 0x01
292#define WriteCd_FUA 0x08
293#define WriteCd_DPO 0x10
294
295 struct _WRITE_CD {
297 union {
298 UCHAR Flags;
299 struct {
300 UCHAR RELADR : 1;
301 UCHAR Reserved0 : 2;
302 UCHAR FUA : 1;
303 UCHAR DPO : 1;
304 UCHAR Reserved1 : 3;
307 UCHAR LBA [4];
309 UCHAR NumOfBlocks [2];
310 UCHAR Reserved2 [3];
312
313 // Mode sense
314 struct _MODE_SENSE {
316 UCHAR Reserved1 : 3;
317 UCHAR Dbd : 1;
318 UCHAR Reserved2 : 1;
319 UCHAR Lun : 3;
320 UCHAR PageCode : 6;
321 UCHAR Pc : 2;
326
327 struct _MODE_SENSE10 {
329 UCHAR Reserved1 : 3;
330 UCHAR Dbd : 1;
331 UCHAR Reserved2 : 1;
332 UCHAR Lun : 3;
333 UCHAR PageCode : 6;
334 UCHAR Pc : 2;
335 UCHAR Reserved3[4];
339
340 // Mode select
341 struct _MODE_SELECT {
343 UCHAR SPBit : 1;
344 UCHAR Reserved1 : 3;
345 UCHAR PFBit : 1;
346 UCHAR Lun : 3;
347 UCHAR Reserved2[2];
351
352 struct _MODE_SELECT10 {
354 UCHAR SPBit : 1;
355 UCHAR Reserved1 : 3;
356 UCHAR PFBit : 1;
357 UCHAR Lun : 3;
358 UCHAR Reserved2[5];
362
363 struct _LOGSENSE {
365 UCHAR SPBit : 1;
366 UCHAR PPCBit : 1;
367 UCHAR Reserved1 : 3;
368 UCHAR Lun : 3;
369 UCHAR PageCode : 6;
370 UCHAR PCBit : 2;
373 UCHAR ParameterPointer[2]; // [0]=MSB, [1]=LSB
374 UCHAR AllocationLength[2]; // [0]=MSB, [1]=LSB
377
378 struct _SEEK {
380 UCHAR Reserved1 : 5;
381 UCHAR Lun : 3;
382 UCHAR LBA[4];
383 UCHAR Reserved2[3];
385 } SEEK, *PSEEK;
386
387#define StartStop_Start 0x01
388#define StartStop_Load 0x02
389
390 struct _START_STOP {
392 UCHAR Immediate: 1;
393 UCHAR Reserved1 : 4;
394 UCHAR Lun : 3;
398 UCHAR Start : 1;
399 UCHAR LoadEject : 1;
401 UCHAR Reserved3 : 1;
405
406#define StartStop_Power_NoChg 0x00
407#define StartStop_Power_Idle 0x02
408#define StartStop_Power_Standby 0x03
409#define StartStop_Power_Sleep 0x05
410
411 struct _MEDIA_REMOVAL {
413 UCHAR Reserved1 : 5;
414 UCHAR Lun : 3;
415 UCHAR Reserved2[2];
419
420 struct _READ_FORMAT_CAPACITIES {
422 union {
423 UCHAR Flags;
424 struct {
425 UCHAR Reserved0 : 5;
426 UCHAR Reserved1 : 3;
429 UCHAR Reserved0[5];
433
434 // Atapi 2.5 Changer 12-byte CDBs
435#define LoadUnload_Start 0x01
436#define LoadUnload_Load 0x02
437
438 struct _LOAD_UNLOAD {
440 UCHAR Immediate : 1;
441 UCHAR Reserved1 : 7;
442 UCHAR Reserved2[2];
443 UCHAR Start : 1;
444 UCHAR LoadEject : 1;
445 UCHAR Reserved3: 6;
446 UCHAR Reserved4[3];
447 UCHAR Slot;
448 UCHAR Reserved5[3];
450
451 struct _MECH_STATUS {
453 UCHAR Reserved0[7];
455 UCHAR Reserved2[2];
457
458 struct _LOCK_DOOR {
460 UCHAR Reserved0[9];
462
463#define EventStat_Immed 0x01
464
465#define EventStat_Class_OpChange 0x02
466#define EventStat_Class_PM 0x04
467#define EventStat_Class_ExternalReq 0x08
468#define EventStat_Class_Media 0x10
469#define EventStat_Class_MultiInit 0x20
470#define EventStat_Class_DevBusy 0x40
471
472 struct _GET_EVENT_STATUS {
474 union {
475 UCHAR Flags;
476 struct {
477 UCHAR Immed : 1;
478 UCHAR Reserved0 : 7;
481 UCHAR Reserved0[2];
483 UCHAR Reserved1[2];
487
488 struct _READ_DISC_INFO {
490 UCHAR Reserved0[6];
492 UCHAR Reserved2[3];
494
495#define ReadTrackInfo_Type_Mask 0x01
496#define ReadTrackInfo_Type_LBA 0x00
497#define ReadTrackInfo_Type_Track 0x01
498
499#define ReadTrackInfo_LastTrk 0xff
500
501 struct _READ_TRACK_INFO {
503 UCHAR Track : 1;
504 UCHAR Reserved0 : 7;
505 UCHAR LBA_TrkNum [4];
508 UCHAR Reserved2[3];
510
511#define ReadTrackInfo3_Type_Mask 0x03
512#define ReadTrackInfo3_Type_LBA ReadTrackInfo_Type_LBA
513#define ReadTrackInfo3_Type_Track ReadTrackInfo_Type_Track
514#define ReadTrackInfo3_Type_Ses 0x02
515
516#define ReadTrackInfo3_LastTrk ReadTrackInfo_LastTrk
517#define ReadTrackInfo3_DiscLeadIn 0x00 // for Track type
518
519 struct _READ_TRACK_INFO_3 {
521 UCHAR DataType : 2;
522 UCHAR Reserved0 : 6;
523 UCHAR LBA_TrkNum [4];
526 UCHAR Reserved2[3];
528
529 struct _RESERVE_TRACK {
531 UCHAR Reserved0[4];
535
536#define CloseTrkSes_Immed 0x01
537
538#define CloseTrkSes_Trk 0x01
539#define CloseTrkSes_Ses 0x02
540
541#define CloseTrkSes_LastTrkSes 0xff
542
543#define CloseTrkSes_Delay DEF_I64(3100000000) // 310 s
544
545 struct _CLOSE_TRACK_SESSION {
547 union {
548 UCHAR Flags;
549 struct {
550 UCHAR Immed : 1;
551 UCHAR Reserved0 : 7;
554 union {
555 UCHAR Flags;
556 struct {
557 UCHAR Track : 1;
558 UCHAR Session : 1;
559 UCHAR Reserved0 : 6;
562 UCHAR Reserved1 [2];
564 UCHAR Reserved2 [6];
565
567
568 struct _SET_CD_SPEED {
571 UCHAR ReadSpeed [2]; // Kbyte/sec
572 UCHAR WriteSpeed [2]; // Kbyte/sec
573 UCHAR Reserved1[6];
575
576#define SyncCache_RELADR 0x01
577#define SyncCache_Immed 0x02
578
579 struct _SYNCHRONIZE_CACHE {
581 union {
582 UCHAR Flags;
583 struct {
584 UCHAR RELADR : 1;
585 UCHAR Immed : 1;
586 UCHAR Reserved0 : 6; // All these are unused by drive
589 UCHAR LBA [4];
591 UCHAR NumOfBlocks [2];
592 UCHAR Reserved2 [3];
593/*
594 UCHAR Unused [11];*/
596
597#define BlankMedia_Mask 0x07
598#define BlankMedia_Complete 0x00
599#define BlankMedia_Minimal 0x01
600#define BlankMedia_Track 0x02
601#define BlankMedia_UnreserveTrack 0x03
602#define BlankMedia_TrackTail 0x04
603#define BlankMedia_UncloseLastSes 0x05
604#define BlankMedia_EraseSes 0x06
605#define BlankMedia_Immed 0x10
606
607 struct _BLANK_MEDIA {
609 union {
610 UCHAR Flags;
611 struct {
612 UCHAR BlankType : 3;
613 UCHAR Reserved0 : 1;
614 UCHAR Immed : 1;
615 UCHAR Reserved1 : 3;
619 UCHAR Reserved2 [6];
621
622#define SendKey_ReportAGID 0x00
623#define SendKey_ChallengeKey 0x01
624#define SendKey_Key1 0x02
625#define SendKey_Key2 0x03
626#define SendKey_TitleKey 0x04
627#define SendKey_ReportASF 0x05
628#define SendKey_InvalidateAGID 0x3F
629
630 struct _SEND_KEY {
632 UCHAR Reserved1 : 5;
633 UCHAR Lun : 3;
634 UCHAR Reserved2[6];
636 UCHAR KeyFormat : 6;
637 UCHAR AGID : 2;
640
641 struct _REPORT_KEY {
642 UCHAR OperationCode; // 0xA4
643 UCHAR Reserved1 : 5;
644 UCHAR Lun : 3;
645 UCHAR LBA[4]; // for title key
646 UCHAR Reserved2[2];
648 UCHAR KeyFormat : 6;
649 UCHAR AGID : 2;
652
653 struct _READ_DVD_STRUCTURE {
654 UCHAR OperationCode; // 0xAD
655 UCHAR Reserved1 : 5;
660 UCHAR AllocationLength[2]; // [0]=MSB, [1]=LSB
661 UCHAR Reserved3 : 6;
662 UCHAR AGID : 2;
665
666 struct _READ_BUFFER_CAPACITY {
668 UCHAR Reserved0 [6];
670 UCHAR Reserved1 [3];
672
673 struct _GET_CONFIGURATION {
675 union {
676 UCHAR Flags;
677 struct {
678 UCHAR RT : 2;
679 UCHAR Reserved0 : 6;
683 UCHAR Reserved0 [3];
687
688 struct _SET_READ_AHEAD {
691 UCHAR TriggerLBA[4];
696
698 UCHAR OperationCode; // 0xA0 - SCSIOP_REPORT_LUNS
704
705#define SendOpc_DoOpc 0x01
706
707 struct _SEND_OPC_INFO {
709 union {
710 UCHAR Flags;
711 struct {
712 UCHAR DoOpc : 1;
713 UCHAR Reserved0 : 4;
714 UCHAR Reserved1 : 3;
717 UCHAR Reserved0 [5];
721
722 struct _SEND_CUE_SHEET {
724 UCHAR Reserved0 [5];
728
729 struct _CDB12 {
731 UCHAR Params[11];
732 } CDB12, *PCDB12;
733
734 struct _CDB12READWRITE {
736 union {
737 UCHAR Flags;
738 struct {
739 UCHAR RELADR : 1;
740 UCHAR Reserved0 : 2;
741 UCHAR FUA : 1;
742 UCHAR DPO : 1;
743 UCHAR Reserved1 : 3;
746 UCHAR LBA [4];
747 UCHAR NumOfBlocks [4];
748 UCHAR Reserved1[2];
750
753 union {
755 struct {
767 UCHAR Restricted:1; // MMC-4
768 UCHAR Reserved1[1];
770
771 // Plextor Read CD-DA
772 struct _PLXTR_READ_CDDA {
774 UCHAR Reserved0 : 5;
775 UCHAR Lun :3;
776 UCHAR LBA[4];
781
782 // NEC Read CD-DA
783 struct _NEC_READ_CDDA {
786 UCHAR LBA[4];
791
793
794// Command Descriptor Block constants.
795
796#define CDB6GENERIC_LENGTH 6
797#define CDB10GENERIC_LENGTH 10
798#define CDB12GENERIC_LENGTH 12
799
800#define MAXIMUM_NUMBER_OF_TRACKS 100
801#define MAXIMUM_NUMBER_OF_SESSIONS 1024 //maximal number of entries in Read Full TOC
802
803#define SETBITON 1
804#define SETBITOFF 0
805
806// Mode Sense/Select page constants.
807
808#define MODE_PAGE_ERROR_RECOVERY 0x01
809#define MODE_PAGE_WRITE_PARAMS 0x05
810#define MODE_PAGE_VERIFY_ERROR 0x07 // shall not be used
811#define MODE_PAGE_CACHING 0x08 // undocumented, but used by DirectCd
812#define MODE_PAGE_MEDIUM_TYPES 0x0B // shall not be used
813#define MODE_PAGE_CD_DEVICE_PARAMS 0x0D
814#define MODE_PAGE_CD_AUDIO_CONTROL 0x0E
815#define MODE_PAGE_POWER_CONDITION 0x1A
816#define MODE_PAGE_FAIL_REPORT 0x1C
817#define MODE_PAGE_TIMEOUT_AND_PROTECT 0x1D
818#define MODE_PAGE_PHILIPS_SECTOR_TYPE 0x21
819#define MODE_PAGE_CAPABILITIES 0x2A
820
821#define MODE_SENSE_RETURN_ALL 0x3f
822
823#define MODE_SENSE_CURRENT_VALUES 0x00
824#define MODE_SENSE_CHANGEABLE_VALUES 0x40
825#define MODE_SENSE_DEFAULT_VAULES 0x80
826#define MODE_SENSE_SAVED_VALUES 0xc0
827
828// SCSI CDB operation codes
829
830#define SCSIOP_TEST_UNIT_READY 0x00
831#define SCSIOP_REZERO_UNIT 0x01
832#define SCSIOP_REWIND 0x01
833#define SCSIOP_REQUEST_BLOCK_ADDR 0x02
834#define SCSIOP_REQUEST_SENSE 0x03
835#define SCSIOP_FORMAT_UNIT 0x04
836#define SCSIOP_READ_BLOCK_LIMITS 0x05
837#define SCSIOP_REASSIGN_BLOCKS 0x07
838#define SCSIOP_READ6 0x08
839#define SCSIOP_RECEIVE 0x08
840#define SCSIOP_WRITE6 0x0A
841#define SCSIOP_PRINT 0x0A
842#define SCSIOP_SEND 0x0A
843#define SCSIOP_SEEK6 0x0B
844#define SCSIOP_TRACK_SELECT 0x0B
845#define SCSIOP_SLEW_PRINT 0x0B
846#define SCSIOP_SEEK_BLOCK 0x0C
847#define SCSIOP_PARTITION 0x0D
848#define SCSIOP_READ_REVERSE 0x0F
849#define SCSIOP_WRITE_FILEMARKS 0x10
850#define SCSIOP_FLUSH_BUFFER 0x10
851#define SCSIOP_SPACE 0x11
852#define SCSIOP_INQUIRY 0x12
853#define SCSIOP_VERIFY6 0x13
854#define SCSIOP_RECOVER_BUF_DATA 0x14
855#define SCSIOP_MODE_SELECT 0x15
856#define SCSIOP_RESERVE_UNIT 0x16
857#define SCSIOP_RELEASE_UNIT 0x17
858#define SCSIOP_COPY 0x18
859#define SCSIOP_ERASE 0x19
860#define SCSIOP_MODE_SENSE 0x1A
861#define SCSIOP_START_STOP_UNIT 0x1B
862#define SCSIOP_STOP_PRINT 0x1B
863#define SCSIOP_LOAD_UNLOAD 0x1B
864#define SCSIOP_RECEIVE_DIAGNOSTIC 0x1C
865#define SCSIOP_SEND_DIAGNOSTIC 0x1D
866#define SCSIOP_MEDIUM_REMOVAL 0x1E
867#define SCSIOP_READ_FORMAT_CAPACITY 0x23
868#define SCSIOP_READ_CAPACITY 0x25
869#define SCSIOP_READ 0x28
870#define SCSIOP_WRITE 0x2A
871#define SCSIOP_WRITE_CD 0x2A
872#define SCSIOP_SEEK 0x2B
873#define SCSIOP_LOCATE 0x2B
874#define SCSIOP_ERASE10 0x2C
875#define SCSIOP_WRITE_VERIFY 0x2E
876#define SCSIOP_VERIFY 0x2F
877#define SCSIOP_SEARCH_DATA_HIGH 0x30
878#define SCSIOP_SEARCH_DATA_EQUAL 0x31
879#define SCSIOP_SEARCH_DATA_LOW 0x32
880#define SCSIOP_SET_LIMITS 0x33
881#define SCSIOP_READ_POSITION 0x34
882#define SCSIOP_SYNCHRONIZE_CACHE 0x35
883#define SCSIOP_COMPARE 0x39
884#define SCSIOP_COPY_COMPARE 0x3A
885#define SCSIOP_COPY_VERIFY 0x3A
886#define SCSIOP_WRITE_DATA_BUFF 0x3B
887#define SCSIOP_READ_DATA_BUFF 0x3C
888#define SCSIOP_CHANGE_DEFINITION 0x40
889#define SCSIOP_PLAY_AUDIO10 0x41
890#define SCSIOP_READ_SUB_CHANNEL 0x42
891#define SCSIOP_READ_TOC 0x43
892#define SCSIOP_READ_HEADER 0x44
893#define SCSIOP_PLAY_AUDIO 0x45
894#define SCSIOP_GET_CONFIGURATION 0x46
895#define SCSIOP_PLAY_AUDIO_MSF 0x47
896#define SCSIOP_PLAY_TRACK_INDEX 0x48
897#define SCSIOP_PLAY_TRACK_RELATIVE 0x49
898#define SCSIOP_GET_EVENT_STATUS 0x4A
899#define SCSIOP_PAUSE_RESUME 0x4B
900#define SCSIOP_LOG_SELECT 0x4C
901#define SCSIOP_LOG_SENSE 0x4D
902#define SCSIOP_STOP_PLAY_SCAN 0x4E
903#define SCSIOP_READ_DISC_INFO 0x51
904#define SCSIOP_READ_TRACK_INFO 0x52
905#define SCSIOP_RESERVE_TRACK 0x53
906#define SCSIOP_SEND_OPC_INFO 0x54
907#define SCSIOP_MODE_SELECT10 0x55
908#define SCSIOP_REPAIR_TRACK 0x58 // obsolete
909#define SCSIOP_READ_MASTER_CUE 0x59
910#define SCSIOP_MODE_SENSE10 0x5A
911#define SCSIOP_CLOSE_TRACK_SESSION 0x5B
912#define SCSIOP_READ_BUFFER_CAPACITY 0x5C
913#define SCSIOP_SEND_CUE_SHEET 0x5D
914#define SCSIOP_READ16 0x88
915#define SCSIOP_WRITE16 0x8A
916#define SCSIOP_VERIFY16 0x8F
917#define SCSIOP_SERVICE_ACTION16 0x9E
918
919 #define SCSIOP_SA_READ_CAPACITY16 0x10
920
921#define SCSIOP_REPORT_LUNS 0xA0
922#define SCSIOP_BLANK 0xA1
923#define SCSIOP_SEND_KEY 0xA3
924#define SCSIOP_REPORT_KEY 0xA4
925#define SCSIOP_PLAY_AUDIO12 0xA5
926#define SCSIOP_LOAD_UNLOAD_SLOT 0xA6
927#define SCSIOP_SET_READ_AHEAD 0xA7
928#define SCSIOP_READ12 0xA8
929#define SCSIOP_WRITE12 0xAA
930#define SCSIOP_VERIFY12 0xAF
931#define SCSIOP_SEEK12 0xAB
932#define SCSIOP_GET_PERFORMANCE 0xAC
933#define SCSIOP_READ_DVD_STRUCTURE 0xAD
934#define SCSIOP_WRITE_VERIFY12 0xAE
935#define SCSIOP_VERIFY12 0xAF
936#define SCSIOP_SET_STREAMING 0xB6
937#define SCSIOP_READ_CD_MSF 0xB9
938#define SCSIOP_SET_CD_SPEED 0xBB
939#define SCSIOP_MECHANISM_STATUS 0xBD
940#define SCSIOP_READ_CD 0xBE
941#define SCSIOP_SEND_DVD_STRUCTURE 0xBF
942#define SCSIOP_DOORLOCK 0xDE // lock door on removable drives
943#define SCSIOP_DOORUNLOCK 0xDF // unlock door on removable drives
944
945// If the IMMED bit is 1, status is returned as soon
946// as the operation is initiated. If the IMMED bit
947// is 0, status is not returned until the operation
948// is completed.
949
950#define CDB_RETURN_ON_COMPLETION 0
951#define CDB_RETURN_IMMEDIATE 1
952
953// end_ntminitape
954
955// CDB Force media access used in extended read and write commands.
956
957#define CDB_FORCE_MEDIA_ACCESS 0x08
958
959// Denon CD ROM operation codes
960
961#define SCSIOP_DENON_EJECT_DISC 0xE6
962#define SCSIOP_DENON_STOP_AUDIO 0xE7
963#define SCSIOP_DENON_PLAY_AUDIO 0xE8
964#define SCSIOP_DENON_READ_TOC 0xE9
965#define SCSIOP_DENON_READ_SUBCODE 0xEB
966
967// Philips/Matshushita CD-R(W) operation codes
968
969#define SCSIOP_PHILIPS_GET_NWA 0xE2
970#define SCSIOP_PHILIPS_RESERVE_TRACK 0xE4
971#define SCSIOP_PHILIPS_WRITE_TRACK 0xE6
972#define SCSIOP_PHILIPS_LOAD_UNLOAD 0xE7
973#define SCSIOP_PHILIPS_CLOSE_TRACK_SESSION 0xE9
974#define SCSIOP_PHILIPS_RECOVER_BUF_DATA 0xEC
975#define SCSIOP_PHILIPS_READ_SESSION_INFO 0xEE
976
977// Plextor operation codes
978
979#define SCSIOP_PLEXTOR_READ_CDDA 0xD8
980
981// NEC operation codes
982
983#define SCSIOP_NEC_READ_CDDA 0xD4
984
985// SCSI Bus Messages
986
987#define SCSIMESS_ABORT 0x06
988#define SCSIMESS_ABORT_WITH_TAG 0x0D
989#define SCSIMESS_BUS_DEVICE_RESET 0X0C
990#define SCSIMESS_CLEAR_QUEUE 0X0E
991#define SCSIMESS_COMMAND_COMPLETE 0X00
992#define SCSIMESS_DISCONNECT 0X04
993#define SCSIMESS_EXTENDED_MESSAGE 0X01
994#define SCSIMESS_IDENTIFY 0X80
995#define SCSIMESS_IDENTIFY_WITH_DISCON 0XC0
996#define SCSIMESS_IGNORE_WIDE_RESIDUE 0X23
997#define SCSIMESS_INITIATE_RECOVERY 0X0F
998#define SCSIMESS_INIT_DETECTED_ERROR 0X05
999#define SCSIMESS_LINK_CMD_COMP 0X0A
1000#define SCSIMESS_LINK_CMD_COMP_W_FLAG 0X0B
1001#define SCSIMESS_MESS_PARITY_ERROR 0X09
1002#define SCSIMESS_MESSAGE_REJECT 0X07
1003#define SCSIMESS_NO_OPERATION 0X08
1004#define SCSIMESS_HEAD_OF_QUEUE_TAG 0X21
1005#define SCSIMESS_ORDERED_QUEUE_TAG 0X22
1006#define SCSIMESS_SIMPLE_QUEUE_TAG 0X20
1007#define SCSIMESS_RELEASE_RECOVERY 0X10
1008#define SCSIMESS_RESTORE_POINTERS 0X03
1009#define SCSIMESS_SAVE_DATA_POINTER 0X02
1010#define SCSIMESS_TERMINATE_IO_PROCESS 0X11
1011
1012// SCSI Extended Message operation codes
1013
1014#define SCSIMESS_MODIFY_DATA_POINTER 0X00
1015#define SCSIMESS_SYNCHRONOUS_DATA_REQ 0X01
1016#define SCSIMESS_WIDE_DATA_REQUEST 0X03
1017
1018// SCSI Extended Message Lengths
1019
1020#define SCSIMESS_MODIFY_DATA_LENGTH 5
1021#define SCSIMESS_SYNCH_DATA_LENGTH 3
1022#define SCSIMESS_WIDE_DATA_LENGTH 2
1023
1024// SCSI extended message structure
1025
1026typedef struct _SCSI_EXTENDED_MESSAGE {
1030 union _EXTENDED_ARGUMENTS {
1031
1032 struct {
1033 UCHAR Modifier[4];
1035
1036 struct {
1040
1041 struct{
1042 UCHAR Width;
1046
1047// SCSI bus status codes.
1048
1049#define SCSISTAT_GOOD 0x00
1050#define SCSISTAT_CHECK_CONDITION 0x02
1051#define SCSISTAT_CONDITION_MET 0x04
1052#define SCSISTAT_BUSY 0x08
1053#define SCSISTAT_INTERMEDIATE 0x10
1054#define SCSISTAT_INTERMEDIATE_COND_MET 0x14
1055#define SCSISTAT_RESERVATION_CONFLICT 0x18
1056#define SCSISTAT_COMMAND_TERMINATED 0x22
1057#define SCSISTAT_QUEUE_FULL 0x28
1058
1059// Enable Vital Product Data Flag (EVPD)
1060// used with INQUIRY command.
1061
1062#define CDB_INQUIRY_EVPD 0x01
1063
1064// retry time (in deci-seconds)
1065#define NOT_READY_RETRY_INTERVAL 20
1066
1067// Defines for format CDB
1068#define LUN0_FORMAT_SAVING_DEFECT_LIST 0
1069#define USE_DEFAULTMSB 0
1070#define USE_DEFAULTLSB 0
1071
1072#define START_UNIT_CODE 0x01
1073#define STOP_UNIT_CODE 0x00
1074
1075// Inquiry buffer structure. This is the data returned from the target
1076// after it receives an inquiry.
1077//
1078// This structure may be extended by the number of bytes specified
1079// in the field AdditionalLength. The defined size constant only
1080// includes fields through ProductRevisionLevel.
1081//
1082// The NT SCSI drivers are only interested in the first 36 bytes of data.
1083
1084#define INQUIRYDATABUFFERSIZE 36
1085
1086typedef struct _INQUIRYDATA {
1087 UCHAR DeviceType : 5;
1094 UCHAR Reserved[2];
1095 UCHAR SoftReset : 1;
1096 UCHAR CommandQueue : 1;
1097 UCHAR Reserved2 : 1;
1099 UCHAR Synchronous : 1;
1100 UCHAR Wide16Bit : 1;
1101 UCHAR Wide32Bit : 1;
1103 union {
1105 struct {
1106 UCHAR VendorId[8];
1107 UCHAR ProductId[16];
1109 };
1110 };
1112 UCHAR Reserved3[40];
1114
1115// Inquiry defines. Used to interpret data returned from target as result
1116// of inquiry command.
1117
1118// DeviceType field
1119
1120#define DIRECT_ACCESS_DEVICE 0x00 // disks
1121#define SEQUENTIAL_ACCESS_DEVICE 0x01 // tapes
1122#define PRINTER_DEVICE 0x02 // printers
1123#define PROCESSOR_DEVICE 0x03 // scanners, printers, etc
1124#define WRITE_ONCE_READ_MULTIPLE_DEVICE 0x04 // worms
1125#define READ_ONLY_DIRECT_ACCESS_DEVICE 0x05 // cdroms
1126#define SCANNER_DEVICE 0x06 // scanners
1127#define OPTICAL_DEVICE 0x07 // optical disks
1128#define MEDIUM_CHANGER 0x08 // jukebox
1129#define COMMUNICATION_DEVICE 0x09 // network
1130#define LOGICAL_UNIT_NOT_PRESENT_DEVICE 0x7F
1131#define DEVICE_QUALIFIER_NOT_SUPPORTED 0x03
1132
1133// DeviceTypeQualifier field
1134
1135#define DEVICE_CONNECTED 0x00
1136
1137// Sense Data Format
1138
1139typedef struct _SENSE_DATA {
1140 UCHAR ErrorCode:7;
1141 UCHAR Valid:1;
1143 UCHAR SenseKey:4;
1144 UCHAR Reserved:1;
1146 UCHAR EndOfMedia:1;
1147 UCHAR FileMark:1;
1148 UCHAR Information[4];
1156
1157// Default request sense buffer size
1158
1159#define SENSE_BUFFER_SIZE 18
1160
1161// Sense keys
1162
1163#define SCSI_SENSE_NO_SENSE 0x00
1164#define SCSI_SENSE_RECOVERED_ERROR 0x01
1165#define SCSI_SENSE_NOT_READY 0x02
1166#define SCSI_SENSE_MEDIUM_ERROR 0x03
1167#define SCSI_SENSE_HARDWARE_ERROR 0x04
1168#define SCSI_SENSE_ILLEGAL_REQUEST 0x05
1169#define SCSI_SENSE_UNIT_ATTENTION 0x06
1170#define SCSI_SENSE_DATA_PROTECT 0x07
1171#define SCSI_SENSE_BLANK_CHECK 0x08
1172#define SCSI_SENSE_UNIQUE 0x09
1173#define SCSI_SENSE_COPY_ABORTED 0x0A
1174#define SCSI_SENSE_ABORTED_COMMAND 0x0B
1175#define SCSI_SENSE_EQUAL 0x0C
1176#define SCSI_SENSE_VOL_OVERFLOW 0x0D
1177#define SCSI_SENSE_MISCOMPARE 0x0E
1178#define SCSI_SENSE_RESERVED 0x0F
1179
1180// Additional Sense codes
1181
1182// SK = 0x00
1183#define SCSI_ADSENSE_NO_SENSE 0x00
1184
1185// SK = 0x01
1186#define SCSI_ADSENSE_WARNING 0x0B
1187#define SCSI_ADSENSE_REC_DATA_NOECC 0x17
1188#define SCSI_ADSENSE_REC_DATA_ECC 0x18
1189#define SCSI_ADSENSE_ROUNDED_PARAM 0x37
1190#define SCSI_ADSENSE_FAILURE_PREDICTED 0x5D
1191#define SCSI_ADSENSE_CD_CONTROL_ERR 0x73
1192
1193// SK = 0x02
1194#define SCSI_ADSENSE_LUN_NOT_READY 0x04
1195#define SCSI_ADSENSE_INCOMPATIBLE_MEDIA 0x30
1196#define SCSI_ADSENSE_INVALID_MEDIA SCSI_ADSENSE_INCOMPATIBLE_MEDIA // for w2k
1197#define SCSI_ADSENSE_NO_MEDIA_IN_DEVICE 0x3A
1198#define SCSI_ADSENSE_POSITION_ERROR 0x3B
1199#define SCSI_ADSENSE_NOT_SELF_CONFIGURED 0x3E
1200
1201
1202// SK = 0x03
1203#define SCSI_ADSENSE_NO_SEEK 0x02
1204#define SCSI_ADSENSE_NO_REFERENCE 0x06
1205#define SCSI_ADSENSE_CD_WRITE_ERROR 0x0C
1206#define SCSI_ADSENSE_CD_READ_ERROR 0x11
1207#define SCSI_ADSENSE_TRACK_ERROR 0x14
1208#define SCSI_ADSENSE_SEEK_ERROR 0x15
1209#define SCSI_ADSENSE_FORMAT_CORRUPTED 0x31
1210#define SCSI_ADSENSE_ENCLOSURE_FAILURE 0x34
1211#define SCSI_ADSENSE_ENCLOSURE_SERVICE 0x35
1212#define SCSI_ADSENSE_ERASE_ERROR 0x51
1213#define SCSI_ADSENSE_UNRECOVERED_TOC 0x57
1214#define SCSI_ADSENSE_SESSION_FIXATION 0x71
1215//#define SCSI_ADSENSE_CD_CONTROL_ERR 0x73 // redefinition
1216
1217// SK = 0x04
1218#define SCSI_ADSENSE_CLEAN_REQUEST 0x00
1219#define SCSI_ADSENSE_SELECT 0x04
1220#define SCSI_ADSENSE_COMMUNICATION 0x08
1221#define SCSI_ADSENSE_LOST_STREAMING 0x09
1222#define SCSI_ADSENSE_SYNC_ERROR 0x1B
1223#define SCSI_ADSENSE_MECH_ERROR 0x3B
1224#define SCSI_ADSENSE_LUN_ERROR 0x3E
1225#define SCSI_ADSENSE_DIAGNOSTIC 0x40
1226#define SCSI_ADSENSE_INTERNAL 0x44
1227#define SCSI_ADSENSE_SOFT_RESET 0x46
1228#define SCSI_ADSENSE_SCSI_PARITY 0x47
1229#define SCSI_ADSENSE_CMD_PHASE 0x4A
1230#define SCSI_ADSENSE_DATA_PHASE 0x4B
1231#define SCSI_ADSENSE_SELF_CONFIG 0x4C
1232#define SCSI_ADSENSE_MEDIUM_REMOVAL 0x53
1233#define SCSI_ADSENSE_VOLTAGE 0x65
1234
1235// SK = 0x05
1236#define SCSI_ADSENSE_AUDIO_PLAY 0x00
1237#define SCSI_ADSENSE_MULTISELECT 0x07
1238#define SCSI_ADSENSE_INVALID_PARAM_LENGTH 0x1A
1239#define SCSI_ADSENSE_ILLEGAL_COMMAND 0x20
1240#define SCSI_ADSENSE_ILLEGAL_BLOCK 0x21
1241#define SCSI_ADSENSE_INVALID_CDB 0x24
1242#define SCSI_ADSENSE_INVALID_LUN 0x25
1243#define SCSI_ADSENSE_INVALID_VALUE 0x26
1244#define SCSI_ADSENSE_WRITE_PROTECT 0x27
1245#define SCSI_ADSENSE_CANT_DISCONNECT 0x2B
1246#define SCSI_ADSENSE_INVALID_CMD_SEQUENCE 0x2C
1247#define SCSI_ADSENSE_INVALID_SESSION_MODE 0x30
1248#define SCSI_ADSENSE_SAVE_NOT_SUPPORTED 0x35
1249#define SCSI_ADSENSE_INVALID_BITS_IN_IDENT_MSG 0x3D
1250#define SCSI_ADSENSE_MSG_ERROR 0x43
1251//#define SCSI_ADSENSE_MEDIUM_REMOVAL 0x53 // redefinition
1252#define SCSI_ADSENSE_SYS_RESOURCE_FAILURE 0x55
1253#define SCSI_ADSENSE_OUT_OF_SPACE 0x63
1254#define SCSI_ADSENSE_ILLEGAL_MODE_FOR_THIS_TRACK 0x64
1255#define SCSI_ADSENSE_CD_COPY_ERROR 0x6F
1256#define SCSI_ADSENSE_INCOMPLETE_DATA 0x72
1257#define SCSI_ADSENSE_VENDOR_UNIQUE 0x80
1258#define SCSI_ADSENSE_MUSIC_AREA 0xA0
1259#define SCSI_ADSENSE_DATA_AREA 0xA1
1260#define SCSI_ADSENSE_VOLUME_OVERFLOW 0xA7
1261
1262// SK = 0x06
1263#define SCSI_ADSENSE_LOG_OVERFLOW 0x0A
1264#define SCSI_ADSENSE_MEDIUM_CHANGED 0x28
1265#define SCSI_ADSENSE_BUS_RESET 0x29
1266#define SCSI_ADSENSE_PARAM_CHANGE 0x2A
1267#define SCSI_ADSENSE_CMD_CLEARED_BY_ANOTHER 0x2F
1268#define SCSI_ADSENSE_MEDIA_STATE 0x3B
1269#define SCSI_ADSENSE_FUNCTIONALTY_CHANGE 0x3F
1270#define SCSI_ADSENSE_OPERATOR 0x5A
1271#define SCSI_ADSENSE_MAX_LOG 0x5B
1272#define SCSI_ADSENSE_POWER 0x5E
1273
1274// SK = 0x0B
1275#define SCSI_ADSENSE_READ_LOST_STREAMING 0x11
1276#define SCSI_ADSENSE_RESELECT_FAILURE 0x45
1277#define SCSI_ADSENSE_ERR_MSG_DETECTED 0x48
1278#define SCSI_ADSENSE_INVALID_ERR_MSG 0x49
1279#define SCSI_ADSENSE_TEGGED_OVERLAPPED 0x4D
1280#define SCSI_ADSENSE_OVERLAPPED_ATTEMPT 0x4E
1281
1282// Additional sense code qualifier
1283
1284#define SCSI_SENSEQ_NO_SENSE 0x00
1285
1286// SK:ASC = 02:04
1287//#define SCSI_SENSEQ_NO_SENSE 0x00
1288#define SCSI_SENSEQ_CAUSE_NOT_REPORTABLE 0x00
1289#define SCSI_SENSEQ_BECOMING_READY 0x01
1290#define SCSI_SENSEQ_INIT_COMMAND_REQUIRED 0x02
1291#define SCSI_SENSEQ_MANUAL_INTERVENTION_REQUIRED 0x03
1292#define SCSI_SENSEQ_FORMAT_IN_PROGRESS 0x04
1293#define SCSI_SENSEQ_OPERATION_IN_PROGRESS 0x07
1294#define SCSI_SENSEQ_LONG_WRITE_IN_PROGRESS 0x08
1295
1296// SK:ASC = 02:30
1297#define SCSI_SENSEQ_INCOMPATIBLE_MEDIA_INSTALLED 0x00
1298#define SCSI_SENSEQ_UNKNOWN_FORMAT 0x01
1299#define SCSI_SENSEQ_INCOMPATIBLE_FORMAT 0x02
1300#define SCSI_SENSEQ_CLEANING_CARTRIDGE_INSTALLED 0x03
1301#define SCSI_SENSEQ_WRITE_UNKNOWN_FORMAT 0x04
1302#define SCSI_SENSEQ_WRITE_INCOMPATIBLE_FORMAT 0x05
1303#define SCSI_SENSEQ_FORMAT_INCOMPATIBLE_MEDIUM 0x06
1304#define SCSI_SENSEQ_CLEANING_FAILURE 0x07
1305
1306// SK:ASC = 02:3A
1307#define SCSI_SENSEQ_TRAY_CLOSED 0x01
1308#define SCSI_SENSEQ_TRAY_OPEN 0x02
1309
1310// SK:ASC = 03:0C
1311#define SENSEQ_W_RECOVERY_NEEDED 0x07
1312#define SENSEQ_W_RECOVERY_FAILED 0x08
1313#define SENSEQ_LOST_STREAMING 0x09
1314#define SENSEQ_PADDING_BLOCKS_ADDED 0x0A
1315
1316// SK:ASC = 03:72
1317//#define SCSI_SENSEQ_NO_SENSE 0x00
1318#define SCSI_SENSEQ_LEAD_IN_ERROR 0x01
1319#define SCSI_SENSEQ_LEAD_OUT_ERRROR 0x02
1320#define SCSI_SENSEQ_INCOMPLETE_TRACK 0x03
1321#define SCSI_SENSEQ_INCOMPLETE_RESERVED_TRACK 0x04
1322#define SCSI_SENSEQ_NO_MORE_RESERVATION 0x05
1323
1324// SK:ASC = 05:26
1325#define SCSI_SENSEQ_PARAM_NOT_SUPPORTED 0x01
1326#define SCSI_SENSEQ_PARAM_INVALID_VALUE 0x02
1327#define SCSI_SENSEQ_THRESHOLD_PARAM_NOT_SUPPORTED 0x03
1328#define SCSI_SENSEQ_INVALID_RELEASE_OF_PERSISTENT_RESERVATION 0x04
1329
1330// SK:ASC = 05:27
1331#define SCSI_SENSEQ_HW_PROTECTION 0x01
1332#define SCSI_SENSEQ_LUN_SOFT_PROTECTION 0x02
1333#define SCSI_SENSEQ_ASSOCIATED_PROTECTION 0x03
1334#define SCSI_SENSEQ_PERSIST_PROTECTION 0x04
1335#define SCSI_SENSEQ_PERMANENT_PROTECTION 0x05
1336
1337// SK:ASC = 05:2C
1338#define SCSI_SENSEQ_PROGRAMM_AREA_NOT_EMPTY 0x03
1339#define SCSI_SENSEQ_PROGRAMM_AREA_EMPTY 0x04
1340
1341// SK:ASC = 05:30
1342#define SCSI_SENSEQ_APP_CODE_MISSMATCH 0x08
1343#define SCSI_SENSEQ_NOT_FIXED_FOR_APPEND 0x09
1344
1345// SK:ASC = 05:6F
1346#define SCSI_SENSEQ_AUTHENTICATION_FAILURE 0x00
1347#define SCSI_SENSEQ_KEY_NOT_PRESENT 0x01
1348#define SCSI_SENSEQ_KEY_NOT_ESTABLISHED 0x02
1349#define SCSI_SENSEQ_READ_OF_SCRAMBLED_SECTOR_WITHOUT_AUTHENTICATION 0x03
1350#define SCSI_SENSEQ_MEDIA_CODE_MISMATCHED_TO_LOGICAL_UNIT 0x04
1351#define SCSI_SENSEQ_LOGICAL_UNIT_RESET_COUNT_ERROR 0x05
1352
1353// SK:ASC = 06:28
1354#define SCSI_SENSEQ_IMPORT_OR_EXPERT_ELEMENT_ACCESS 0x01
1355
1356// SK:ASC = 06:29
1357#define SCSI_SENSEQ_POWER_ON 0x01
1358#define SCSI_SENSEQ_SCSI_BUS 0x02
1359#define SCSI_SENSEQ_BUS_DEVICE_FUNCTION 0x03
1360#define SCSI_SENSEQ_DEVICE_INTERNAL 0x04
1361
1362// SK:ASC = 06:2A
1363#define SCSI_SENSEQ_MODE_PARAMETERS 0x01
1364#define SCSI_SENSEQ_LOG_PARAMETERS 0x02
1365#define SCSI_SENSEQ_RESERVATIONS_PREEMPTED 0x03
1366
1367// SK:ASC = 06:3B
1368#define SCSI_SENSEQ_DESTINATION_ELEMENT_FULL 0x0D
1369#define SCSI_SENSEQ_SOURCE_ELEMENT_EMPTY 0x0E
1370#define SCSI_SENSEQ_END_OF_MEDIUM 0x0F
1371#define SCSI_SENSEQ_MAGAZINE_NOT_ACCESSIBLE 0x11
1372#define SCSI_SENSEQ_MAGAZINE_REMOVED 0x12
1373#define SCSI_SENSEQ_MAGAZINE_INSERTED 0x13
1374#define SCSI_SENSEQ_MAGAZINE_LOCKED 0x14
1375#define SCSI_SENSEQ_MAGAZINE_UNLOCKED 0x15
1376
1377// SK:ASC = 06:3F
1378#define SCSI_SENSEQ_MICROCODE 0x01
1379#define SCSI_SENSEQ_OPERATION_DEFINITION 0x02
1380#define SCSI_SENSEQ_INQUIRY_DATA 0x03
1381
1382// SK:ASC = 06:5A
1383#define SCSI_SENSEQ_MEDIUM_CHANGE_REQ 0x01
1384#define SCSI_SENSEQ_W_PROTECT_SELECTED 0x02
1385#define SCSI_SENSEQ_W_PROTECT_PERMITED 0x03
1386
1387// SK:ASC = 06:5E
1388#define SCSI_SENSEQ_LOW_POWER_COND 0x00
1389#define SCSI_SENSEQ_IDLE_BY_TIMER 0x01
1390#define SCSI_SENSEQ_STANDBY_BY_TIMER 0x02
1391#define SCSI_SENSEQ_IDLE_BY_CMD 0x03
1392#define SCSI_SENSEQ_STANDBY_BY_CMD 0x04
1393
1394#define SCSI_SENSEQ_FILEMARK_DETECTED 0x01
1395#define SCSI_SENSEQ_SETMARK_DETECTED 0x03
1396#define SCSI_SENSEQ_END_OF_MEDIA_DETECTED 0x02
1397#define SCSI_SENSEQ_BEGINNING_OF_MEDIA_DETECTED 0x04
1398
1399// SCSI IO Device Control Codes
1400
1401#define FILE_DEVICE_SCSI 0x0000001b
1402
1403#define IOCTL_SCSI_EXECUTE_IN ((FILE_DEVICE_SCSI << 16) + 0x0011)
1404#define IOCTL_SCSI_EXECUTE_OUT ((FILE_DEVICE_SCSI << 16) + 0x0012)
1405#define IOCTL_SCSI_EXECUTE_NONE ((FILE_DEVICE_SCSI << 16) + 0x0013)
1406
1407// SMART support in atapi
1408
1409#define IOCTL_SCSI_MINIPORT_SMART_VERSION ((FILE_DEVICE_SCSI << 16) + 0x0500)
1410#define IOCTL_SCSI_MINIPORT_IDENTIFY ((FILE_DEVICE_SCSI << 16) + 0x0501)
1411#define IOCTL_SCSI_MINIPORT_READ_SMART_ATTRIBS ((FILE_DEVICE_SCSI << 16) + 0x0502)
1412#define IOCTL_SCSI_MINIPORT_READ_SMART_THRESHOLDS ((FILE_DEVICE_SCSI << 16) + 0x0503)
1413#define IOCTL_SCSI_MINIPORT_ENABLE_SMART ((FILE_DEVICE_SCSI << 16) + 0x0504)
1414#define IOCTL_SCSI_MINIPORT_DISABLE_SMART ((FILE_DEVICE_SCSI << 16) + 0x0505)
1415#define IOCTL_SCSI_MINIPORT_RETURN_STATUS ((FILE_DEVICE_SCSI << 16) + 0x0506)
1416#define IOCTL_SCSI_MINIPORT_ENABLE_DISABLE_AUTOSAVE ((FILE_DEVICE_SCSI << 16) + 0x0507)
1417#define IOCTL_SCSI_MINIPORT_SAVE_ATTRIBUTE_VALUES ((FILE_DEVICE_SCSI << 16) + 0x0508)
1418#define IOCTL_SCSI_MINIPORT_EXECUTE_OFFLINE_DIAGS ((FILE_DEVICE_SCSI << 16) + 0x0509)
1419#define IOCTL_SCSI_MINIPORT_ENABLE_DISABLE_AUTO_OFFLINE ((FILE_DEVICE_SCSI << 16) + 0x050a)
1420#define IOCTL_SCSI_MINIPORT_READ_SMART_LOG ((FILE_DEVICE_SCSI << 16) + 0x050b)
1421#define IOCTL_SCSI_MINIPORT_WRITE_SMART_LOG ((FILE_DEVICE_SCSI << 16) + 0x050c)
1422
1423// Read Capacity Data - returned in Big Endian format
1424
1425typedef struct _READ_CAPACITY_DATA {
1429
1438
1439// CD ROM Read Table Of Contents (TOC) structures
1440// Format 0 - Get table of contents
1441
1442#define TocControl_TrkMode_Mask WParam_TrkMode_Mask
1443#define TocControl_TrkMode_Audio WParam_TrkMode_Audio
1444#define TocControl_TrkMode_Audio_PreEmph WParam_TrkMode_Audio_PreEmph
1445#define TocControl_TrkMode_Data WParam_TrkMode_Data
1446#define TocControl_TrkMode_IncrData WParam_TrkMode_IncrData
1447#define TocControl_TrkMode_QAudio_PreEmph WParam_TrkMode_QAudio_PreEmph
1448#define TocControl_TrkMode_AllowCpy WParam_TrkMode_AllowCpy
1449
1450typedef struct _TOC_TRACK_INFO {
1452 UCHAR Control : 4;
1453 UCHAR Adr : 4;
1456 UCHAR LBA[4];
1458
1459typedef struct _READ_TOC_HEADER {
1460 UCHAR Length[2];
1464
1465#define TOC_LastTrack_ID 0xAA
1466
1467typedef struct _READ_TOC_TOC {
1471
1472// Format 1 - Session Info
1473
1474typedef struct _READ_TOC_SES {
1476 TOC_TRACK_INFO LastSes_1stTrack; // First Track Number In Last Complete Session
1478
1479// Format 2,3 - Full TOC, PMA
1480
1481// ADR = 1
1482#define POINT_StartPositionOfTrack_Min 0x01
1483#define POINT_StartPositionOfTrack_Max 0x63
1484#define POINT_FirstTrackNum 0xA0
1485#define POINT_LastTrackNum 0xA1
1486#define POINT_StartPositionOfLeadOut 0xA2
1487// ADR = 5
1488#define POINT_SkipInterval_Min 0x01
1489#define POINT_SkipInterval_Max 0x40
1490#define POINT_StartPositionOfNextProgramArea 0xB0
1491#define POINT_NumOfSkips 0xB1
1492#define POINT_SkipTrackAssignmet_Min 0xB2
1493#define POINT_SkipTrackAssignmet_Max 0xB4
1494#define POINT_StartPositionOfFirstLeadIn 0xC0
1495#define POINT_CopyOfAdditionalAreaInATIP 0xC1
1496
1497typedef struct _TOC_SES_INFO {
1499 UCHAR Control : 4;
1500 UCHAR Adr : 4;
1501 UCHAR TNO;
1502 UCHAR POINT;
1503
1504 union {
1505
1506 struct {
1507 UCHAR MSF[3];
1509 UCHAR P_MSF[3];
1511
1512// ADR = 1:
1513
1514//0x01 - 0x63
1515 struct {
1516 UCHAR ATIME[3];
1517 UCHAR Zero;
1518 UCHAR MSF[3];
1520
1521//0xA0
1522#define FullTOC_DiscType_CDDA_or_M1 WParam_SesFmt_CdRom // 0x00
1523#define FullTOC_DiscType_CDI WParam_SesFmt_CdI // 0x10
1524#define FullTOC_DiscType_CDXA_M2 WParam_SesFmt_CdRomXa // 0x20
1525
1526 struct {
1527 UCHAR ATIME[3];
1528 UCHAR Zero;
1531 UCHAR Zero1;
1533
1534//0xA1
1535 struct {
1536 UCHAR ATIME[3];
1537 UCHAR Zero;
1539 UCHAR Zero1[2];
1541
1542//0xA2
1543 struct {
1544 UCHAR ATIME[3];
1545 UCHAR Zero;
1546 UCHAR MSF[3];
1548
1549// ADR = 5:
1550
1551//0x01 - 0x40
1552 struct {
1553 UCHAR End_MSF[3];
1555 UCHAR Start_MSF[3];
1557
1558//0xB0
1559 struct {
1560 UCHAR Program_MSF[3];
1564
1565//0xB1
1566 struct {
1567 UCHAR Zero[4];
1569 UCHAR Tracks;
1570 UCHAR Zero1;
1572
1573//0xB2 - 0xB4
1574 struct {
1575 UCHAR SkipNum[7];
1577
1578//0xC0
1579 struct {
1582 UCHAR LeadIn_MSF[3];
1584
1585//0xC1
1586 struct {
1587 UCHAR Bytes[7];
1589
1592
1593typedef struct _READ_TOC_FULL_TOC {
1597
1600
1601// Format 4 - ATIP
1602
1603typedef struct _READ_TOC_ATIP {
1604 UCHAR Length[2];
1605 UCHAR Reserved[2];
1606
1607#define ATIP_SpeedRef_Mask 0x07
1608#define ATIP_SpeedRef_2X 0x01
1609#define ATIP_WritingPower_Mask 0x07
1610
1611 union {
1612 UCHAR Flags;
1613 struct {
1614 UCHAR SpeedRef: 3;
1615 UCHAR Reserved: 1;
1617 UCHAR One: 1;
1620
1621#define ATIP_URU 0x40
1622
1623 union {
1624 UCHAR Flags;
1625 struct {
1626 UCHAR Reserved: 6;
1627 UCHAR URU: 1;
1628 UCHAR Zero: 1;
1631
1632#define ATIP_A1 0x01 // 16-18 are valid
1633#define ATIP_A2 0x02 // 20-22 are valid
1634#define ATIP_A3 0x04 // 24-26 are valid
1635#define ATIP_SubType_Mask 0x38 // shall be set to zero
1636#define ATIP_Type_Mask 0x40
1637#define ATIP_Type_CDR 0x00
1638#define ATIP_Type_CDRW 0x40
1639
1640 union {
1641 UCHAR Flags;
1642 struct {
1643 UCHAR A1: 1;
1644 UCHAR A2: 1;
1645 UCHAR A3: 1;
1646 UCHAR SubType: 3;
1647 UCHAR Type: 1;
1648 UCHAR One: 1;
1651
1653 UCHAR LeadIn_MSF[3];
1655 UCHAR LeadOut_MSF[3];
1657
1658#define ATIP_MinSpeedCVL_Mask 0x70
1659#define ATIP_MinSpeedCVL_2X 0x10
1660#define ATIP_MaxSpeedCVL_Mask 0x0f
1661#define ATIP_MaxSpeedCVL_2X 0x01
1662#define ATIP_MaxSpeedCVL_4X 0x02
1663#define ATIP_MaxSpeedCVL_6X 0x03
1664#define ATIP_MaxSpeedCVL_8X 0x04
1665
1666 union {
1667 UCHAR Flags;
1668 struct {
1669 UCHAR MaxSpeedCVL: 4;
1670 UCHAR MinSpeedCVL: 3;
1671 UCHAR Zero: 1;
1674
1675#define ATIP_Power_Y_Mask 0x0e
1676#define ATIP_Power_P_Mask 0x70
1677
1678 union {
1679 UCHAR Flags;
1680 struct {
1681 UCHAR Reserved: 1;
1682 UCHAR Y_value: 3;
1683 UCHAR P_factor: 3;
1684 UCHAR Zero: 1;
1687
1688#define ATIP_PW_ratio_Mask 0x70
1689
1690 union {
1691 UCHAR Flags;
1692 struct {
1693 UCHAR Reserved: 4;
1694 UCHAR P_W_ratio: 3;
1695 UCHAR Zero: 1;
1698
1700 UCHAR A1_value[3];
1702 UCHAR A2_value[3];
1704 UCHAR A3_value[3];
1705
1707
1708// Format 5 - CD-TEXT
1709
1710typedef struct _CD_TEXT_PACK_DATA {
1711
1712#define CdText_ID1_Title 0x80 // ID2 = 0 - Album, ID2 = 1-63 - Track
1713#define CdText_ID1_Performer 0x81
1714#define CdText_ID1_Songwriter 0x82
1715#define CdText_ID1_Composer 0x83
1716#define CdText_ID1_Arranger 0x84
1717#define CdText_ID1_Message 0x85
1718#define CdText_ID1_DiscID 0x86
1719#define CdText_ID1_GenreInfo 0x87
1720#define CdText_ID1_TOC 0x88
1721#define CdText_ID1_TOC2 0x89
1722#define CdText_ID1_Special 0x8D
1723#define CdText_ID1_UPC_EAN_ISRC 0x8E
1724#define CdText_ID1_BlockSizeInfo 0x8F
1725
1726 UCHAR ID1;
1727 UCHAR ID2;
1728 UCHAR ID3;
1729
1730#define CdText_CharPos_Mask 0x0f
1731#define CdText_BlkNum_Mask 0x70
1732
1733 union {
1734 UCHAR Flags;
1735 struct {
1736 UCHAR CharPos: 4;
1737 UCHAR BlkNum: 3;
1738 UCHAR DBCC: 1; // used to indicate Double Byte text encoding (Unicode ?)
1741
1742 UCHAR TextData[12];
1743 UCHAR CRC[2];
1745
1746typedef struct _READ_TOC_CD_TEXT {
1747 UCHAR Length[2];
1748 UCHAR Reserved[2];
1751
1752// OPC block
1753
1754typedef struct _OPC_INFO_BLOCK {
1755 UCHAR Speed[2];
1756 UCHAR OpcValue[6];
1758
1759// Buffer Capacity format
1760
1761typedef struct _BUFFER_CAPACITY_BLOCK {
1762 UCHAR DataLength[2];
1763 UCHAR Reserved0[2];
1767
1768// Format Unit structures
1769
1770typedef struct _FORMAT_LIST_HEADER {
1772
1773#define FormatHeader_VS 0x01
1774#define FormatHeader_Immed 0x02
1775#define FormatHeader_DSP 0x04
1776#define FormatHeader_IP 0x08
1777#define FormatHeader_STPF 0x10
1778#define FormatHeader_DCRT 0x20
1779#define FormatHeader_DPRY 0x40
1780#define FormatHeader_FOV 0x80
1781
1782 union {
1783 UCHAR Flags;
1784 struct {
1785 UCHAR VS: 1;
1786 UCHAR Immed: 1;
1787 UCHAR DSP: 1;
1788 UCHAR IP: 1;
1789 UCHAR STPF: 1;
1790 UCHAR DCRT: 1;
1791 UCHAR DPRY: 1;
1792 UCHAR FOV: 1;
1795 UCHAR FormatDescriptorLength[2]; // =0x0008
1797
1798typedef struct _CDRW_FORMAT_DESCRIPTOR {
1799
1800#define FormatDesc_Grow 0x40
1801#define FormatDesc_Ses 0x80
1802
1803 union {
1804 UCHAR Flags;
1805 struct {
1806 UCHAR Reserved0: 6;
1807 UCHAR Grow: 1;
1808 UCHAR Ses: 1;
1811 UCHAR Reserved1[3];
1812 UCHAR FormatSize[4];
1814
1815typedef struct _FORMAT_UNIT_PARAMETER_LIST {
1820
1821// define Read Format Capacities info blocks
1822
1823typedef struct _CAPACITY_LIST_HEADER {
1824 UCHAR Reserved[3];
1825 UCHAR Length;
1827
1828typedef struct _FORMATTABLE_CAPACITY_DESCRIPTOR {
1829 UCHAR NumOfBlocks [4];
1830 union {
1831 UCHAR Flags;
1832 struct {
1833 UCHAR DescType: 2;
1837 UCHAR BlockSize [3];
1839
1840typedef struct _FORMAT_CAPACITIES_DATA {
1843
1844// Define Event Status info blocks
1845
1846typedef struct _EVENT_STAT_HEADER {
1847 UCHAR DataLength[2];
1848
1849#define EventRetStat_Class_Mask 0x07
1850#define EventRetStat_Class_OpChange 0x01
1851#define EventRetStat_Class_PM 0x02
1852#define EventRetStat_Class_Media 0x04
1853#define EventRetStat_Class_DevBusy 0x06
1854#define EventRetStat_NEA 0x80
1855
1856 union {
1857 UCHAR Flags;
1858 struct {
1859 UCHAR Class: 3;
1860 UCHAR Reserved0: 4;
1861 UCHAR NEA: 1;
1864
1865 UCHAR SupportedClasses; // see command format
1866
1868
1869typedef struct _EVENT_STAT_OPERATIONAL_BLOCK {
1870
1872
1873#define EventStat_OpEvent_Mask 0x0f
1874
1875 union {
1876 UCHAR Flags;
1877 struct {
1878 UCHAR OpEvent : 4;
1879 UCHAR Reserved0: 4;
1882
1883#define EventStat_OpStat_Mask 0x0f
1884#define EventStat_OpStat_Ready 0x00
1885#define EventStat_OpStat_TempBusy 0x01
1886#define EventStat_OpStat_Busy 0x02
1887
1888 union {
1889 UCHAR Flags;
1890 struct {
1891 UCHAR OpStatus : 4;
1892 UCHAR Reserved0 : 3;
1896
1897#define EventStat_OpReport_NoChg 0x00
1898#define EventStat_OpReport_Change 0x01
1899#define EventStat_OpReport_AddChg 0x02
1900#define EventStat_OpReport_Reset 0x03
1901#define EventStat_OpReport_FirmwareChg 0x04 // microcode change
1902#define EventStat_OpReport_InquaryChg 0x05
1903#define EventStat_OpReport_CtrlReq 0x06
1904#define EventStat_OpReport_CtrlRelease 0x07
1905
1906 UCHAR OpReport[2];
1907
1909
1910typedef struct _EVENT_STAT_PM_BLOCK {
1911
1913
1914#define EventStat_PowerEvent_Mask 0x0f
1915#define EventStat_PowerEvent_NoChg 0x00
1916#define EventStat_PowerEvent_ChgOK 0x01
1917#define EventStat_PowerEvent_ChgFail 0x02
1918
1919 union {
1920 UCHAR Flags;
1921 struct {
1922 UCHAR PowerEvent : 4;
1923 UCHAR Reserved0 : 4;
1926
1927#define EventStat_PowerStat_Mask 0x0f
1928#define EventStat_PowerStat_Active 0x01
1929#define EventStat_PowerStat_Idle 0x02
1930#define EventStat_PowerStat_Standby 0x03
1931#define EventStat_PowerStat_Sleep 0x04
1932
1933 union {
1934 UCHAR Flags;
1935 struct {
1936 UCHAR PowerStatus: 4;
1937 UCHAR Reserved0 : 4;
1940
1941 UCHAR Reserved0[2];
1942
1944
1945typedef struct _EVENT_STAT_MEDIA_BLOCK {
1946
1948
1949#define EventStat_MediaEvent_Mask 0x0f
1950#define EventStat_MediaEvent_None 0x00
1951#define EventStat_MediaEvent_EjectReq 0x01
1952#define EventStat_MediaEvent_New 0x02
1953#define EventStat_MediaEvent_Removal 0x03
1954#define EventStat_MediaEvent_Chg 0x04
1955
1956 union {
1957 UCHAR Flags;
1958 struct {
1959 UCHAR MediaEvent : 4;
1960 UCHAR Reserved0 : 4;
1963
1964#define EventStat_MediaStat_DoorOpen 0x01
1965#define EventStat_MediaStat_Present 0x02
1966
1967 union {
1968 UCHAR Flags;
1969 struct {
1970 UCHAR DoorOpen : 1;
1971 UCHAR Present : 1;
1972 UCHAR Reserved0 : 6;
1975
1977 UCHAR EndSlot;
1978
1980
1981typedef struct _EVENT_STAT_DEV_BUSY_BLOCK {
1982
1984
1985#define EventStat_BusyEvent_Mask 0x0f
1986#define EventStat_BusyEvent_None 0x00
1987#define EventStat_BusyEvent_Busy 0x01
1988
1989 union {
1990 UCHAR Flags;
1991 struct {
1992 UCHAR BusyEvent : 4;
1993 UCHAR Reserved0 : 4;
1996
1997#define EventStat_BusyStat_Mask 0x0f
1998#define EventStat_BusyStat_NoEvent 0x00
1999#define EventStat_BusyStat_Power 0x01
2000#define EventStat_BusyStat_Immed 0x02
2001#define EventStat_BusyStat_Deferred 0x03
2002
2003 union {
2004 UCHAR Flags;
2005 struct {
2006 UCHAR BusyStatus: 4;
2007 UCHAR Reserved0 : 4;
2010
2011 UCHAR Time[2];
2012
2014
2015// Define mode disc info block.
2016
2017typedef struct _DISC_INFO_BLOCK { //
2018 UCHAR DataLength [2];
2019
2020#define DiscInfo_Disk_Mask 0x03
2021#define DiscInfo_Disk_Empty 0x00
2022#define DiscInfo_Disk_Appendable 0x01
2023#define DiscInfo_Disk_Complete 0x02
2024
2025#define DiscInfo_Ses_Mask 0x0C
2026#define DiscInfo_Ses_Empty 0x00
2027#define DiscInfo_Ses_Incomplete 0x04
2028#define DiscInfo_Ses_Complete 0x0C
2029
2030#define DiscInfo_Disk_Erasable 0x10
2031
2032 union {
2033 UCHAR Flags;
2034 struct {
2035 UCHAR DiscStat : 2;
2036 UCHAR LastSesStat : 2;
2037 UCHAR Erasable : 1;
2041
2046
2047#define DiscInfo_URU 0x20
2048#define DiscInfo_DBC_V 0x40
2049#define DiscInfo_DID_V 0x80
2050
2051 union {
2052 UCHAR Flags;
2053 struct {
2054 UCHAR Reserved1: 5;
2055 UCHAR URU : 1;
2056 UCHAR DBC_V : 1; // 0
2057 UCHAR DID_V : 1;
2060
2061#define DiscInfo_Type_cdrom 0x00 // CD-DA / CD-ROM
2062#define DiscInfo_Type_cdi 0x10 // CD-I
2063#define DiscInfo_Type_cdromxa 0x20 // CD-ROM XA
2064#define DiscInfo_Type_unknown 0xFF // HZ ;)
2065
2067 UCHAR NumOfSes2; // MSB MMC-3
2068 UCHAR FirstTrackNumLastSes2; // MSB MMC-3
2069 UCHAR LastTrackNumLastSes2; // MSB MMC-3
2070 UCHAR DiskId [4];
2071 UCHAR LastSesLeadInTime [4]; // MSF
2072 UCHAR LastSesLeadOutTime [4]; // MSF
2073 UCHAR DiskBarCode [8];
2075 UCHAR OPCNum;
2077
2078// Define track info block.
2079
2080typedef struct _TRACK_INFO_BLOCK {
2081 UCHAR DataLength [2];
2083 UCHAR SesNum;
2085
2086#define TrkInfo_Trk_Mask 0x0F
2087#define TrkInfo_Trk_Mode1 0x01
2088#define TrkInfo_Trk_Mode2 0x02
2089#define TrkInfo_Trk_XA 0x02
2090#define TrkInfo_Trk_DDCD 0x04 // MMC-3
2091#define TrkInfo_Trk_NonCD 0x04 // MMC-3
2092#define TrkInfo_Trk_Inc 0x05 // MMC-3
2093#define TrkInfo_Trk_unknown 0x0F
2094#define TrkInfo_Copy 0x10
2095#define TrkInfo_Damage 0x20
2096
2098/* UCHAR TrackMode : 4;
2099 UCHAR Copy : 1;
2100 UCHAR Damage : 1;
2101 UCHAR Reserved1 : 2; */
2102
2103#define TrkInfo_Dat_Mask 0x0F
2104#define TrkInfo_Dat_Mode1 0x01
2105#define TrkInfo_Dat_Mode2 0x02
2106#define TrkInfo_Dat_XA 0x02
2107#define TrkInfo_Dat_DDCD 0x02
2108#define TrkInfo_Dat_unknown 0x0F
2109#define TrkInfo_FP 0x10
2110#define TrkInfo_Packet 0x20
2111#define TrkInfo_Blank 0x40
2112#define TrkInfo_RT 0x80
2113
2115/* UCHAR DataMode : 4;
2116 UCHAR FP : 1;
2117 UCHAR Packet : 1;
2118 UCHAR Blank : 1;
2119 UCHAR RT : 1; */
2120
2121#define TrkInfo_NWA_V 0x01
2122#define TrkInfo_LRA_V 0x02 // MMC-3
2123
2124 UCHAR NWA_V;
2125/* UCHAR NWA_V : 1;
2126 UCHAR LRA_V : 1;
2127 UCHAR Reserved : 6; */
2128
2130 UCHAR NextWriteAddr [4];
2131 UCHAR FreeBlocks [4];
2132 UCHAR FixPacketSize [4];
2133 UCHAR TrackLength [4];
2134
2135// MMC-3
2136
2138 UCHAR TrackNum2; // MSB
2139 UCHAR SesNum2; // MSB
2140 UCHAR Reserved2[2];
2141
2143
2144// Mode data structures.
2145
2146// Define Mode parameter header.
2147
2148#define MediaType_Unknown 0x00
2149#define MediaType_120mm_CDROM_DataOnly 0x01
2150#define MediaType_120mm_CDROM_AudioOnly 0x02 //CDDA
2151#define MediaType_120mm_CDROM_DataAudioCombined 0x03
2152#define MediaType_120mm_CDROM_Hybrid_PhotoCD 0x04
2153#define MediaType_80mm_CDROM_DataOnly 0x05
2154#define MediaType_80mm_CDROM_AudioOnly 0x06 //CDDA
2155#define MediaType_80mm_CDROM_DataAudioCombined 0x07
2156#define MediaType_80mm_CDROM_Hybrid_PhotoCD 0x08
2157
2158#define MediaType_UnknownSize_CDR 0x10
2159#define MediaType_120mm_CDR_DataOnly 0x11
2160#define MediaType_120mm_CDR_AudioOnly 0x12 //CDDA
2161#define MediaType_120mm_CDR_DataAudioCombined 0x13
2162#define MediaType_120mm_CDR_Hybrid_PhotoCD 0x14
2163#define MediaType_80mm_CDR_DataOnly 0x15
2164#define MediaType_80mm_CDR_AudioOnly 0x16 //CDDA
2165#define MediaType_80mm_CDR_DataAudioCombined 0x17
2166#define MediaType_80mm_CDR_Hybrid_Photo_CD 0x18
2167
2168#define MediaType_UnknownSize_CDRW 0x20
2169#define MediaType_120mm_CDRW_DataOnly 0x21
2170#define MediaType_120mm_CDRW_AudioOnly 0x22 //CDDA
2171#define MediaType_120mm_CDRW_DataAudioCombined 0x23
2172#define MediaType_120mm_CDRW_Hybrid 0x24
2173#define MediaType_80mm_CDRW_DataOnly 0x25
2174#define MediaType_80mm_CDRW_AudioOnly 0x26 //CDDA
2175#define MediaType_80mm_CDRW_DataAudioCombined 0x27
2176#define MediaType_80mm_CDRW_Hybrid 0x28
2177
2178#define MediaType_NoDiscPresent 0x70
2179#define MediaType_DoorOpen 0x71
2180
2181//*********************************************************************************************
2182
2183typedef struct _MODE_PARAMETER_HEADER {
2189
2190typedef struct _MODE_PARAMETER_HEADER10 {
2194 UCHAR Reserved[2];
2197
2198#define MODE_FD_SINGLE_SIDE 0x01
2199#define MODE_FD_DOUBLE_SIDE 0x02
2200#define MODE_FD_MAXIMUM_TYPE 0x1E
2201#define MODE_DSP_FUA_SUPPORTED 0x10
2202#define MODE_DSP_WRITE_PROTECT 0x80
2203
2204// Define the mode parameter block.
2205
2206typedef struct _MODE_PARAMETER_BLOCK {
2210 UCHAR BlockLength[3];
2212
2213typedef struct _MODE_PARM_READ_WRITE {
2214
2215 MODE_PARAMETER_HEADER ParameterListHeader; // List Header Format
2216 MODE_PARAMETER_BLOCK ParameterListBlock; // List Block Descriptor
2217
2219
2220//*********************************************************************************************
2221// Define read write recovery page
2222
2223typedef struct _MODE_READ_WRITE_RECOVERY_PAGE { // 0x01
2224
2225 UCHAR PageCode : 6;
2226 UCHAR Reserved1 : 1;
2229 union {
2230 UCHAR Flags;
2231 struct {
2232 UCHAR DCRBit : 1;
2233 UCHAR DTEBit : 1;
2234 UCHAR PERBit : 1;
2235 UCHAR EERBit : 1;
2236 UCHAR RCBit : 1;
2237 UCHAR TBBit : 1;
2238 UCHAR ARRE : 1;
2239 UCHAR AWRE : 1;
2243 UCHAR CorrectionSpan; //SCSI CBS only
2244 UCHAR HeadOffsetCount; //SCSI CBS only
2245 UCHAR DataStrobOffsetCount; //SCSI CBS only
2249 UCHAR RecoveryTimeLimit[2]; // 0
2250
2252
2253// Define Read Recovery page - cdrom
2254
2255typedef struct _MODE_READ_RECOVERY_PAGE { // 0x01
2256
2257 UCHAR PageCode : 6;
2258 UCHAR Reserved1 : 1;
2261 UCHAR DCRBit : 1;
2262 UCHAR DTEBit : 1;
2263 UCHAR PERBit : 1;
2264 UCHAR Reserved2 : 1;
2265 UCHAR RCBit : 1;
2266 UCHAR TBBit : 1;
2267 UCHAR Reserved3 : 2;
2269 UCHAR Reserved4[4];
2270
2272
2273//*********************************************************************************************
2274// Define mode write parameters page.
2275
2276typedef struct _MODE_WRITE_PARAMS_PAGE { // 0x05
2277 UCHAR PageCode : 6;
2278 UCHAR Reserved1: 1;
2279 UCHAR PageSavable : 1;
2280
2281 UCHAR PageLength; // 0x32
2282
2283#define WParam_WType_Mask 0x0f
2284#define WParam_WType_Packet 0x00
2285#define WParam_WType_TAO 0x01
2286#define WParam_WType_Ses 0x02
2287#define WParam_WType_Raw 0x03
2288#define WParam_TestWrite 0x10
2289#define WParam_LS_V 0x20
2290#define WParam_BUFF 0x40
2291
2292 union {
2293 UCHAR Flags;
2294 struct {
2295 UCHAR WriteType: 4; // 1
2296 UCHAR TestWrite: 1;
2297 UCHAR LS_V: 1;
2298 UCHAR BUFF: 1;
2299 UCHAR Reserved1: 1;
2302
2303#define WParam_TrkMode_Mask 0x0d // xx0x
2304#define WParam_TrkMode_None 0x00
2305#define WParam_TrkMode_Audio 0x00
2306#define WParam_TrkMode_Audio_PreEmph 0x01
2307#define WParam_TrkMode_Data 0x04
2308#define WParam_TrkMode_IncrData 0x05
2309#define WParam_TrkMode_QAudio_PreEmph 0x08
2310#define WParam_TrkMode_AllowCpy 0x02
2311#define WParam_Copy 0x10
2312#define WParam_FP 0x20
2313#define WParam_MultiSes_Mask 0xc0
2314#define WParam_Multises_None 0x00
2315#define WParam_Multises_Final 0x80
2316#define WParam_Multises_Multi 0xc0
2317
2318 union {
2319 UCHAR Flags;
2320 struct {
2321 UCHAR TrackMode: 4; // 4
2322 UCHAR Copy : 1; // 0
2323 UCHAR FP : 1; // 0
2324 UCHAR Multisession: 2; // 11
2327
2328#define WParam_BlkType_Mask 0x0f
2329#define WParam_BlkType_Raw_2352 0x00
2330#define WParam_BlkType_RawPQ_2368 0x01
2331#define WParam_BlkType_RawPW_2448 0x02
2332#define WParam_BlkType_RawPW_R_2448 0x03
2333#define WParam_BlkType_VendorSpec1 0x07
2334#define WParam_BlkType_M1_2048 0x08
2335#define WParam_BlkType_M2_2336 0x09
2336#define WParam_BlkType_M2XAF1_2048 0x0a
2337#define WParam_BlkType_M2XAF1SH_2056 0x0b
2338#define WParam_BlkType_M2XAF2_2324 0x0c
2339#define WParam_BlkType_M2XAFXSH_2332 0x0d
2340#define WParam_BlkType_VendorSpec2 0x0f
2341
2342 union {
2343 UCHAR Flags;
2344 struct {
2345 UCHAR DataBlockType: 4; // 8
2346 UCHAR Reserved2: 4;
2349
2352
2353 union {
2354 UCHAR Flags;
2355 struct {
2356 UCHAR HostAppCode : 6; // 0
2357 UCHAR Reserved4 : 2;
2360
2361#define WParam_SesFmt_CdRom 0x00
2362#define WParam_SesFmt_CdI 0x10
2363#define WParam_SesFmt_CdRomXa 0x20
2364
2365 UCHAR SesFmt; // 0
2367 UCHAR PacketSize[4]; // 0
2368 UCHAR AudioPause[2]; // 150
2369
2370 UCHAR Reserved6: 7;
2371 UCHAR MCVAL : 1;
2372
2373 UCHAR N[13];
2374 UCHAR Zero;
2375 UCHAR AFRAME;
2376
2377 UCHAR Reserved7: 7;
2378 UCHAR TCVAL : 1;
2379
2380 UCHAR I[12];
2381 UCHAR Zero_2;
2384
2385 struct {
2386 union {
2387 UCHAR MSF[3];
2388 struct _SubHdrParams1 {
2389 UCHAR FileNum;
2390 UCHAR ChannelNum;
2391
2392#define WParam_SubHdr_SubMode0 0x00
2393#define WParam_SubHdr_SubMode1 0x08
2394
2395 UCHAR SubMode;
2398
2399#define WParam_SubHdr_Mode_Mask 0x03
2400#define WParam_SubHdr_Mode0 0x00
2401#define WParam_SubHdr_Mode1 0x01
2402#define WParam_SubHdr_Mode2 0x02
2403#define WParam_SubHdr_Format_Mask 0xe0
2404#define WParam_SubHdr_Format_UserData 0x00
2405#define WParam_SubHdr_Format_RunIn4 0x20
2406#define WParam_SubHdr_Format_RunIn3 0x40
2407#define WParam_SubHdr_Format_RunIn2 0x60
2408#define WParam_SubHdr_Format_RunIn1 0x80
2409#define WParam_SubHdr_Format_Link 0xa0
2410#define WParam_SubHdr_Format_RunOut2 0xc0
2411#define WParam_SubHdr_Format_RunOut1 0xe0
2412
2413 union {
2414 UCHAR Flags;
2415 struct {
2416 UCHAR Mode : 2;
2417 UCHAR Reserved : 3;
2418 UCHAR Format : 3;
2422
2424
2425typedef struct _MODE_WRITE_PARAMS_PAGE_3 {
2427 UCHAR VendorSpec[4];
2429
2430//*********************************************************************************************
2431// Define Caching page.
2432
2433typedef struct _MODE_CACHING_PAGE { // 0x08
2434 UCHAR PageCode : 6;
2435 UCHAR Reserved1: 1;
2436 UCHAR PageSavable : 1;
2441 UCHAR Reserved2 : 5;
2449
2450//*********************************************************************************************
2451// Define CD Parameters page.
2452
2453typedef struct _MODE_CD_PARAMS_PAGE { // 0x0D
2454 UCHAR PageCode : 6;
2455 UCHAR Reserved : 1;
2456 UCHAR PageSavable : 1;
2457
2458 UCHAR PageLength; // 0x06
2460
2461#define CdParams_InactvityTime_Mask 0x0f
2462
2463 union {
2464 UCHAR Flags;
2465 struct {
2466 UCHAR InactivityTime: 4; // 1 - 125ms, 2 - 250ms... 9 - 32s, A - 1min...
2467 UCHAR Reserved0 : 4;
2470
2474
2475//*********************************************************************************************
2476// Define CD Audio Control Mode page.
2477
2478typedef struct _CDDA_PORT_CONTROL {
2479
2480#define CddaPort_Channel_Mask 0x0f
2481#define CddaPort_Channel_Mute 0x00
2482#define CddaPort_Channel_0 0x01
2483#define CddaPort_Channel_1 0x02
2484#define CddaPort_Channel_0_1 0x03
2485#define CddaPort_Channel_2 0x04
2486#define CddaPort_Channel_3 0x08
2487
2489 UCHAR Volume;
2491
2492typedef struct _MODE_CD_AUDIO_CONTROL_PAGE { // 0x0E
2493 UCHAR PageCode : 6;
2494 UCHAR Reserved1: 1;
2495 UCHAR PageSavable : 1;
2496
2497 UCHAR PageLength; // 0x0E
2498
2499#define CdAudio_SOTC 0x02
2500#define CdAudio_Immed 0x04
2501
2502 union {
2503 UCHAR Flags;
2504 struct {
2505 UCHAR Reserved0 : 1;
2506 UCHAR SOTC : 1;
2507 UCHAR Immed : 1;
2508 UCHAR Reserved1 : 5;
2511
2512 UCHAR Reserved2[2];
2517
2518//*********************************************************************************************
2519// Define Power Condition Mode page.
2520
2521typedef struct _MODE_POWER_CONDITION_PAGE { // 0x1A
2522 UCHAR PageCode : 6;
2523 UCHAR Reserved1: 1;
2524 UCHAR PageSavable : 1;
2525
2526 UCHAR PageLength; // 0x0A
2528
2529#define PowerCond_Standby 0x01
2530#define PowerCond_Idle 0x02
2531
2532 union {
2533 UCHAR Flags;
2534 struct {
2535 UCHAR Standby : 1;
2536 UCHAR Idle : 1;
2537 UCHAR Reserved1 : 6;
2540
2541 UCHAR IdleTimer[4]; // 1unit = 100ms
2542 UCHAR StandbyTimer[4]; // 1unit = 100ms
2544
2545//*********************************************************************************************
2546// Define Fault/Failure Reporting Control page.
2547
2548typedef struct _MODE_FAIL_REPORT_PAGE { // 0x1C
2549 UCHAR PageCode : 6;
2550 UCHAR Reserved1: 1;
2551 UCHAR PageSavable : 1;
2552
2553 UCHAR PageLength; // 0x0A
2554
2555#define FailReport_LogErr 0x01
2556#define FailReport_Test 0x04
2557#define FailReport_DExcept 0x08
2558#define FailReport_Perf 0x80
2559
2560 union {
2561 UCHAR Flags;
2562 struct {
2563 UCHAR LogErr : 1;
2564 UCHAR Reserved1 : 1;
2565 UCHAR Test : 1;
2566 UCHAR DExcept : 1;
2567 UCHAR Reserved2 : 3;
2568 UCHAR Perf : 1;
2571
2572 union {
2573 UCHAR Flags;
2574 struct {
2575 UCHAR MRIE : 4;
2576 UCHAR Reserved1 : 4;
2579
2580 UCHAR IntervalTimer[4]; // 1unit = 100ms
2581 UCHAR ReportCount[4];
2583
2584//*********************************************************************************************
2585// Define Time-out and Protect page.
2586
2587typedef struct _MODE_TIMEOUT_AND_PROTECT_PAGE { // 0x1D
2588 UCHAR PageCode : 6;
2589 UCHAR Reserved1: 1;
2590 UCHAR PageSavable : 1;
2591
2592 UCHAR PageLength; // 0x08
2593
2594 UCHAR Reserved2[2];
2595
2596#define Timeout_SW 0x01
2597#define Timeout_DISP 0x02
2598#define Timeout_TMOE 0x04
2599
2600 union {
2601 UCHAR Flags;
2602 struct {
2603 UCHAR SW : 1;
2604 UCHAR DISP : 1;
2605 UCHAR TMOE : 1;
2606 UCHAR Reserved : 5;
2609
2611
2612 UCHAR Group1_Timeout[2]; // 1unit = 1s
2613 UCHAR Group2_Timeout[2]; // 1unit = 1s
2615
2616//*********************************************************************************************
2617// Define Philips CD-R(W) Sector Mode page.
2618
2619typedef struct _MODE_PHILIPS_SECTOR_TYPE_PAGE { // 0x21
2620 UCHAR PageCode : 6;
2621 UCHAR Reserved1 : 1;
2622 UCHAR PSBit : 1;
2623
2625
2626 UCHAR Reserved0[2];
2627
2628 union {
2629 UCHAR Flags;
2630 struct {
2631 UCHAR DataBlockType: 4; // 8
2632 UCHAR Reserved2: 4;
2635
2636#define WParams_Philips_CreateNewTrack 0
2637
2638 UCHAR Track;
2639 UCHAR ISRC[9];
2640
2641 UCHAR Reserved3[2];
2643
2644//*********************************************************************************************
2645// Define CD-X Capabilities and Mechanical Status page.
2646
2647typedef struct _MODE_CAPABILITIES_PAGE2 { // 0x2A
2648 UCHAR PageCode : 6;
2649 UCHAR Reserved1 : 1;
2650 UCHAR PSBit : 1;
2651
2653
2654#define DevCap_read_cd_r 0x01 // reserved in 1.2
2655#define DevCap_read_cd_rw 0x02 // reserved in 1.2
2656#define DevCap_method2 0x04
2657#define DevCap_read_dvd_rom 0x08
2658#define DevCap_read_dvd_r 0x10
2659#define DevCap_read_dvd_ram 0x20
2660
2661 UCHAR ReadCap; // DevCap_*_read
2662/* UCHAR cd_r_read : 1; // reserved in 1.2
2663 UCHAR cd_rw_read : 1; // reserved in 1.2
2664 UCHAR method2 : 1;
2665 UCHAR dvd_rom : 1;
2666 UCHAR dvd_r_read : 1;
2667 UCHAR dvd_ram_read : 1;
2668 UCHAR Reserved2 : 2;*/
2669
2670#define DevCap_write_cd_r 0x01 // reserved in 1.2
2671#define DevCap_write_cd_rw 0x02 // reserved in 1.2
2672#define DevCap_test_write 0x04
2673#define DevCap_write_dvd_r 0x10
2674#define DevCap_write_dvd_ram 0x20
2675
2676 UCHAR WriteCap; // DevCap_*_write
2677/* UCHAR cd_r_write : 1; // reserved in 1.2
2678 UCHAR cd_rw_write : 1; // reserved in 1.2
2679 UCHAR test_write : 1;
2680 UCHAR reserved3a : 1;
2681 UCHAR dvd_r_write : 1;
2682 UCHAR dvd_ram_write : 1;
2683 UCHAR Reserved3 : 2;*/
2684
2685#define DevCap_audio_play 0x01
2686#define DevCap_composite 0x02
2687#define DevCap_digport1 0x04
2688#define DevCap_digport2 0x08
2689#define DevCap_mode2_form1 0x10
2690#define DevCap_mode2_form2 0x20
2691#define DevCap_multisession 0x40
2692
2694/* UCHAR audio_play : 1;
2695 UCHAR composite : 1;
2696 UCHAR digport1 : 1;
2697 UCHAR digport2 : 1;
2698 UCHAR mode2_form1 : 1;
2699 UCHAR mode2_form2 : 1;
2700 UCHAR multisession : 1;
2701 UCHAR Reserved4 : 1;*/
2702
2703#define DevCap_cdda 0x01
2704#define DevCap_cdda_accurate 0x02
2705#define DevCap_rw_supported 0x04
2706#define DevCap_rw_corr 0x08
2707#define DevCap_c2_pointers 0x10
2708#define DevCap_isrc 0x20
2709#define DevCap_upc 0x40
2710#define DevCap_read_bar_code 0x80
2711
2713/* UCHAR cdda : 1;
2714 UCHAR cdda_accurate : 1;
2715 UCHAR rw_supported : 1;
2716 UCHAR rw_corr : 1;
2717 UCHAR c2_pointers : 1;
2718 UCHAR isrc : 1;
2719 UCHAR upc : 1;
2720 UCHAR Reserved5 : 1;*/
2721
2722#define DevCap_lock 0x01
2723#define DevCap_lock_state 0x02
2724#define DevCap_prevent_jumper 0x04
2725#define DevCap_eject 0x08
2726#define DevCap_mechtype_mask 0xE0
2727#define DevCap_mechtype_caddy 0x00
2728#define DevCap_mechtype_tray (0x01<<5)
2729#define DevCap_mechtype_popup (0x02<<5)
2730#define DevCap_mechtype_individual_changer (0x04<<5)
2731#define DevCap_mechtype_cartridge_changer (0x05<<5)
2732
2734/* UCHAR lock : 1;
2735 UCHAR lock_state : 1;
2736 UCHAR prevent_jumper : 1;
2737 UCHAR eject : 1;
2738 UCHAR Reserved6 : 1;
2739 UCHAR mechtype : 3;*/
2740
2741#define DevCap_separate_volume 0x01
2742#define DevCap_separate_mute 0x02
2743#define DevCap_disc_present 0x04 // reserved in 1.2
2744#define DevCap_sw_slot_select 0x08 // reserved in 1.2
2745#define DevCap_change_side_cap 0x10
2746#define DevCap_rw_leadin_read 0x20
2747
2749/* UCHAR separate_volume : 1;
2750 UCHAR separate_mute : 1;
2751 UCHAR disc_present : 1; // reserved in 1.2
2752 UCHAR sss : 1; // reserved in 1.2
2753 UCHAR Reserved7 : 4;*/
2754
2757 UCHAR BufferSize[2];
2759
2761
2763/* UCHAR Reserved9 : 1;
2764 UCHAR BCK : 1;
2765 UCHAR RCK : 1;
2766 UCHAR LSBF : 1;
2767 UCHAR Length : 2;
2768 UCHAR Reserved10 : 2;*/
2769
2773 UCHAR Reserved11[2];
2774
2775// MMC3
2776
2778
2780/* UCHAR RCS : 2; // rotation control selected
2781 UCHAR Reserved13 : 6; */
2782
2785
2786// LUN_WRITE_PERF_DESC LunWPerfDescriptor[0];
2787
2789
2790typedef struct _LUN_WRITE_PERF_DESC {
2792
2793#define LunWPerf_RotCtrl_Mask 0x07
2794#define LunWPerf_RotCtrl_CLV 0x00
2795#define LunWPerf_RotCtrl_CAV 0x01
2796
2798 UCHAR WriteSpeedSupported[2]; // kbps
2799
2801
2802// Mode parameter list block descriptor -
2803// set the block length for reading/writing
2804
2805#define MODE_BLOCK_DESC_LENGTH 8
2806#define MODE_HEADER_LENGTH 4
2807#define MODE_HEADER_LENGTH10 8
2808
2809#define CDB_USE_MSF 0x01
2810
2811// Atapi 2.5 changer
2813 UCHAR CurrentSlot : 5;
2814 UCHAR ChangerState : 2;
2815 UCHAR Fault : 1;
2816 UCHAR Reserved : 5;
2822
2823typedef struct _SLOT_TABLE_INFORMATION {
2824 UCHAR DiscChanged : 1;
2825 UCHAR Reserved : 6;
2826 UCHAR DiscPresent : 1;
2827 UCHAR Reserved2[3];
2829
2830typedef struct _MECHANICAL_STATUS {
2834
2835// DVD structure blocks
2836
2841
2862
2863typedef struct _DVD_COPYRIGHT_INFORMATION {
2866 UCHAR Reserved[2];
2868
2869typedef struct _DVD_DISK_KEY_STRUCTURES {
2870 UCHAR DiskKeyData[2048];
2872
2873typedef struct _CDVD_KEY_HEADER {
2874 UCHAR DataLength[2];
2875 UCHAR Reserved[2];
2877
2878typedef struct _CDVD_REPORT_AGID_DATA {
2880 UCHAR Reserved1[3];
2881 UCHAR Reserved2 : 6;
2882 UCHAR AGID : 2;
2884
2885typedef struct _CDVD_CHALLENGE_KEY_DATA {
2888 UCHAR Reserved[2];
2890
2891typedef struct _CDVD_KEY_DATA {
2893 UCHAR Key[5];
2894 UCHAR Reserved[3];
2896
2897typedef struct _CDVD_REPORT_ASF_DATA {
2899 UCHAR Reserved1[3];
2900 UCHAR Success : 1;
2901 UCHAR Reserved2 : 7;
2903
2904typedef struct _CDVD_TITLE_KEY_HEADER {
2907 UCHAR Reserved1[1];
2908 UCHAR Reserved2 : 3;
2909 UCHAR CGMS : 2;
2910 UCHAR CP_SEC : 1;
2911 UCHAR CPM : 1;
2912 UCHAR Zero : 1;
2915
2921
2922typedef struct _DVD_RPC_KEY {
2930
2935
2936
2937#pragma pack(pop)
2938
2939#endif //__CDRW_DEVICE_H__
struct _DVD_DESCRIPTOR_HEADER DVD_DESCRIPTOR_HEADER
struct _DVD_DESCRIPTOR_HEADER * PDVD_DESCRIPTOR_HEADER
struct _READ_TOC_FULL_TOC READ_TOC_FULL_TOC
struct _DVD_COPYRIGHT_INFORMATION * PDVD_COPYRIGHT_INFORMATION
struct _READ_TOC_CD_TEXT READ_TOC_CD_TEXT
struct _CDVD_REPORT_ASF_DATA CDVD_REPORT_ASF_DATA
struct _MODE_TIMEOUT_AND_PROTECT_PAGE MODE_TIMEOUT_AND_PROTECT_PAGE
struct _LUN_WRITE_PERF_DESC * PLUN_WRITE_PERF_DESC
struct _EVENT_STAT_PM_BLOCK EVENT_STAT_PM_BLOCK
struct _READ_TOC_CD_TEXT * PREAD_TOC_CD_TEXT
struct _MODE_CD_PARAMS_PAGE MODE_CD_PARAMS_PAGE
struct _INQUIRYDATA * PINQUIRYDATA
struct _EVENT_STAT_HEADER EVENT_STAT_HEADER
struct _MODE_CAPABILITIES_PAGE2 * PMODE_CAPABILITIES_PAGE2
struct _READ_TOC_TOC * PREAD_TOC_TOC
struct _FORMAT_UNIT_PARAMETER_LIST * PFORMAT_UNIT_PARAMETER_LIST
struct _MODE_PHILIPS_SECTOR_TYPE_PAGE * PMODE_PHILIPS_SECTOR_TYPE_PAGE
struct _TOC_SES_INFO TOC_SES_INFO
struct _READ_CAPACITY_DATA * PREAD_CAPACITY_DATA
struct _EVENT_STAT_OPERATIONAL_BLOCK EVENT_STAT_OPERATIONAL_BLOCK
struct _MODE_POWER_CONDITION_PAGE * PMODE_POWER_CONDITION_PAGE
struct _MODE_CD_AUDIO_CONTROL_PAGE MODE_CD_AUDIO_CONTROL_PAGE
struct _SLOT_TABLE_INFORMATION SLOT_TABLE_INFORMATION
struct _MODE_FAIL_REPORT_PAGE * PMODE_FAIL_REPORT_PAGE
struct _EVENT_STAT_MEDIA_BLOCK EVENT_STAT_MEDIA_BLOCK
struct _TRACK_INFO_BLOCK TRACK_INFO_BLOCK
struct _CDVD_KEY_HEADER * PCDVD_KEY_HEADER
struct _MODE_CACHING_PAGE * PMODE_CACHING_PAGE
struct _READ_TOC_HEADER READ_TOC_HEADER
union _CDB CDB
struct _MODE_WRITE_PARAMS_PAGE MODE_WRITE_PARAMS_PAGE
struct _EVENT_STAT_PM_BLOCK * PEVENT_STAT_PM_BLOCK
struct _READ_TOC_SES * PREAD_TOC_SES
struct _MODE_PARM_READ_WRITE * PMODE_PARM_READ_WRITE_DATA
struct _CD_TEXT_PACK_DATA CD_TEXT_PACK_DATA
struct _EVENT_STAT_DEV_BUSY_BLOCK * PEVENT_STAT_DEV_BUSY_BLOCK
struct _READ_CAPACITY_DATA READ_CAPACITY_DATA
struct _SLOT_TABLE_INFORMATION * PSLOT_TABLE_INFORMATION
struct _TOC_TRACK_INFO TOC_TRACK_INFO
struct _MODE_WRITE_PARAMS_PAGE_3 * PMODE_WRITE_PARAMS_PAGE_3
struct _DISC_INFO_BLOCK * PDISC_INFO_BLOCK
struct _MODE_READ_RECOVERY_PAGE * PMODE_READ_RECOVERY_PAGE
struct _MODE_READ_WRITE_RECOVERY_PAGE * PMODE_READ_WRITE_RECOVERY_PAGE
READ_TOC_FULL_TOC READ_TOC_PMA
Definition: scsi.h:1598
struct _READ_TOC_SES READ_TOC_SES
struct _MODE_CD_PARAMS_PAGE * PMODE_CD_PARAMS_PAGE
struct _FORMAT_LIST_HEADER * PFORMAT_LIST_HEADER
struct _MODE_READ_RECOVERY_PAGE MODE_READ_RECOVERY_PAGE
struct _MODE_POWER_CONDITION_PAGE MODE_POWER_CONDITION_PAGE
struct _MECHANICAL_STATUS * PMECHANICAL_STATUS
struct _DISC_INFO_BLOCK DISC_INFO_BLOCK
struct _CDVD_KEY_DATA * PCDVD_KEY_DATA
struct _MODE_PHILIPS_SECTOR_TYPE_PAGE MODE_PHILIPS_SECTOR_TYPE_PAGE
struct _READ_TOC_ATIP * PREAD_TOC_ATIP
struct _CDRW_FORMAT_DESCRIPTOR * PCDRW_FORMAT_DESCRIPTOR
struct _MODE_PARAMETER_HEADER10 MODE_PARAMETER_HEADER10
struct _CDVD_TITLE_KEY_HEADER CDVD_TITLE_KEY_HEADER
struct _EVENT_STAT_HEADER * PEVENT_STAT_HEADER
struct _DVD_LAYER_DESCRIPTOR DVD_LAYER_DESCRIPTOR
struct _SENSE_DATA * PSENSE_DATA
struct _CD_TEXT_PACK_DATA * PCD_TEXT_PACK_DATA
struct _FORMAT_UNIT_PARAMETER_LIST FORMAT_UNIT_PARAMETER_LIST
struct _MODE_CAPABILITIES_PAGE2 MODE_CAPABILITIES_PAGE2
struct _FORMAT_CAPACITIES_DATA FORMAT_CAPACITIES_DATA
struct _CDDA_PORT_CONTROL CDDA_PORT_CONTROL
struct _FORMAT_CAPACITIES_DATA * PFORMAT_CAPACITIES_DATA
struct _MODE_CACHING_PAGE MODE_CACHING_PAGE
struct _EVENT_STAT_MEDIA_BLOCK * PEVENT_STAT_MEDIA_BLOCK
struct _MODE_PARAMETER_HEADER MODE_PARAMETER_HEADER
struct _MODE_WRITE_PARAMS_PAGE_3 MODE_WRITE_PARAMS_PAGE_3
struct _CDVD_CHALLENGE_KEY_DATA CDVD_CHALLENGE_KEY_DATA
struct _TOC_TRACK_INFO * PTOC_TRACK_INFO
struct _CDVD_REPORT_ASF_DATA * PCDVD_REPORT_ASF_DATA
struct _MECHANICAL_STATUS_INFORMATION_HEADER MECHANICAL_STATUS_INFORMATION_HEADER
struct _SCSI_EXTENDED_MESSAGE * PSCSI_EXTENDED_MESSAGE
struct _READ_TOC_FULL_TOC * PREAD_TOC_FULL_TOC
struct _READ_TOC_HEADER * PREAD_TOC_HEADER
struct _MODE_PARAMETER_HEADER10 * PMODE_PARAMETER_HEADER10
struct _FORMATTABLE_CAPACITY_DESCRIPTOR FORMATTABLE_CAPACITY_DESCRIPTOR
struct _OPC_INFO_BLOCK OPC_INFO_BLOCK
struct _BUFFER_CAPACITY_BLOCK * PBUFFER_CAPACITY_BLOCK
struct _MODE_CD_AUDIO_CONTROL_PAGE * PMODE_CD_AUDIO_CONTROL_PAGE
struct _DVD_COPYRIGHT_DESCRIPTOR DVD_COPYRIGHT_DESCRIPTOR
struct _SENSE_DATA SENSE_DATA
struct _DVD_COPYRIGHT_INFORMATION DVD_COPYRIGHT_INFORMATION
struct _BUFFER_CAPACITY_BLOCK BUFFER_CAPACITY_BLOCK
struct _CDVD_REPORT_AGID_DATA * PCDVD_REPORT_AGID_DATA
struct _EVENT_STAT_DEV_BUSY_BLOCK EVENT_STAT_DEV_BUSY_BLOCK
struct _FORMAT_LIST_HEADER FORMAT_LIST_HEADER
struct _MODE_PARM_READ_WRITE MODE_PARM_READ_WRITE_DATA
struct _DVD_RPC_KEY * PDVD_RPC_KEY
struct _CDVD_CHALLENGE_KEY_DATA * PCDVD_CHALLENGE_KEY_DATA
struct _REPORT_LUNS_INFO_HDR * PREPORT_LUNS_INFO_HDR
struct _CDRW_FORMAT_DESCRIPTOR CDRW_FORMAT_DESCRIPTOR
struct _DVD_DISK_KEY_STRUCTURES * PDVD_DISK_KEY_STRUCTURES
struct _MODE_WRITE_PARAMS_PAGE * PMODE_WRITE_PARAMS_PAGE
struct _OPC_INFO_BLOCK * POPC_INFO_BLOCK
struct _FORMATTABLE_CAPACITY_DESCRIPTOR * PFORMATTABLE_CAPACITY_DESCRIPTOR
struct _DVD_DISK_KEY_STRUCTURES DVD_DISK_KEY_STRUCTURES
struct _MECHANICAL_STATUS MECHANICAL_STATUS
struct _CDDA_PORT_CONTROL * PCDDA_PORT_CONTROL
struct _READ_CAPACITY16_DATA READ_CAPACITY16_DATA
struct _EVENT_STAT_OPERATIONAL_BLOCK * PEVENT_STAT_OPERATIONAL_BLOCK
struct _CDVD_TITLE_KEY_HEADER * PCDVD_TITLE_KEY_HEADER
struct _REPORT_LUNS_INFO_HDR REPORT_LUNS_INFO_HDR
struct _SCSI_EXTENDED_MESSAGE SCSI_EXTENDED_MESSAGE
struct _MODE_READ_WRITE_RECOVERY_PAGE MODE_READ_WRITE_RECOVERY_PAGE
struct _DVD_RPC_KEY DVD_RPC_KEY
struct _INQUIRYDATA INQUIRYDATA
struct _READ_CAPACITY16_DATA * PREAD_CAPACITY16_DATA
union _CDB * PCDB
struct _MODE_PARAMETER_BLOCK * PMODE_PARAMETER_BLOCK
struct _TRACK_INFO_BLOCK * PTRACK_INFO_BLOCK
struct _READ_TOC_ATIP READ_TOC_ATIP
struct _CDVD_KEY_DATA CDVD_KEY_DATA
#define MAXIMUM_NUMBER_OF_TRACKS
Definition: scsi.h:800
struct _TOC_SES_INFO * PTOC_SES_INFO
struct _DVD_LAYER_DESCRIPTOR * PDVD_LAYER_DESCRIPTOR
struct _CAPACITY_LIST_HEADER * PCAPACITY_LIST_HEADER
struct _CDVD_REPORT_AGID_DATA CDVD_REPORT_AGID_DATA
struct _MODE_PARAMETER_BLOCK MODE_PARAMETER_BLOCK
struct _READ_TOC_TOC READ_TOC_TOC
struct _MODE_FAIL_REPORT_PAGE MODE_FAIL_REPORT_PAGE
struct _MODE_PARAMETER_HEADER * PMODE_PARAMETER_HEADER
struct _CAPACITY_LIST_HEADER CAPACITY_LIST_HEADER
#define MAXIMUM_NUMBER_OF_SESSIONS
Definition: scsi.h:801
struct _MECHANICAL_STATUS_INFORMATION_HEADER * PMECHANICAL_STATUS_INFORMATION_HEADER
struct _DVD_COPYRIGHT_DESCRIPTOR * PDVD_COPYRIGHT_DESCRIPTOR
struct _MODE_TIMEOUT_AND_PROTECT_PAGE * PMODE_TIMEOUT_AND_PROTECT_PAGE
struct _CDVD_KEY_HEADER CDVD_KEY_HEADER
PREAD_TOC_FULL_TOC PREAD_TOC_PMA
Definition: scsi.h:1599
struct _LUN_WRITE_PERF_DESC LUN_WRITE_PERF_DESC
_In_ ULONG _In_ ULONG _In_ ULONG Length
Definition: ntddpcm.h:102
UCHAR BlankBufferLength[4]
Definition: cdrw_hw.h:1878
union _CDB::_BLANK_MEDIA::@772 Byte1
UCHAR Reserved2[6]
Definition: cdrw_hw.h:645
UCHAR OperationCode
Definition: cdrw_hw.h:634
struct _CDB::_BLANK_MEDIA::@772::@773 Fields
UCHAR StartAddr_TrkNum[4]
Definition: cdrw_hw.h:644
UCHAR Reserved2
Definition: cdrw_hw.h:119
UCHAR Control
Definition: cdrw_hw.h:121
UCHAR OperationCode
Definition: cdrw_hw.h:112
UCHAR DisablePageOut
Definition: cdrw_hw.h:116
UCHAR LBA[4]
Definition: cdrw_hw.h:118
UCHAR RelativeAddress
Definition: cdrw_hw.h:113
UCHAR ForceUnitAccess
Definition: cdrw_hw.h:115
UCHAR TransferBlocks[2]
Definition: cdrw_hw.h:120
UCHAR Reserved1
Definition: cdrw_hw.h:114
UCHAR Lun
Definition: cdrw_hw.h:117
struct _CDB::_CDB12READWRITE::@780::@781 Fields
union _CDB::_CDB12READWRITE::@780 Byte1
UCHAR NumOfBlocks[4]
Definition: cdrw_hw.h:797
UCHAR OperationCode
Definition: cdrw_hw.h:780
UCHAR NumOfBlocks[4]
Definition: scsi.h:764
struct _CDB::_CDB16READWRITE::@1191::@1192 Fields
UCHAR OperationCode
Definition: scsi.h:752
UCHAR Reserved14_5_6
Definition: scsi.h:766
UCHAR LBA[8]
Definition: scsi.h:763
union _CDB::_CDB16READWRITE::@1191 Byte1
UCHAR FormatCode
Definition: cdrw_hw.h:99
UCHAR FReserved2
Definition: cdrw_hw.h:107
union _CDB::_CDB6FORMAT::@752 Byte1
UCHAR Interleave[2]
Definition: cdrw_hw.h:106
struct _CDB::_CDB6FORMAT::@752::@753 Fields
UCHAR OperationCode
Definition: cdrw_hw.h:95
UCHAR FReserved1
Definition: cdrw_hw.h:105
UCHAR AllocationLength
Definition: cdrw_hw.h:71
UCHAR OperationCode
Definition: cdrw_hw.h:66
UCHAR Lun
Definition: cdrw_hw.h:35
UCHAR VendorUnique
Definition: cdrw_hw.h:40
UCHAR Reserved
Definition: cdrw_hw.h:39
UCHAR Immediate
Definition: cdrw_hw.h:33
UCHAR OperationCode
Definition: cdrw_hw.h:32
UCHAR Link
Definition: cdrw_hw.h:37
UCHAR CommandUniqueBytes[3]
Definition: cdrw_hw.h:36
UCHAR CommandUniqueBits
Definition: cdrw_hw.h:34
UCHAR Flag
Definition: cdrw_hw.h:38
union _CDB::_CLOSE_TRACK_SESSION::@767 Byte2
union _CDB::_CLOSE_TRACK_SESSION::@766 Byte1
struct _CDB::_CLOSE_TRACK_SESSION::@766::@768 Fields
UCHAR ERA
Definition: scsi.h:105
UCHAR Reserved2
Definition: scsi.h:109
UCHAR Lun
Definition: scsi.h:107
UCHAR LBA[4]
Definition: scsi.h:108
UCHAR Control
Definition: scsi.h:111
UCHAR OperationCode
Definition: scsi.h:102
UCHAR Reserved
Definition: scsi.h:103
UCHAR Reserved1
Definition: scsi.h:106
UCHAR Immediate
Definition: scsi.h:104
UCHAR TransferBlocks[2]
Definition: scsi.h:110
UCHAR Reserved1
Definition: cdrw_hw.h:81
UCHAR Long
Definition: cdrw_hw.h:79
UCHAR Reserved2[3]
Definition: cdrw_hw.h:83
UCHAR Control
Definition: cdrw_hw.h:84
UCHAR OperationCode
Definition: cdrw_hw.h:78
UCHAR Immediate
Definition: cdrw_hw.h:80
UCHAR Lun
Definition: cdrw_hw.h:82
union _CDB::_GET_CONFIGURATION::@774 Byte1
struct _CDB::_GET_CONFIGURATION::@774::@775 Fields
UCHAR AllocationLength[2]
Definition: cdrw_hw.h:734
UCHAR StartFeatureNum[2]
Definition: cdrw_hw.h:732
struct _CDB::_GET_EVENT_STATUS::@760::@761 Fields
UCHAR AllocationLength[2]
Definition: cdrw_hw.h:476
union _CDB::_GET_EVENT_STATUS::@760 Byte1
UCHAR Reserved4[3]
Definition: cdrw_hw.h:438
UCHAR OperationCode
Definition: cdrw_hw.h:431
UCHAR Reserved5[3]
Definition: cdrw_hw.h:440
UCHAR Reserved2[2]
Definition: cdrw_hw.h:434
UCHAR Reserved0[9]
Definition: cdrw_hw.h:452
UCHAR OperationCode
Definition: cdrw_hw.h:451
UCHAR Control
Definition: cdrw_hw.h:373
UCHAR PageCode
Definition: cdrw_hw.h:367
UCHAR ParameterPointer[2]
Definition: cdrw_hw.h:371
UCHAR OperationCode
Definition: cdrw_hw.h:362
UCHAR Reserved2
Definition: cdrw_hw.h:369
UCHAR AllocationLength[2]
Definition: cdrw_hw.h:372
UCHAR Reserved3
Definition: cdrw_hw.h:370
UCHAR Reserved1
Definition: cdrw_hw.h:365
UCHAR PPCBit
Definition: cdrw_hw.h:364
UCHAR Reserved0[7]
Definition: cdrw_hw.h:445
UCHAR AllocationLength[2]
Definition: cdrw_hw.h:446
UCHAR OperationCode
Definition: cdrw_hw.h:444
UCHAR Reserved2[2]
Definition: cdrw_hw.h:447
UCHAR Reserved2[2]
Definition: cdrw_hw.h:404
UCHAR Reserved2[5]
Definition: cdrw_hw.h:356
UCHAR ParameterListLength[2]
Definition: cdrw_hw.h:357
UCHAR OperationCode
Definition: cdrw_hw.h:340
UCHAR Reserved2[2]
Definition: cdrw_hw.h:345
UCHAR ParameterListLength
Definition: cdrw_hw.h:346
UCHAR Reserved3[4]
Definition: cdrw_hw.h:333
UCHAR AllocationLength[2]
Definition: cdrw_hw.h:334
UCHAR OperationCode
Definition: cdrw_hw.h:312
UCHAR AllocationLength
Definition: cdrw_hw.h:320
UCHAR TransferBlock[2]
Definition: cdrw_hw.h:822
UCHAR Reserved2[6]
Definition: cdrw_hw.h:133
UCHAR StartingMSF[3]
Definition: cdrw_hw.h:190
UCHAR EndingMSF[3]
Definition: cdrw_hw.h:191
UCHAR TransferBlock[4]
Definition: cdrw_hw.h:811
UCHAR IncludeSyncData
Definition: cdrw_hw.h:256
UCHAR Ending_MSF[3]
Definition: cdrw_hw.h:249
UCHAR Starting_MSF[3]
Definition: cdrw_hw.h:248
UCHAR ExpectedSectorType
Definition: cdrw_hw.h:244
UCHAR IncludeUserData
Definition: cdrw_hw.h:254
UCHAR SubChannelSelection
Definition: cdrw_hw.h:258
UCHAR OperationCode
Definition: cdrw_hw.h:240
UCHAR LBA[4]
Definition: cdrw_hw.h:272
UCHAR Reserved3
Definition: cdrw_hw.h:275
UCHAR IncludeUserData
Definition: cdrw_hw.h:278
UCHAR SubChannelSelection
Definition: cdrw_hw.h:282
UCHAR NumOfBlocks[3]
Definition: cdrw_hw.h:273
UCHAR Reserved1
Definition: cdrw_hw.h:270
UCHAR IncludeEDC
Definition: cdrw_hw.h:277
UCHAR IncludeSyncData
Definition: cdrw_hw.h:280
UCHAR ExpectedSectorType
Definition: cdrw_hw.h:269
UCHAR Reserved4
Definition: cdrw_hw.h:283
UCHAR HeaderCode
Definition: cdrw_hw.h:279
UCHAR Control
Definition: cdrw_hw.h:285
UCHAR Reserved0
Definition: scsi.h:271
UCHAR ErrorFlags
Definition: cdrw_hw.h:276
UCHAR OperationCode
Definition: cdrw_hw.h:265
UCHAR Reserved2[3]
Definition: cdrw_hw.h:493
UCHAR AllocationLength[2]
Definition: cdrw_hw.h:492
struct _CDB::_READ_FORMAT_CAPACITIES::@758::@759 Fields
union _CDB::_READ_FORMAT_CAPACITIES::@758 Byte1
UCHAR OperationCode
Definition: cdrw_hw.h:149
UCHAR Reserved1
Definition: cdrw_hw.h:152
UCHAR Format
Definition: cdrw_hw.h:158
UCHAR AllocationLength[2]
Definition: cdrw_hw.h:165
UCHAR Reserved2[3]
Definition: cdrw_hw.h:163
UCHAR Reserved
Definition: cdrw_hw.h:159
UCHAR Control
Definition: cdrw_hw.h:166
UCHAR Reserved0
Definition: cdrw_hw.h:150
union _CDB::_READ_TOC::@754 Byte2
UCHAR Start_TrackSes
Definition: cdrw_hw.h:164
struct _CDB::_READ_TOC::@754::@755 Fields
UCHAR AllocationLength[2]
Definition: cdrw_hw.h:527
UCHAR AllocationLength[2]
Definition: cdrw_hw.h:509
UCHAR OperationCode
Definition: cdrw_hw.h:668
UCHAR LBA[4]
Definition: cdrw_hw.h:671
UCHAR Reserved2[2]
Definition: cdrw_hw.h:672
UCHAR AllocationLength[2]
Definition: cdrw_hw.h:673
UCHAR AllocationLength[4]
Definition: scsi.h:700
UCHAR Reserved2[1]
Definition: scsi.h:701
UCHAR Reserved1[5]
Definition: scsi.h:699
UCHAR Control
Definition: scsi.h:702
UCHAR OperationCode
Definition: scsi.h:698
UCHAR Reserved1[2]
Definition: cdrw_hw.h:47
UCHAR AllocationLength
Definition: cdrw_hw.h:48
UCHAR Reserved2[3]
Definition: scsi.h:533
UCHAR Control
Definition: cdrw_hw.h:382
UCHAR OperationCode
Definition: cdrw_hw.h:377
UCHAR Reserved1
Definition: cdrw_hw.h:378
UCHAR Reserved2[3]
Definition: cdrw_hw.h:381
UCHAR LBA[4]
Definition: cdrw_hw.h:380
UCHAR Lun
Definition: cdrw_hw.h:379
UCHAR Reserved0[5]
Definition: cdrw_hw.h:774
UCHAR AllocationLength[3]
Definition: cdrw_hw.h:775
UCHAR Reserved2[6]
Definition: cdrw_hw.h:660
UCHAR KeyFormat
Definition: cdrw_hw.h:662
UCHAR Reserved1
Definition: cdrw_hw.h:658
UCHAR OperationCode
Definition: cdrw_hw.h:657
UCHAR ParameterListLength[2]
Definition: cdrw_hw.h:661
UCHAR Control
Definition: cdrw_hw.h:664
union _CDB::_SEND_OPC_INFO::@776 Byte1
struct _CDB::_SEND_OPC_INFO::@776::@778 Fields
UCHAR AllocationLength[2]
Definition: cdrw_hw.h:768
UCHAR Reserved1[6]
Definition: cdrw_hw.h:599
UCHAR WriteSpeed[2]
Definition: cdrw_hw.h:598
UCHAR ReadSpeed[2]
Definition: cdrw_hw.h:597
UCHAR ReadAheadLBA[4]
Definition: cdrw_hw.h:742
UCHAR TriggerLBA[4]
Definition: cdrw_hw.h:741
UCHAR OperationCode
Definition: cdrw_hw.h:389
UCHAR FormatLayerNumber
Definition: scsi.h:396
UCHAR PowerConditions
Definition: scsi.h:402
UCHAR Reserved2_2
Definition: scsi.h:397
UCHAR Reserved2[2]
Definition: cdrw_hw.h:393
UCHAR AllocationLength[2]
Definition: cdrw_hw.h:212
UCHAR OperationCode
Definition: cdrw_hw.h:201
UCHAR TrackNumber
Definition: cdrw_hw.h:211
UCHAR Reserved4[2]
Definition: cdrw_hw.h:210
union _CDB::_SYNCHRONIZE_CACHE::@770 Byte1
struct _CDB::_SYNCHRONIZE_CACHE::@770::@771 Fields
UCHAR Reserved2[3]
Definition: cdrw_hw.h:307
UCHAR RELADR
Definition: cdrw_hw.h:297
UCHAR Reserved1
Definition: cdrw_hw.h:301
UCHAR LBA[4]
Definition: cdrw_hw.h:304
UCHAR NumOfBlocks[2]
Definition: cdrw_hw.h:306
UCHAR Reserved0
Definition: cdrw_hw.h:298
UCHAR OperationCode
Definition: cdrw_hw.h:293
struct _CDB::_WRITE_CD::@756::@757 Fields
union _CDB::_WRITE_CD::@756 Byte1
UCHAR ChannelSelection
Definition: cdrw_hw.h:2829
struct _CDRW_FORMAT_DESCRIPTOR::@815::@816 Fields
CDVD_KEY_HEADER Header
Definition: cdrw_hw.h:3593
UCHAR ChallengeKeyValue[10]
Definition: cdrw_hw.h:3594
CDVD_KEY_HEADER Header
Definition: cdrw_hw.h:3599
UCHAR DataLength[2]
Definition: cdrw_hw.h:3581
CDVD_KEY_HEADER Header
Definition: cdrw_hw.h:3586
CDVD_KEY_HEADER Header
Definition: cdrw_hw.h:3605
UCHAR DataLength[2]
Definition: scsi.h:2906
CDVD_KEY_DATA TitleKey
Definition: cdrw_hw.h:3619
CDVD_KEY_HEADER Header
Definition: cdrw_hw.h:3612
union _CD_TEXT_PACK_DATA::@811 BlkNum_CharPos
UCHAR TextData[12]
Definition: cdrw_hw.h:1836
struct _CD_TEXT_PACK_DATA::@811::@812 Fields
UCHAR LastSesLeadInTime[4]
Definition: cdrw_hw.h:2333
UCHAR LastTrackNumLastSes
Definition: cdrw_hw.h:2296
UCHAR FirstTrackNumLastSes
Definition: cdrw_hw.h:2295
UCHAR Reserved0
Definition: scsi.h:2038
UCHAR LastSesLeadOutTime[4]
Definition: cdrw_hw.h:2334
UCHAR FirstTrackNum
Definition: cdrw_hw.h:2293
UCHAR DiskId[4]
Definition: cdrw_hw.h:2332
struct _DISC_INFO_BLOCK::@852::@854 Fields
UCHAR LastSesStat
Definition: cdrw_hw.h:2287
UCHAR LastTrackNumLastSes2
Definition: cdrw_hw.h:2331
UCHAR FirstTrackNumLastSes2
Definition: cdrw_hw.h:2330
UCHAR DiskBarCode[8]
Definition: cdrw_hw.h:2335
UCHAR DataLength[2]
Definition: cdrw_hw.h:2268
UCHAR DiskKeyData[2048]
Definition: cdrw_hw.h:3577
UCHAR EndDataSector[4]
Definition: scsi.h:2856
UCHAR NumberOfLayers
Definition: scsi.h:2851