-
Notifications
You must be signed in to change notification settings - Fork 0
/
BKT+MPT hacks.nfo
604 lines (598 loc) · 46.8 KB
/
BKT+MPT hacks.nfo
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
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
┌────────────────────────────────────────────────────────────┐
│▒ BKM ▒ ░▒▓ Black Knight Tracker + OpenMPT hacks ▓▒░ ▒ BKM ▒│
└────────────────────────────────────────────────────────────┘
┌─────────────┐
│OpenMPT hacks│
├─────────────┴──────────────────────────────────────────────┐
╞The hacks includes as MPTM format features: ╡
│ │
╞PNAM - Contains the pattern names. Each pattern name is ╡
╞32 bytes long and not necessarily null-terminated. The ╡
╞encoding is unspecified (Windows code page). The pattern ╡
╞names are stored continuously, i.e. there are ╡
╞(chunk size / 32) pattern names in the chunk, for pattern 0,╡
╞pattern 1, ... pattern (chunk size / 32 - 1). ╡
│ │
│ 0 1 2 3 4 5 6 7 8 9 A B C D E F │
│ ┌─┬─┬─┬─┬─┬─┬─┬─┬─┬─┬─┬─┬─┬─┬─┬─┐ │
│ 00000000:│P│N│A│M│Length │Packed Data....│ │
│ ├─┼─┼─┼─┼─┼─┼─┼─┼─┼─┼─┼─┼─┼─┼─┼─┤ │
│ │
╞CNAM - Contains the channel names. Each channel name is 20 ╡
╞bytes long and not necessarily null-terminated. The encoding╡
╞is unspecified (Windows code page). The channel names are ╡
╞stored continuously, i.e. there are (chunk size / 20) ╡
╞channel names in the chunk, for channel 1, channel 2, ... ╡
╞channel (chunk size / 20). ╡
│ │
│ 0 1 2 3 4 5 6 7 8 9 A B C D E F │
│ ┌─┬─┬─┬─┬─┬─┬─┬─┬─┬─┬─┬─┬─┬─┬─┬─┐ │
│ 00000000:│C│N│A│M│Length │Packed Data....│ │
│ ├─┼─┼─┼─┼─┼─┼─┼─┼─┼─┼─┼─┼─┼─┼─┼─┤ │
│ │
╞CHFX - Contains the plugin assignment for each channel. For ╡
╞every channel, there is a 32-bit integer plugin index. ╡
╞0 means no plugin, 1 is the first plugin, etc... ╡
│ │
│ 0 1 2 3 4 5 6 7 8 9 A B C D E F │
│ ┌─┬─┬─┬─┬─┬─┬─┬─┬─┬─┬─┬─┬─┬─┬─┬─┐ │
│ 00000000:│C│H│F│X│Length │Packed Data....│ │
│ ├─┼─┼─┼─┼─┼─┼─┼─┼─┼─┼─┼─┼─┼─┼─┼─┤ │
│ │
╞FX00, ... FX99, F100, ... F255 - Contains plugin information╡
╞for each plugin slot. [FX00] contains the information for ╡
╞the first plugin slot, [FX99] for the 100th, [F100] for the ╡
╞101st, etc... ╡
│ │
│ 0 1 2 3 4 5 6 7 8 9 A B C D E F │
│ ┌─┬─┬─┬─┬─┬─┬─┬─┬─┬─┬─┬─┬─┬─┬─┬─┐ │
│ 00000000:│P│t│s│V│Plug ID│R│M│G│<│Output │ │
│ ├─┼─┼─┼─┼─┼─┼─┼─┼─┼─┼─┼─┼─┼─┼─┼─┤ │
│ 00000010:│Reserved.......................│ │
│ ├─┼─┼─┼─┼─┼─┼─┼─┼─┼─┼─┼─┼─┼─┼─┼─┤ │
│ 00000020:│User-chosen plugin name........│ │
│ ├─┼─┼─┼─┼─┼─┼─┼─┼─┼─┼─┼─┼─┼─┼─┼─┤ │
│ 00000030:│...user-chosen plugin name.....│ │
│ ├─┼─┼─┼─┼─┼─┼─┼─┼─┼─┼─┼─┼─┼─┼─┼─┤ │
│ 00000040:│Library name Orig.DLL or DMO ID│ │
│ ├─┼─┼─┼─┼─┼─┼─┼─┼─┼─┼─┼─┼─┼─┼─┼─┤ │
│ 00000050:│...library name................│ │
│ ├─┼─┼─┼─┼─┼─┼─┼─┼─┼─┼─┼─┼─┼─┼─┼─┤ │
│ 00000060:│...library name................│ │
│ ├─┼─┼─┼─┼─┼─┼─┼─┼─┼─┼─┼─┼─┼─┼─┼─┤ │
│ 00000070:│...library name................│ │
│ ├─┼─┼─┼─┼─┼─┼─┼─┼─┼─┼─┼─┼─┼─┼─┼─┤ │
│ 00000080:│P.Data │D│x│x│x│x│x│x│x│x│x│x│x│ │
│ └─┴─┴─┴─┴─┴─┴─┴─┴─┴─┴─┴─┴─┴─┴─┴─┘ │
│ │
╞00000000 - Plugin Type char(4) [VST = PtsV, DMO = OMXD] ╡
╞00000004 - Unique Plugin ID char(4) ╡
╞00000008 - Routing Flags uint8 ╡
╞ • 0x01: Apply to master mix ╡
╞ • 0x02: Bypass effect ╡
╞ • 0x04: Wet Mix (dry added) ╡
╞ • 0x08: Expand Mix [0%,100%] ► [-200%,200%] ╡
╞ • 0x10: Plugin will automatically suspend on ╡
╞ silence ╡
╞00000009 - Mix mode uint8 ╡
╞ • 0: normal processing ╡
╞ • 1: MIX += DRY - WET * wetRatio ╡
╞ • 2: MIX += WET - DRY * dryRatio ╡
╞ • 3: MIX -= WET - DRY * wetRatio ╡
╞ • 4: MIX -= middle - WET * wetRatio + ╡
╞ middle - DRY ╡
╞ • 5: MIX_L += wetRatio * (WET_L - DRY_L) + ╡
╞ dryRatio * (DRY_R - WET_R) ╡
╞ MIX_R += dryRatio * (WET_L - DRY_L) + ╡
╞ wetRatio * (DRY_R - WET_R) ╡
╞0000000A - Gain Factor * 10 (9 = 90%, 10 = 100%, 11 = 110%, ╡
╞ etc.). A value of 0 is equal to 10 (i.e. 100%). ╡
╞ uint8 ╡
╞0000000B - (Reserved) uint8 ╡
╞0000000C - Output Routing (0 = send to master 0x80 + ╡
╞ x = send to plugin x) ╡
╞00000010 - (Reserved) uint8(16) ╡
╞00000020 - User-chosen plugin name (Windows code page) ╡
╞ char(32) ╡
╞00000040 - Library name (Original DLL name / ╡
╞ DMO identifier). ╡
╞ UTF-8 (max. 64 bytes) since OpenMPT 1.22.07.01, ╡
╞ Windows code page in older versions. char(64) ╡
╞00000080 - Size of plugin-specific data in bytes ╡
╞ (parameters or opaque chunk) uint32 ╡
╞00000084 - Plugin-specific data uint8 ╡
│ │
╞The first four bytes of the plugin-specific data determine ╡
╞the type of data. If they are all 0, then the plugin ╡
╞parameters follow as an array of float32 values. Otherwise, ╡
╞plugin type specific data follows which should be treated as╡
╞an opaque chunk. For example, for VST plugins that support ╡
╞the effGetChunk / effSetChunk chunk, the first four bytes ╡
╞will be "fEvN", followed by the data to be sent to the ╡
╞plugin. ╡
│ │
╞After the plugin information described above, more ╡
╞information may follow in OpenMPT modules. This information ╡
╞is again stored in chunks. However, there are two legacy ╡
╞chunks which do not have any size stored alongside the chunk╡
╞identifier: ╡
│ │
╞DWRT - Dry/Wet Ratio of the plugin. This chunk does not ╡
╞ denote its size! float32 ╡
╞PROG - Default plugin program (preset) to restore. ╡
╞ This chunk does not denote its size! float32 ╡
│ │
╞OpenMPT Instrument Extensions - Instrument extensions start ╡
╞with the [XTPM] magic bytes, but there is no size indication╡
╞of the total size of this block. So you have to read the ╡
╞following chunks and as soon as you read the [STPM] magic ╡
╞bytes for a chunk, you know you have read to far and can ╡
╞continue with reading OpenMPT Song Extensions instead. ╡
│ │
╞Instrument extensions are stored in a peculiar way: There ╡
╞is one chunk per property, and it contains the values for ╡
╞all instruments at once. The layout is as follows: ╡
│ │
╞Chunk Header Layout: ╡
╞00000000 - Magic bytes (FOURCC) ╡
╞00000004 - Size of this chunk's entry for one instrument ╡
╞(i.e. total chunk content size is this field x number of ╡
╞instruments) ╡
│ │
╞Chunk Contents: ╡
╞..OF - Fade-out ╡
╞...P - Panning (0...256) ╡
╞..EV - Number of volume envelope nodes (if ≥ 25 nodes) ╡
╞..EP - Number of pan envelope nodes (if ≥ 25 nodes) ╡
╞.EiP - Number of pitch envelope nodes (if ≥ 25 nodes) ╡
╞..BM - MIDI Bank ╡
╞..PM - MIDI Program ╡
╞..CM - MIDI Channel ╡
╞.[PV - Volume Envelope Ticks (if ≥ 25 nodes) ╡
╞.[EV - Volume Envelope Values (if ≥ 25 nodes) ╡
╞.[PP - Pan Envelope Ticks (if ≥ 25 nodes) ╡
╞.[EP - Pan Envelope Values (if ≥ 25 nodes) ╡
╞[PiP - Pitch Envelope Ticks (if ≥ 25 nodes) ╡
╞[EiP - Pitch Envelope Values (if ≥ 25 nodes) ╡
╞.PiM - Plugin, 0 = no plugin, 1 = first plugin, etc. ╡
╞..RV - Ramping / Attack ╡
╞...R - Resampling Mode ╡
╞ • 0: No Interpolation (1 tap) ╡
╞ • 1: Linear (2 taps) ╡
╞ • 2: Cubic Spline (4 taps) ╡
╞ • 3: Sinc + Lowpass / Polyphase (8 taps) ╡
╞ • 4: Sinc / XMMS-ModPlug (8 taps) ╡
╞ • 5: Default ╡
╞..SC - Cutoff Swing ╡
╞..SR - Resonance Swing ╡
╞..MF - Filter Mode ╡
╞HEVP - Plugin Velocity Handling ╡
╞HOVP - Plugin Volume Handling ╡
╞NREV - Volume Envelope Release Node ╡
╞NREA - Pan Envelope Release Node ╡
╞NREP - Pitch Envelope Release Node ╡
╞DWPM - Pitch Wheel Depth ╡
╞LTTP - Integer part of Pitch / Tempo Lock ╡
╞PTTF - Fractional part of Pitch / Tempo Lock (0...9999) ╡
│ │
╞Legacy Extension: ╡
╞But wait, there is more! Some really old OpenMPT versions ╡
╞(1.17 RC1 and older, but not 1.17 RC2) do not use the ╡
╞instrument extensions described above. However, they also ╡
╞need to store the plugin reference for each instrument, ╡
╞which is done in another modular block following each ╡
╞instrument header (and possibly the [MPTX] / [XTPM] ╡
╞extension of that instrument header). If this legacy ╡
╞extension is present, the instrument header is followed by ╡
╞the magic bytes [MSNI] and an uint32 containing the modular ╡
╞data size. ╡
│ │
╞Currently there is only one chunk in this modular data ╡
╞block. Its FOURCC is [GULP], has no size information and ╡
╞contains an uint8 for the plugin index (0 = no plugin, ╡
╞1 = first plugin, etc.). ╡
│ │
╞OpenMPT Song Extensions - Song extensions start with the ╡
╞[STPM] magic bytes, but there is no size indication of the ╡
╞total size of this block. In an IT / XM file, these ╡
╞extensions are the last chunks in the file, so you can ╡
╞continue reading until you are out of data. In the case of ╡
╞MPTM files, some further MPTM-specific data follows. This ╡
╞data starts with the bytes "228" followed by ASCII charater ╡
╞4 (not the digit), so you can keep reading the song ╡
╞extensions until you read this FOURCC. ╡
│ │
╞Chunk Header Layout: ╡
╞00000000 - Magic bytes (FOURCC) ╡
╞00000004 - Size of this chunk, excluding the header ╡
│ │
╞..TD - Integer part of the default tempo (required if it is ╡
╞ larger than 255 in IT / MPTM, but also found in ╡
╞ legacy XM files) ╡
╞DTFR - Fractional part of the default tempo (0...9999) ╡
╞.BPR - Rows Per Beat ╡
╞.MPR - Rows Per Measure ╡
╞...C - Number of channels ╡
╞SnhC - If there are more than 64 channels in the IT / MTPM ╡
╞ format, this chunk contains the default panning, ╡
╞ volume and flags for channels 65+. They are encoded ╡
╞ the same way as in the IT header, except that volume ╡
╞ and panning are stored in an interleaved way (i.e. ╡
╞ volume for channel 65, pan for channel 65, volume ╡
╞ for channel 66, ...) ╡
╞..MT - Tempo Mode ╡
╞ • 0: classic ╡
╞ • 1: alternative ╡
╞ • 2: modern ╡
╞.MMP - Mix Levels ╡
╞ • 0: Original ╡
╞ • 1: 1.17 RC1 ╡
╞ • 2: 1.17 RC2 ╡
╞ • 3: 1.17 RC3 ╡
╞ • 4: Compatible ╡
╞ • 5: Compatible (FT2 Pan Law) ╡
╞.VWC - OpenMPT "Created With" version (e.g. OpenMPT ╡
╞ 1.23.45.67 = 0x01234567) ╡
╞VWSL - OpenMPT "Last Saved With" version ╡
╞.APS - Sample Pre-Amp ╡
╞VTSV - VSTi Pre-Amp ╡
╞..PR - Restart Position ╡
╞RSMP - Resampling Mode ╡
╞ • 0: No Interpolation (1 tap) ╡
╞ • 1: Linear (2 taps) ╡
╞ • 2: Cubic Spline (4 taps) ╡
╞ • 3: Sinc + Lowpass / Polyphase (8 taps) ╡
╞ • 4: Sinc / XMMS-ModPlug (8 taps) ╡
╞ • 5: Default ╡
╞CUES - Sample cue points for a single sample (only MPTM ╡
╞ format). The first uint16 in the chunk indicates for ╡
╞ which sample slot the cue points are meant. The rest ╡
╞ of the chunk contains all cue points as uint32s. ╡
╞ If this chunk is missing for a particular sample ╡
╞ slot, OpenMPT assumes the default cue points for this╡
╞ slot. The i-th cue point can be computed as i x 2048.╡
╞SWNG - Contains tempo swing factors (only MPTM format). ╡
╞ The first uint16 in the chunk indicates the number of╡
╞ swing rows. The rest of the chunk contains all swing ╡
╞ factors as uint32s. A factor of 16777216 (224) is ╡
╞ considered to be unity, i.e. does not modify the row ╡
╞ duration. After loading, the number of swing factors ╡
╞ should be resized to the actual number of rows per ╡
╞ beat (in case of malformed file) and re-normalized. ╡
╞.FSM - A bit field of generic compatibility flags. For ╡
╞ modules made with OpenMPT 1.25 and older, the most ╡
╞ important one is 0x01 (first bit set), which is ╡
╞ IT-/XM-compatible playback mode. All other flags ╡
╞ indicate which compatibility settings are toggled. ╡
╞AUTH - Song artist, as UTF-8 string ╡
╞AMIM - MIDI Mapping settings ╡
╞CCOL - Channel colors. The chunk size divided by 4 indicates╡
╞ the number of channels present. Format is ╡
╞ [R, G, B, 0] for channels that have a color assigned,╡
╞ or [x, x, x, non-zero] for a channel with no color. ╡
└────────────────────────────────────────────────────────────┘
┌──────────────────────────┐
│Black Knight Tracker hacks│
├──────────────────────────┴─────────────────────────────────┐
╞The BKT hacks including MPTM + exclusive features of BKM ╡
│ │
╞This header is same as IT/MPTM module but IMPM replaces BKTM╡
│ │
│ 0 1 2 3 4 5 6 7 8 9 A B C D E F │
│ ┌─┬─┬─┬─┬─┬─┬─┬─┬─┬─┬─┬─┬─┬─┬─┬─┐ │
│ 00000000:│B│K│T│M│Song name includes NULL│ │
│ ├─┼─┼─┼─┼─┼─┼─┼─┼─┼─┼─┼─┼─┼─┼─┼─┤ │
│ 00000010:│...song name...............│PHL│ │
│ ├─┼─┼─┼─┼─┼─┼─┼─┼─┼─┼─┼─┼─┼─┼─┼─┤ │
│ 00000020:│Ord│Ins│Smp│Pat│Cwt│Cmv│Flg│Spe│ │
│ ├─┼─┼─┼─┼─┼─┼─┼─┼─┼─┼─┼─┼─┼─┼─┼─┤ │
│ 00000030:│G│M│S│T│P│P│Msg│Msg os │Reserv.│ │
│ ├─┼─┼─┼─┼─┼─┼─┼─┼─┼─┼─┼─┼─┼─┼─┼─┤ │
│ │
╞00000000 - The BKTM identifier when saving .BKM module, ╡
╞ if IMPM when saving .MPTM and .IT module ╡
╞00000004 - see ITTECH.TXT ╡
│ │
╞If 0xBxyy Cwt/v can be identified as Black Knight Tracker ╡
╞Vx.yy. ╡
│ │
│ ▒ NEW BKT PATTERN ▒ │
│ │
│ 0 1 2 3 4 5 6 7 8 9 A B C D E F │
│ ┌─┬─┬─┬─┬─┬─┬─┬─┬─┬─┬─┬─┬─┬─┬─┬─┐ │
│ 00000000:│Ln1│Row│Ln2│Ln3│Packed Data....│ │
│ ├─┼─┼─┼─┼─┼─┼─┼─┼─┼─┼─┼─┼─┼─┼─┼─┤ │
│ │
╞00000000 - 1st length is standard IT features ╡
╞00000002 - Number of Rows in this pattern. Range 1->65535 ╡
╞00000004 - 2nd length follows as 32-bit up to 4 GB ╡
╞ (4,294,967,295 bytes) [BKT x86 Only] ╡
╞00000006 - 3rd length follows as 48-bit [BKT x64 ONLY] ╡
│ │
╞Patterns are unpacked by the following pseudocode... (this ╡
╞may look horrible, but in practise, it's just as convenient ╡
╞as the S3M pattern format for playback ╡
╞(but not for display)) ╡
│ │
╞GetNextChannelMarker: ╡
╞ Read byte into channelvariable. ╡
╞ if(channelvariable = 0) then end of row ╡
╞ Channel = (channelvariable-1) & 126 ; Channel is 0 based.╡
╞ if(channelvariable & 128) then read byte into maskvariable╡
╞ else maskvariable = previousmaskvariable for current ╡
╞ channel ╡
│ │
╞ if(maskvariable & 1), then read note. (byte value) ╡
╞ // Note ranges from 0->119 (C-0 -> B-9) ╡
╞ // 255 = note off, 254 = notecut ╡
╞ // Others = note fade ╡
╞ //(already programmed into IT's player ╡
╞ // but not available in the editor)╡
│ │
╞ if(maskvariable & 2), then read instrument (byte value) ╡
╞ // Instrument ranges from 1->255 [01-99,H0-W5] ╡
│ │
╞ if(maskvariable & 4), then read volume/panning(byte value)╡
╞ // Volume ranges from 0->64 ╡
╞ // Panning ranges from 0->64, mapped onto 128->192╡
╞ // Prepare for the following also: ╡
╞ // 65->74 = Fine volume up [Ax] ╡
╞ // 75->84 = Fine volume down [Bx] ╡
╞ // 85->94 = Volume slide up [Cx] ╡
╞ // 95->104 = Volume slide down [Dx] ╡
╞ // 105->114 = Pitch Slide down [Ex] ╡
╞ // 115->124 = Pitch Slide up [Fx] ╡
╞ // 193->202 = Portamento to [Gx] ╡
╞ // 203->212 = Vibrato [Hx] ╡
╞ // 213->222 = Set Vibrato Speed [$x][Ux] ╡
╞ // 223->232 = Sample Cue [Ix] ╡
╞ // 233->242 = Panning Left Slide [<x][◄x][Lx] ╡
╞ // 243->252 = Panning Right Slide [>x][►x][Rx] ╡
│ │
╞ Effects 65 is equivalent to D0F, 66 is equivalent to ╡
╞ D1F -> 74 = D9F ╡
╞ Similarly for 75-84 (DFx), 85-94 (Dx0), 95->104 (D0x). ╡
│ │
╞ (Fine) Volume up/down all share the same memory (NOT ╡
╞ shared with Dxx in the effect column tho). ╡
│ │
╞ Pitch slide up/down affect E/F/(G)'s memory - a Pitch ╡
╞ slide up/down of x is equivalent to a normal slide by x*4 ╡
│ │
╞ Portamento to (Gx) affects the memory for Gxx and has the ╡
╞ equivalent slide given by this table: ╡
│ │
╞ SlideTable DB 1, 4, 8, 16, 32, 64, 96, 128, 255 ╡
│ │
╞ Vibrato uses the same 'memory' as Hxx/Uxx. ╡
│ ╡
╞ if(maskvariable & 8), then read command (byte value) and ╡
╞ commandvalue╡
╞ // All ranges follows ╡
│ │
│ 0 1 2 3 4 5 6 7 8 9 A B C D E F │
│ ┌─┬─┬─┬─┬─┬─┬─┬─┬─┬─┬─┬─┬─┬─┬─┬─┐ │
│ 00000000:│.│A│B│C│D│E│F│G│H│I│J│K│L│M│N│O│ │
│ ├─┼─┼─┼─┼─┼─┼─┼─┼─┼─┼─┼─┼─┼─┼─┼─┤ │
│ 00000010:│P│Q│R│S│T│U│V│W│X│Y│Z│+│\│:│=│-│ │
│ ├─┼─┼─┼─┼─┼─┼─┼─┼─┼─┼─┼─┼─┼─┼─┼─┤ │
│ 00000020:│!│@│#│$│&│*│(│)│x│x│x│x│x│x│x│x│ │
│ └─┴─┴─┴─┴─┴─┴─┴─┴─┴─┴─┴─┴─┴─┴─┴─┘ │
│ │
╞ if(maskvariable & 16), then note = lastnote for channel ╡
╞ if(maskvariable & 32), then instrument = lastinstrument ╡
╞ for channel╡
╞ if(maskvariable & 64), then volume/pan = lastvolume/pan ╡
╞ for channel╡
╞ if(maskvariable & 128), then { ╡
╞ command = lastcommand for channel and ╡
╞ commandvalue = lastcommandvalue for channel ╡
╞ } ╡
╞ Goto GetNextChannelMarker ╡
│ │
╞BKTC - Initial Chorus and Reverb volumes in every channel, ╡
╞ 1st offset Chorus, 2nd offset Reverb per channel, ╡
╞ Range 0->64 [0->40h]: ╡
╞ 3A 2C = Chorus Volume ► 58 and Reverb Volume ► 44 ╡
│ │
│ 0 1 2 3 4 5 6 7 8 9 A B C D E F │
│ ┌─┬─┬─┬─┬─┬─┬─┬─┬─┬─┬─┬─┬─┬─┬─┬─┐ │
│ 00000000:│B│K│T│C│001│002│003│004│005│006│ │
│ ├─┼─┼─┼─┼─┼─┼─┼─┼─┼─┼─┼─┼─┼─┼─┼─┤ │
│ 00000010:│007│008│009│010│011│012│013│014│ │
│ ├─┼─┼─┼─┼─┼─┼─┼─┼─┼─┼─┼─┼─┼─┼─┼─┤ │
│ 00000020:│015│016│017│018│019│020│021│022│ │
│ ├─┼─┼─┼─┼─┼─┼─┼─┼─┼─┼─┼─┼─┼─┼─┼─┤ │
│ 00000030:│023│024│025│026│027│028│029│030│ │
│ ├─┼─┼─┼─┼─┼─┼─┼─┼─┼─┼─┼─┼─┼─┼─┼─┤ │
│ 00000040:│031│032│033│034│035│036│037│038│ │
│ ├─┼─┼─┼─┼─┼─┼─┼─┼─┼─┼─┼─┼─┼─┼─┼─┤ │
│ 00000050:│039│040│041│042│043│044│045│046│ │
│ ├─┼─┼─┼─┼─┼─┼─┼─┼─┼─┼─┼─┼─┼─┼─┼─┤ │
│ 00000060:│047│048│049│050│051│052│053│054│ │
│ ├─┼─┼─┼─┼─┼─┼─┼─┼─┼─┼─┼─┼─┼─┼─┼─┤ │
│ 00000070:│055│056│057│058│059│060│061│062│ │
│ ├─┼─┼─┼─┼─┼─┼─┼─┼─┼─┼─┼─┼─┼─┼─┼─┤ │
│ 00000080:│063│064│065│066│067│068│069│070│ │
│ ├─┼─┼─┼─┼─┼─┼─┼─┼─┼─┼─┼─┼─┼─┼─┼─┤ │
│ 00000090:│071│072│073│074│075│076│077│078│ │
│ ├─┼─┼─┼─┼─┼─┼─┼─┼─┼─┼─┼─┼─┼─┼─┼─┤ │
│ 000000A0:│079│080│081│082│083│084│085│086│ │
│ ├─┼─┼─┼─┼─┼─┼─┼─┼─┼─┼─┼─┼─┼─┼─┼─┤ │
│ 000000B0:│087│088│089│090│091│092│093│094│ │
│ ├─┼─┼─┼─┼─┼─┼─┼─┼─┼─┼─┼─┼─┼─┼─┼─┤ │
│ 000000C0:│095│096│097│098│099│100│101│102│ │
│ ├─┼─┼─┼─┼─┼─┼─┼─┼─┼─┼─┼─┼─┼─┼─┼─┤ │
│ 000000D0:│103│104│105│106│107│108│109│110│ │
│ ├─┼─┼─┼─┼─┼─┼─┼─┼─┼─┼─┼─┼─┼─┼─┼─┤ │
│ 000000E0:│111│112│113│114│115│116│117│118│ │
│ ├─┼─┼─┼─┼─┼─┼─┼─┼─┼─┼─┼─┼─┼─┼─┼─┤ │
│ 000000F0:│119│120│121│122│123│124│125│126│ │
│ ├─┼─┼─┼─┼─┼─┼─┼─┼─┼─┼─┼─┼─┼─┼─┼─┤ │
│ 00000100:│127│x│x│x│x│x│x│x│x│x│x│x│x│x│x│ │
│ └─┴─┴─┴─┴─┴─┴─┴─┴─┴─┴─┴─┴─┴─┴─┴─┘ │
│ │
╞ADVP - Advanced parameters in uint8 ╡
╞0000000x - "Black knight tracker's Fast Volume Slide" This ╡
╞ behaviour increases up to x1.5 slides examples: ╡
╞ 1 = 1,2,1,2... 9 = 13,14,13,14... ╡
╞ 2 = 3,3,3,3... A = 15,15,15,15... ╡
╞ 3 = 4,5,4,5... B = 16,17,16,17... ╡
╞ 4 = 6,6,6,6... C = 18,18,18,18... ╡
╞ 5 = 7,8,7,8... D = 19,20,19,20... ╡
╞ 6 = 9,9,9,9... E = 21,21,21,21... ╡
╞ 7 = 10,11,10,11... F = 22,23,22,23... ╡
╞ 8 = 12,12,12,12... ╡
│ │
│ 0 1 2 3 4 5 6 7 8 9 A B C D E F │
│ ┌─┬─┬─┬─┬─┬─┬─┬─┬─┬─┬─┬─┬─┬─┬─┬─┐ │
│ 00000000:│A│D│V│P│b│x│x│x│x│x│x│x│x│x│x│x│ │
│ └─┴─┴─┴─┴─┴─┴─┴─┴─┴─┴─┴─┴─┴─┴─┴─┘ │
│ │
╞New header: Cover Picture ╡
│ │
│ 0 1 2 3 4 5 6 7 8 9 A B C D E F │
│ ┌─┬─┬─┬─┬─┬─┬─┬─┬─┬─┬─┬─┬─┬─┬─┬─┐ │
│ 00000000:│P│I│C│T│Length │Uncompress PNG │ │
│ ├─┼─┼─┼─┼─┼─┼─┼─┼─┼─┼─┼─┼─┼─┼─┼─┤ │
│ │
╞NEW .BKP pattern file ╡
│ │
│ 0 1 2 3 4 5 6 7 8 9 A B C D E F │
│ ┌─┬─┬─┬─┬─┬─┬─┬─┬─┬─┬─┬─┬─┬─┬─┬─┐ │
│ 00000000:│B│K│T│P│Ln1│Row│Ln2│Ln3│Packed.│ │
│ ├─┼─┼─┼─┼─┼─┼─┼─┼─┼─┼─┼─┼─┼─┼─┼─┤ │
│ │
╞NEW .BKT track file ╡
│ │
│ 0 1 2 3 4 5 6 7 8 9 A B C D E F │
│ ┌─┬─┬─┬─┬─┬─┬─┬─┬─┬─┬─┬─┬─┬─┬─┬─┐ │
│ 00000000:│B│K│T│T│Ln1│Row│Ln2│Ln3│Packed.│ │
│ ├─┼─┼─┼─┼─┼─┼─┼─┼─┼─┼─┼─┼─┼─┼─┼─┤ │
│ │
╞NEW .BKF raster 8x8 font pack file* ╡
│ │
│ 0 1 2 3 4 5 6 7 8 9 A B C D E F │
│ ┌─┬─┬─┬─┬─┬─┬─┬─┬─┬─┬─┬─┬─┬─┬─┬─┐ │
│ 00000000:│B│K│T│F│Version│Font Name......│ │
│ ├─┼─┼─┼─┼─┼─┼─┼─┼─┼─┼─┼─┼─┼─┼─┼─┤ │
│ 00000010:│...font name...................│ │
│ ├─┼─┼─┼─┼─┼─┼─┼─┼─┼─┼─┼─┼─┼─┼─┼─┤ │
│ 00000020:│Normal Font Data Length 800h...│ │
│ ├─┼─┼─┼─┼─┼─┼─┼─┼─┼─┼─┼─┼─┼─┼─┼─┤ │
│ │
│ ├─┼─┼─┼─┼─┼─┼─┼─┼─┼─┼─┼─┼─┼─┼─┼─┤ │
│ 00000820:│BIOS/NFO Font Data Length 800h.│ │
│ ├─┼─┼─┼─┼─┼─┼─┼─┼─┼─┼─┼─┼─┼─┼─┼─┤ │
│ │
│ ├─┼─┼─┼─┼─┼─┼─┼─┼─┼─┼─┼─┼─┼─┼─┼─┤ │
│ 00001020:│Time Panel Graphics Length 800h│ │
│ ├─┼─┼─┼─┼─┼─┼─┼─┼─┼─┼─┼─┼─┼─┼─┼─┤ │
│ │
│ ├─┼─┼─┼─┼─┼─┼─┼─┼─┼─┼─┼─┼─┼─┼─┼─┤ │
│ 00001820:│Button Graphics Length 800h....│ │
│ ├─┼─┼─┼─┼─┼─┼─┼─┼─┼─┼─┼─┼─┼─┼─┼─┤ │
│ │
│ ├─┼─┼─┼─┼─┼─┼─┼─┼─┼─┼─┼─┼─┼─┼─┼─┤ │
│ 00002020:│Extra Graphics Length 800h.....│ │
│ ├─┼─┼─┼─┼─┼─┼─┼─┼─┼─┼─┼─┼─┼─┼─┼─┤ │
│ │
│ ├─┼─┼─┼─┼─┼─┼─┼─┼─┼─┼─┼─┼─┼─┼─┼─┤ │
│ 00002820:│Half-Width Font Langth 400h....│ │
│ ├─┼─┼─┼─┼─┼─┼─┼─┼─┼─┼─┼─┼─┼─┼─┼─┤ │
│ │
│ ├─┼─┼─┼─┼─┼─┼─┼─┼─┼─┼─┼─┼─┼─┼─┼─┤ │
│ 00002C20:│Cyrillic Font Data Length 800h.│ │
│ ├─┼─┼─┼─┼─┼─┼─┼─┼─┼─┼─┼─┼─┼─┼─┼─┤ │
│ │
│ ├─┼─┼─┼─┼─┼─┼─┼─┼─┼─┼─┼─┼─┼─┼─┼─┤ │
│ 00003820:│Button 2 Font Data Length 800h.│ │
│ ├─┼─┼─┼─┼─┼─┼─┼─┼─┼─┼─┼─┼─┼─┼─┼─┤ │
│ │
╞* raster font will be used Text-Based GUI ╡
│ │
╞How it works this 8x8 and 4x8 raster font ╡
╞ The raster font uses BINARY graphics example: ╡
│ │
╞ The 8x8 font example "A" ╡
│ │
│ 7C 44 44 7C 44 44 44 00 │
│ │
│ ┌────────┐ │
│ │.☼☼☼☼☼..│ │
│ │.☼...☼..│ │
│ │.☼...☼..│ │
│ │.☼☼☼☼☼..│ │
│ │.☼...☼..│ │
│ │.☼...☼..│ │
│ │.☼...☼..│ │
│ │........│ │
│ └────────┘ │
│ │
╞ The 4x8 font example "A" ╡
│ │
│ EA AE AA A0 │
│ │
│ ┌────┐ │
│ │☼☼☼.│ │
│ │☼.☼.│ │
│ │☼.☼.│ │
│ │☼☼☼.│ │
│ │☼.☼.│ │
│ │☼.☼.│ │
│ │☼.☼.│ │
│ │....│ │
│ └────┘ │
│ │
╞That's not good, the OpenMPT limit exceeds to 30k chars ╡
╞The BKT extends message to 9,223,372,036,854,775,807 chars ╡
│ │
│ 0 1 2 3 4 5 6 7 8 9 A B C D E F │
│ ┌─┬─┬─┬─┬─┬─┬─┬─┬─┬─┬─┬─┬─┬─┬─┬─┐ │
│ 00000000:│B│K│E│M│chunk x64......│Comment│ │
│ ├─┼─┼─┼─┼─┼─┼─┼─┼─┼─┼─┼─┼─┼─┼─┼─┤ │
│ │
╞NEW .BKS ADLiB Sample ╡
│ │
│ 0 1 2 3 4 5 6 7 8 9 A B C D E F │
│ ┌─┬─┬─┬─┬─┬─┬─┬─┬─┬─┬─┬─┬─┬─┬─┬─┐ │
│ 00000000:│B│K│A│D│L│Adlib Parameters.....│ │
│ ├─┼─┼─┼─┼─┼─┼─┼─┼─┼─┼─┼─┼─┼─┼─┼─┤ │
│ 00000010:│x│Speed....│File name..........│ │
│ ├─┼─┼─┼─┼─┼─┼─┼─┼─┼─┼─┼─┼─┼─┼─┼─┤ │
│ 00000020:│...│Sample Name................│ │
│ ├─┼─┼─┼─┼─┼─┼─┼─┼─┼─┼─┼─┼─┼─┼─┼─┤ │
│ 00000030:│...sample name.......│x│x│x│x│x│ │
│ └─┴─┴─┴─┴─┴─┴─┴─┴─┴─┴─┴─┴─┴─┴─┴─┘ │
│ │
╞NEW .BKC Color Palette ╡
│ │
│ 0 1 2 3 4 5 6 7 8 9 A B C D E F │
│ ┌─┬─┬─┬─┬─┬─┬─┬─┬─┬─┬─┬─┬─┬─┬─┬─┐ │
│ 00000000:│B│K│T│C│P│Version│t│r│g│b│r│g│b│ │
│ ├─┼─┼─┼─┼─┼─┼─┼─┼─┼─┼─┼─┼─┼─┼─┼─┤ │
│ 00000010:│r│g│b│r│g│b│r│g│b│r│g│b│r│g│b│r│ │
│ ├─┼─┼─┼─┼─┼─┼─┼─┼─┼─┼─┼─┼─┼─┼─┼─┤ │
│ 00000020:│g│b│r│g│b│r│g│b│r│g│b│r│g│b│r│g│ │
│ ├─┼─┼─┼─┼─┼─┼─┼─┼─┼─┼─┼─┼─┼─┼─┼─┤ │
│ 00000030:│b│r│g│b│r│g│b│r│g│b│r│g│b│r│g│b│ │
│ ├─┼─┼─┼─┼─┼─┼─┼─┼─┼─┼─┼─┼─┼─┼─┼─┤ │
│ 00000010:│r│g│b│r│g│b│r│g│b│r│g│b│r│g│b│r│ │
│ ├─┼─┼─┼─┼─┼─┼─┼─┼─┼─┼─┼─┼─┼─┼─┼─┤ │
│ 00000020:│g│b│r│g│b│r│g│b│r│g│b│r│g│b│r│g│ │
│ ├─┼─┼─┼─┼─┼─┼─┼─┼─┼─┼─┼─┼─┼─┼─┼─┤ │
│ 00000030:│b│r│g│b│r│g│b│r│g│b│CommentsAL.│ │
│ ├─┼─┼─┼─┼─┼─┼─┼─┼─┼─┼─┼─┼─┼─┼─┼─┤ │
│ │
╞00000000 - FIVECC "BKTCP" ╡
╞00000005 - Version when saved from BKT 01000100 = 1.00.01.00╡
╞00000009 - Type of bit [00 - 6-bit depth, 01 - 8-bit depth] ╡
╞0000000A - Palette color data ╡
╞0000003A - Comments any length (not affected) ╡
│ │
╞Requesting hacks in BKT can be putted this ╡
└────────────────────────────────────────────────────────────┘
┌────────────┐┌──────────────────────────────────────────────┐
│NFO by Vad1m││░▒ THE BEST TRACKER IS BLACK KNIGHT TRACKER ▒░│
└────────────┘└──────────────────────────────────────────────┘
╞╡