-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathcdrom_mode.h
142 lines (129 loc) · 5.9 KB
/
cdrom_mode.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
/***************************************************************************
Aaru Data Preservation Suite
----------------------------------------------------------------------------
Filename : cdrom_mode.h
Author(s) : Natalia Portillo
Component : Aaru.Device.Report
--[ Description ] ----------------------------------------------------------
Contains definitions for CD-ROM MODE PAGE (2Ah).
--[ License ] --------------------------------------------------------------
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as
published by the Free Software Foundation, either version 3 of the
License, or (at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>.
----------------------------------------------------------------------------
Copyright © 2011-2020 Natalia Portillo
****************************************************************************/
#ifndef AARU_DEVICE_REPORT_CDROM_MODE_H
#define AARU_DEVICE_REPORT_CDROM_MODE_H
#pragma pack(push, 1)
typedef struct
{
uint8_t Reserved1;
uint8_t RotationControl : 3;
uint8_t Reserved2 : 5;
uint16_t WriteSpeed;
} ModePage_2A_WriteDescriptor;
#pragma pack(pop)
#pragma pack(push, 1)
typedef struct
{
uint8_t PageCode : 6;
uint8_t Reserved1 : 1;
/* Parameters can be saved */
uint8_t PS : 1;
uint8_t PageLength;
uint8_t ReadCDR : 1;
uint8_t ReadCDRW : 1;
uint8_t Method2 : 1;
uint8_t ReadDVDROM : 1;
uint8_t ReadDVDR : 1;
uint8_t ReadDVDRAM : 1;
uint8_t Reserved2 : 2;
uint8_t WriteCDR : 1;
uint8_t WriteCDRW : 1;
uint8_t TestWrite : 1;
uint8_t Reserved3 : 1;
uint8_t WriteDVDR : 1;
uint8_t WriteDVDRAM : 1;
uint8_t Reserved4 : 2;
/* Drive is capable of playing audio */
uint8_t AudioPlay : 1;
uint8_t Composite : 1;
uint8_t DigitalPort1 : 1;
uint8_t DigitalPort2 : 1;
/* Drive is capable of reading sectors in Mode 2 Form 1 format */
uint8_t Mode2Form1 : 1;
/* Drive is capable of reading sectors in Mode 2 Form 2 format */
uint8_t Mode2Form2 : 1;
/* Drive supports multi-session and/or Photo-CD */
uint8_t MultiSession : 1;
uint8_t BUF : 1;
/* Audio can be read as digital data */
uint8_t CDDACommand : 1;
/* Drive can continue from a loss of streaming on audio reading */
uint8_t AccurateCDDA : 1;
/* Drive can read interleaved and uncorrected R-W subchannels */
uint8_t Subchannel : 1;
/* Drive can read, deinterlave and correct R-W subchannels */
uint8_t DeinterlaveSubchannel : 1;
/* Drive can return C2 pointers */
uint8_t C2Pointer : 1;
/* Drive can return the media catalogue number */
uint8_t UPC : 1;
/* Drive can return the ISRC */
uint8_t ISRC : 1;
uint8_t ReadBarcode : 1;
/* Drive can lock media */
uint8_t Lock : 1;
/* Current lock status */
uint8_t LockState : 1;
/* Drive's optional prevent jumper status */
uint8_t PreventJumper : 1;
/* Drive can eject discs */
uint8_t Eject : 1;
uint8_t Reserved5 : 1;
/* Loading Mechanism Type */
uint8_t LoadingMechanism : 3;
/* Each channel's volume can be controlled independently */
uint8_t SeparateChannelVolume : 1;
/* Each channel can be muted independently */
uint8_t SeparateChannelMute : 1;
uint8_t SDP : 1;
uint8_t SSS : 1;
uint8_t SCC : 1;
uint8_t LeadInPW : 1;
uint8_t Reserved6 : 2;
/* Maximum drive speed in Kbytes/second */
uint16_t MaximumSpeed;
/* Supported volume levels */
uint16_t SupportedVolumeLevels;
/* Buffer size in Kbytes */
uint16_t BufferSize;
/* Current drive speed in Kbytes/second */
uint16_t CurrentSpeed;
uint8_t Reserved7;
uint8_t Reserved8 : 1;
uint8_t BCK : 1;
uint8_t RCK : 1;
uint8_t LSBF : 1;
uint8_t Length : 2;
uint8_t Reserved9 : 2;
uint16_t MaxWriteSpeed;
uint16_t CurrentWriteSpeed;
uint16_t CMRSupported;
uint8_t Reserved10[3];
uint8_t RotationControlSelected : 2;
uint8_t Reserved11 : 6;
uint16_t CurrentWriteSpeedSelected;
uint16_t LogicalWriteSpeedDescriptors;
ModePage_2A_WriteDescriptor WriteSpeedPerformanceDescriptors[56];
} ModePage_2A;
#pragma pack(pop)
#endif //AARU_DEVICE_REPORT_CDROM_MODE_H