-
Notifications
You must be signed in to change notification settings - Fork 1
/
BlindWrite5.bt
152 lines (145 loc) · 2.85 KB
/
BlindWrite5.bt
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
143
144
145
146
147
148
149
150
151
152
//------------------------------------------------
//--- 010 Editor v8.0.1 Binary Template
//
// File: BlindWrite5.bt
// Authors: Natalia Portillo
// Version: 0.1
// Purpose: BlindWrite 5 media descriptor.
// Category: Misc
// File Mask: *.b5t
// ID Bytes: 42 57 54 35 20 53 54 52 45 41 4D 20 53 49 47 4E //BWT5 STREAM SIGN
// History:
// 0.1 2018-01-08 Natalia Portillo: Initial release
//------------------------------------------------
typedef struct
{
uint type;
uint length;
uint unknown1[4];
uint offset;
uint unknown2[3];
int startLba;
int sectors;
uint filenameLen;
if(filenameLen > 0)
wchar_t filename[filenameLen/2];
uint unknown3;
} BW5DataFile <optimize=false>;
enum <byte> BW5TrackType
{
NotData = 0,
Audio = 1,
Mode1 = 2,
Mode2 = 3,
Mode2F1 = 4,
Mode2F2 = 5,
Dvd = 6
};
enum <byte> BW5SubchannelType
{
None = 0,
Q16 = 2,
Linear = 4
};
typedef struct
{
BW5TrackType type;
uchar unknown1[3];
uint unknown2;
BW5SubchannelType subchannel;
byte unknown3;
byte CONTROL;
byte ADR;
byte POINT;
byte TNO;
byte AMIN;
byte ASEC;
byte AFRAME;
byte PHOUR : 4;
byte AHOUR : 4;
byte PMIN;
byte PSEC;
byte PFRAME;
byte unknown5;
uint pregap;
uint unknown6[4];
int startLba;
int sectors;
uint unknown7[2];
uint session;
ushort unknown8;
if(type != Dvd && type != NotData)
uint unknown9[2];
} BW5TrackDescriptor <optimize=false>;
typedef struct
{
ushort sequence;
byte entries;
byte unknown;
int start;
int end;
ushort firstTrack;
ushort lastTrack;
if(entries > 0)
BW5TrackDescriptor tracks[entries];
} BW5Session <optimize=false>;
typedef struct
{
char magic[16];
uint unknown1[8];
ushort profile;
ushort sessions;
uint unknown2[3];
byte validMcn;
char mcn[13];
ushort unknown3;
uint unknown4[4];
ushort pmaLen;
ushort atipLen;
ushort cdtextLen;
ushort cdinfoLen;
uint bcaLen;
uint unknown5[3];
uint dvdstructuresLen;
uint dvdinfoLen;
char unknown6[32];
char manufacturer[8];
char product[16];
char revision[4];
char vendor[20];
char volumeId[32];
uint mode2ALen;
uint unknownBlockLen;
uint dataLen;
uint sessionsLen;
uint dpmLen;
if(mode2ALen > 0)
uchar mode2A[mode2ALen];
if(unknownBlockLen > 0)
uchar unknownBlock[unknownBlockLen];
if(pmaLen > 0)
uchar pma[pmaLen];
if(atipLen > 0)
uchar atip[atipLen];
if(cdtextLen > 0)
uchar cdtext[cdtextLen];
if(bcaLen > 0)
uchar bca[bcaLen];
if(dvdstructuresLen > 0)
uchar dvdstructures[dvdstructuresLen];
if(dvdinfoLen > 0)
uchar dvdinformation[dvdinfoLen];
else if(cdinfoLen > 0)
uchar cdinformation[dvdinfoLen];
uint dataBlockCount;
uint dataPathLen;
wchar_t dataPath[dataPathLen/2];
BW5DataFile dataBlocks[dataBlockCount];
BW5Session session[sessions];
if(dpmLen > 0)
uchar dpm[dpmLen];
uint unknown7;
char footer[16];
} BW5Header <optimize=false>;
LittleEndian();
BW5Header header;