File: stx_format

package info (click to toggle)
xmp 2.0.4d-9
  • links: PTS
  • area: main
  • in suites: sarge
  • size: 1,836 kB
  • ctags: 3,406
  • sloc: ansic: 23,689; sh: 2,617; makefile: 751
file content (82 lines) | stat: -rw-r--r-- 3,590 bytes parent folder | download | duplicates (3)
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
xmp/doc/format/stx_format
analysed by Claudio Matsuoka <claudio@helllabs.org>

Format: STX
Version: 1.0, 1.1
Author: Sami Tammilehto, 1991
Origin: STMIK 0.2 (PC DOS)

The Scream Tracker Music Interface Kit was published by Future Crew along
with the Mental Surgery demo sources (stmik020.zip), and a bugfix release
of the converter took place shortly thereafter (stmikfix.zip). The STX
format is a transition format between the Scream Tracker 2 (STM) and Scream
Tracker 3 (S3M) formats, and comes in two flavours: the original STM2STX 1.0
format and the "fixed" STM2STX 1.1 format.

The description below is based on reverse engineering of the Future Brain
STX module from Mental Surgery, and other STM files converted with the
supplied utility. Byte order is little-endian.

                                STX Module header
          0   1   2   3   4   5   6   7   8   9   A   B   C   D   E   F
        ,---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---.
  0000: | Song name, max 20 chars                                       |
        +---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+
  0010: |               |'!'|'S'|'c'|'r'|'e'|'a'|'m'|'!'|PatSize|  ???  |
        +---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+
  0020: |PatPtr |InsPtr |ChnPtr?|  ???  |  ???  |g.v|i.s|  ???  |  ???  |
        +---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+
  0030: |PatNum |InsNum |OrdNum |  ???  |  ???  |  ???  |'S'|'C'|'R'|'M'|
        +---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+
  xxx1: |Parapointers to patterns; length=PatNum*2                      |
        +---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+
  xxx2: |Parapointers to instruments; length=InsNum*2                   |
        +---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+
  xxx3: |??? Channel settings for 32 channels?                          |
        +---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+
  xxx4: |                                                               |
        +---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+
  xxx5: |Orders; length=OrdNum*5                                        |
        +---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+

        xxx1=PatPtr*16
        xxx2=InsPtr*16
        xxx3=ChnPtr*16
        xxx4=ChnPtr*16+16
        xxx5=ChnPtr*16+32

        Parapointers to file offset Y is (Y-Offset of file header)/16.          
        You could think of parapointers as segments relative to the             
        start of the STX file.

	PatSize = Size of the first pattern (in bytes)
        PatNum  = Number of patterns in file
        InsNum  = Number of instruments in file
        OrdNum  = Number of orders in file
	g.v     = global volume (see next section)
        i.s     = initial speed (command A)

Instrument and pattern format is the same as S3M except that:

- There's no 'SCRS' mark in the end of the instrument header
- Adlib instruments are probably not supported
- STX 1.1 doesn't have the length of pattern before the packed pattern
  data. To test for STX 1.1, compare this value with the PatSize field
  in the module header.
- STX uses STM effect codes
- Slides are performed in all frames


Effects (same as STM):

A - Set tempo (60 == ptk 06)
B - Break pattern and jump to order
C - Break pattern
D - Slide volume; Hi-nibble=up, Lo-nibble=down
E - Pitch slide down
F - Pitch slide up
G - Tone portamento
H - Vibrato
I - Tremor; Hi-nibble = ontime, Lo-nibble = offtime
J - Arpeggio