-
Notifications
You must be signed in to change notification settings - Fork 0
/
ProTrackerIFF.txt
52 lines (47 loc) · 2.49 KB
/
ProTrackerIFF.txt
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
1. What this is
This is a documentation of each chunk in the ProTracker IFF format, which was introduced in
ProTracker 3.6. For an example of a ProTracker IFF file that I (unknowingly) found out in
the wild, see Solaris' debranu.mod on The Mod Archive.
For the readers who know what an IFF chunk is, you're on the right track, but for those of
you who don't know what IFF chunks are, there are 4 bytes that tell you the name of the
chunk (in ASCII). After that is a 32-bit big-endian value that determines the length of the
chunk. After that is the content of the chunk. Chunks can go one after another, and due to
this design, they can (theoretically) even be nested!
The very first chunk in an IFF file should ALWAYS be a FORM chunk. It contains all other
chunks, plus a 4-byte identifier string. In the ProTracker IFF format, this string is
"MODL".
2. Format
FORM: Read the third paragraph of "What this is".
This chunk has the following chunks in it:
VERS: This 10-byte long section contains the version. Should be justified on the
right.
INFO: This contains the following:
off len (both in decimal) (all offsets are from start of chunk)
0 32 song name.
32 2 number of instruments. (all multibyte areas are big-endian)
34 2 number of orders.
36 2 number of patterns.
38 2 volume. Can be used to override a tracker's pre-determined
volume.
40 2 tempo. Can be used to override the 125 constant default of
ProTracker.
42 2 flags.
+256 CIA timing. Turn this off to enable VBlank timing.
+2048 I do not know what this is supposed to be for, but it's
enabled in almost every ProTracker IFF module I have seen.
44 2 The day of the date the module was last saved.
46 2 The month of the date the module was last saved.
48 2 The year of the date the module was last saved.
50 2 The hour of the time the module was last saved.
52 2 The minute of the time the module was last saved.
54 2 The second of the time the module was last saved.
THE FOLLOWING WILL ALWAYS BE 0 WHEN A MOD IS CONVERTED WITH IFFMOD:
56 2 The hour part of the song's length.
58 2 The minute part of the song's length.
60 2 The second part of the song's length.
62 2 The millisecond part of the song's length.
PTDT: The actual MOD itself. Read this chunk using your existing MOD loader, if
you have one.
The only difference that seems to exist in the header-stripped MOD
file is that at 1080-1084, it should be "M.K.", but ProTracker 3.6
uses "PATT" instead.