-
Notifications
You must be signed in to change notification settings - Fork 4
/
MIBLiteGen2_0xD0000.BIN.bt
338 lines (284 loc) · 9.65 KB
/
MIBLiteGen2_0xD0000.BIN.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
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
//------------------------------------------------
//--- 010 Editor v13.0 Binary Template
//
// File: *.0xD0000.BIN
// Authors: Alex Strelets
// Version: 0.1
// Purpose: Parse the contents of the datasets of external amplifiers for MQB platform
// Category:
// File Mask:
// ID Bytes:
// History:
//------------------------------------------------
LittleEndian();
local ushort offset = FileSize() - 65536;
// ---------------------- START EQTool HEADER ---------------------
Printf("\nEQTools Header Offset: %i", offset);
if (offset > 0) {
struct {
char AmpName[13] <bgcolor=cDkGray, fgcolor=cGray>;
FSeek(24);
char HeaderCarPlatform[5] <bgcolor=cDkGray, fgcolor=cGray>;
char HeaderFwRevision[3] <bgcolor=cDkGray, fgcolor=cGray>;
FSeek(33);
struct Presets {
char Preset1[13] <bgcolor=cBlack, fgcolor=cDkGray>;
char Preset2[13] <bgcolor=cBlack, fgcolor=cDkGray>;
char Preset3[13] <bgcolor=cBlack, fgcolor=cDkGray>;
char Preset4[13] <bgcolor=cBlack, fgcolor=cDkGray>;
};
Presets SoundFocus;
Presets SoundCharacter;
Presets SoundCharacterRoofOpen;
} EQTool_Header;
FSeek(offset);
}
// ---------------------- END EQTool HEADER -----------------------
char CarPlatform[5] <bgcolor=cLtGreen>;
char FwRevision[3] <bgcolor=cLtGreen>;
struct {
struct AudioSource {
uint Frequency <bgcolor=cAqua>;
ubyte Q <bgcolor=cDkYellow, read=Str("%.1f", (float) this / 10)>;
struct {
ubyte HPF_6dB_Oct <bgcolor=cYellow, read=Str(this > 0 ? "Yes" : "No")>; // HPF 6dB/Oct
ubyte empty[2] <bgcolor=cBlack>;
} Slope;
};
AudioSource Entertainment;
AudioSource Announcement;
} DC_CutFilter;
struct {
struct Channel {
byte FrontLeft <bgcolor=cLtYellow>;
byte FrontRight <bgcolor=cPurple>;
byte FrontCenter <bgcolor=cDkPurple>;
byte Subwoofer <bgcolor=cDkAqua>;
byte RearLeft <bgcolor=cDkGreen>;
byte RearRight <bgcolor=cGreen>;
};
struct InputMode {
Channel LeftFront;
Channel RightFront;
Channel LeftRear;
Channel RightRear;
Channel Center;
Channel Subwoofer;
};
InputMode Ch20;
InputMode Ch51;
} MatrixMixer;
string getFilterType (ubyte value) {
if (value == 26) {
return "Bass";
} else if (value == 27) {
return "Treble";
} else if (value == 1) {
return "EQ";
}
return "None";
}
string getSignedFloat (short value) {
return Str("%.1f", (float) value / 10);
}
string getGain (float value) {
return Str("%.2f", value / 5);
};
string getPhase( char value) {
if ( (string) value == "Z") {
return "180'";
}
return "0'";
}
struct Band {
uint Frequency <bgcolor=cLtGreen>;
ubyte Q <bgcolor=cAqua, read=getSignedFloat>;
ubyte FilterType <bgcolor=cDkAqua, read=getFilterType>;
ubyte empty[2] <bgcolor=cBlack>;
};
struct {
Band Bands[5];
} UserEqFilters;
struct {
Band BassFilter;
Band TrebleFilter;
Band MiddleFilter;
} ToneEqFilters;
struct Steps {
short minus9 <bgcolor=cDkGreen, read=getSignedFloat>;
short minus8 <bgcolor=cDkGreen, read=getSignedFloat>;
short minus7 <bgcolor=cDkGreen, read=getSignedFloat>;
short minus6 <bgcolor=cDkGreen, read=getSignedFloat>;
short minus5 <bgcolor=cDkGreen, read=getSignedFloat>;
short minus4 <bgcolor=cDkGreen, read=getSignedFloat>;
short minus3 <bgcolor=cDkGreen, read=getSignedFloat>;
short minus2 <bgcolor=cDkGreen, read=getSignedFloat>;
short minus1 <bgcolor=cDkGreen, read=getSignedFloat>;
short zero0 <bgcolor=cAqua, read=getSignedFloat>;
short plus1 <bgcolor=cGreen, read=getSignedFloat>;
short plus2 <bgcolor=cGreen, read=getSignedFloat>;
short plus3 <bgcolor=cGreen, read=getSignedFloat>;
short plus4 <bgcolor=cGreen, read=getSignedFloat>;
short plus5 <bgcolor=cGreen, read=getSignedFloat>;
short plus6 <bgcolor=cGreen, read=getSignedFloat>;
short plus7 <bgcolor=cGreen, read=getSignedFloat>;
short plus8 <bgcolor=cGreen, read=getSignedFloat>;
short plus9 <bgcolor=cGreen, read=getSignedFloat>;
};
struct {
Steps BassGains;
Steps TrebbleGains;
Steps MiddleGains;
} ToneEqGains;
FSeek(276 + offset);
struct {
struct {
short Speed <bgcolor=cDkPurple, read=getSignedFloat>;
short Width <bgcolor=cDkAqua, read=getSignedFloat>;
} Levels[8];
byte GainSteps[19] <bgcolor=cGreen, read=getSignedFloat>;
} GALA;
FSeek(328 + offset);
struct {
byte Neutral <bgcolor=cYellow>;
byte Threshold <bgcolor=cPurple>;
byte Attack <bgcolor=cDkPurple, read=getSignedFloat>;
byte unknowns[5] <bgcolor=cBlack>;
byte GainSteps[19] <bgcolor=cGreen, read=getSignedFloat>;
} GADK;
FSeek(356 + offset);
struct {
struct F_Steps {
ushort Frequency <bgcolor=cGreen>;
short Gain <bgcolor=cDkGreen, read=getSignedFloat>;
ubyte Q <bgcolor=cGreen, read=getSignedFloat>;
byte FilterType <bgcolor=cDkGreen, read=getFilterType>;
byte empty[2] <bgcolor=cBlack>;
};
struct {
F_Steps SpeedSteps[19];
} SpeedBanks[3];
struct {
F_Steps RPM_Steps[18];
} RPM_Banks[2];
struct {
short Levels[8] <bgcolor=cLtYellow, read=getSignedFloat>;
} GainFactor;
struct {
short start <bgcolor=cDkYellow,read=getSignedFloat>;
short width <bgcolor=cYellow, read=getSignedFloat>;
} SpeedStep;
short RPM_Range[18] <bgcolor=cDkGreen>;
} GALA_F;
struct {
Band Bands[3];
struct {
ushort Band1 <bgcolor=cLtGreen, read=getSignedFloat>;
ushort Band2 <bgcolor=cGreen, read=getSignedFloat>;
ushort Band3 <bgcolor=cDkGreen, read=getSignedFloat>;
} GainSteps[16];
byte VolumeSteps[16] <bgcolor=cYellow, read=Str("%g", (float) this + 100)>;
} Loudness;
struct {
short unknown1 <bgcolor=cDkRed>;
short unknown2 <bgcolor=cDkRed>;
} UnknownSteps[20];
FSeek(1372 + offset);
struct Channels {
Steps LeftFront;
Steps RightFront;
Steps LeftRear;
Steps RightRear;
Steps Center;
Steps Subwoofer;
};
Steps SubwooferEqGain;
struct {
Channels Balance;
Channels Fader;
} ChannelsBalanceFader;
char DriverSide <bgcolor=cYellow>;
byte EmptyByte <bgcolor=cBlack>;
struct {
byte b1 <bgcolor=cDkRed>;
byte b2 <bgcolor=cDkRed>;
short index <bgcolor=cDkRed>;
} UnknownChannelGroups[6];
struct {
struct {
char FrontLeftTwitter <bgcolor=cLtGreen, read=getPhase>;
char FrontLeftWoofer <bgcolor=cGreen, read=getPhase>;
char FrontRightTwitter <bgcolor=cLtRed, read=getPhase>;
char FrontRightWoofer <bgcolor=cDkYellow, read=getPhase>;
char RearLeftTwitter <bgcolor=cLtGreen, read=getPhase>;
char RearLeftWoofer <bgcolor=cGreen, read=getPhase>;
char RearRightTwitter <bgcolor=cLtRed, read=getPhase>;
char RearRightWoofer <bgcolor=cDkYellow, read=getPhase>;
char Center <bgcolor=cAqua, read=getPhase>;
char Subwoofer1 <bgcolor=cDkAqua, read=getPhase>;
char Subwoofer2 <bgcolor=cDkAqua, read=getPhase>;
char NOT_USED <bgcolor=cPurple, read=getPhase>;
} Phase;
struct {
byte FrontLeftTwitter <bgcolor=cLtGreen, read=getGain>;
byte FrontLeftWoofer <bgcolor=cGreen, read=getGain>;
byte FrontRightTwitter <bgcolor=cLtRed, read=getGain>;
byte FrontRightWoofer <bgcolor=cDkYellow, read=getGain>;
byte RearLeftTwitter <bgcolor=cLtGreen, read=getGain>;
byte RearLeftWoofer <bgcolor=cGreen, read=getGain>;
byte RearRightTwitter <bgcolor=cLtRed, read=getGain>;
byte RearRightWoofer <bgcolor=cDkYellow, read=getGain>;
byte Center <bgcolor=cAqua, read=getGain>;
byte Subwoofer1 <bgcolor=cDkAqua, read=getGain>;
byte Subwoofer2 <bgcolor=cDkAqua, read=getGain>;
byte NOT_USED <bgcolor=cPurple, read=getGain>;
} Gains;
} OutputMixer;
struct {
byte IndexesMapping[12] <bgcolor=cAqua>;
struct Limiter {
ubyte threshold <bgcolor=cDkGreen>;
ubyte attack <bgcolor=cGreen, read=Str("%g", this * 0.04)>;
ushort release <bgcolor=cYellow, read=Str("%5.3f", (float) this / 1000)>;
};
struct {
Limiter RearRightTwitter;
Limiter RearLeftTwitter;
Limiter Center;
Limiter FrontRightWoofer;
Limiter RearRightWoofer;
Limiter RearLeftWoofer;
Limiter FrontRightTwitter;
Limiter Subwoofer1;
Limiter Subwoofer2;
Limiter FrontLeftWoofer;
Limiter NOT_USED;
Limiter FrontLeftTwitter;
} Limiters;
struct {
byte booleans[12] <bgcolor=cDkYellow>;
} AmpModelType;
} AmpChannels;
struct {
ubyte RearRightTwitter <bgcolor=cDkAqua>;
ubyte RearLeftTwitter <bgcolor=cDkAqua>;
ubyte Center <bgcolor=cDkAqua>;
ubyte FrontRightWoofer <bgcolor=cDkAqua>;
ubyte RearRightWoofer <bgcolor=cDkAqua>;
ubyte RearLeftWoofer <bgcolor=cDkAqua>;
ubyte FrontRightTwitter <bgcolor=cDkAqua>;
ubyte Subwoofer1 <bgcolor=cDkAqua>;
ubyte Subwoofer2 <bgcolor=cDkAqua>;
ubyte FrontLeftWoofer <bgcolor=cDkAqua>;
ubyte NOT_USED <bgcolor=cDkAqua>;
ubyte FrontLeftTwitter <bgcolor=cDkAqua>;
} OutputChannelsGain;
byte ReferenceChannelGain <bgcolor=cAqua, read=getSignedFloat>;
FSeek(FileSize() - 16);
char CarPlatform2[5] <bgcolor=cLtGreen>;
char FwRevision2[3] <bgcolor=cLtGreen>;
FSeek(FileSize() - 4);
char DatasetVersion[2] <bgcolor=cDkBlue>;
ushort checksum <bgcolor=cDkRed>;
local ushort file_checksum = Checksum(CHECKSUM_CRCCCITT, offset, FileSize() - offset - 2, -1, -1); // algo, size, length, poly, init
Printf("\n\nFILE CHECKSUM: %.04X", file_checksum);