-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathAtariSTCoSo.txt
More file actions
92 lines (78 loc) · 3.42 KB
/
Copy pathAtariSTCoSo.txt
File metadata and controls
92 lines (78 loc) · 3.42 KB
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
Channel data offset in A0.
(0x00,A0): Division data start address
(0x04,A0): Current timbre data address
(0x08,A0): Current instrument data address
(0x0c,A0): Current mono pattern address
(0x10,A0): Current portando delta value
(0x14,A0): Next division offset
(0x16,A0): Index into volume envelop data
(0x18,A0): Index into instrument data
(0x1a,A0): Current speed tick counter
(0x1b,A0): Initial speed tick counter
(0x1c,A0): Remaining divisions to play
(0x1e,A0): Current Note
(0x1f,A0): Current Note Param
- Bit 5: Portando active
- Bit 6: Override instrument
- Bit 7: Adjust timbre (also if bit 5 or 6 are set)
(0x20,A0): Timbre index (from division)
(0x21,A0): Transpose (from division)
(0x22,A0): Timbre tick counter
(0x23,A0): Timbre speed
(0x24,A0): Sustain counter
(0x25,A0): Instrument delay counter
(0x26,A0): Pitch
(0x27,A0): Vibrato slope
(0x28,A0): Initial vibrato depth (maximum depth is twice that value)
(0x29,A0): Current vibrato depth
(0x2a,A0): Vibrato delay counter
(0x2b,A0): Vibrato flags? Start with bit 5 set (= sub slope).
- Bit 5: Add slope (0) or sub slope (1), changes everytime when depth reaches 0 or 2 * initial depth.
(0x2c,A0): Portando slope / Instrument index (shared)
(0x2d,A0): Noise period
(0x2e,A0): Current voice (channel), 0..2
(0x2f,A0): Volume
(0x30,A0): Division effect volume
(0x31,A0): Some other volume (TODO)
(0x32,A0): Tone/noise flags (0: both active, 1: only noise, 2: only tone)
(0x33,A0): Instrument flags (set via cmd $eb, initially it's 0)
- Bit 1: If set, period is zeroed
- Bit 2: If set, use note period / 16 for hardware envelop
- Bit 3: If set, use note period / 8 for hardware envelop
- Bit 7: Use hardware envelop with tune 0, continue + alternate
- If no bit is set, no hardware envelop is used
- If any bit is set and not 2 or 3, note period / 2 is
used for hardware envelop
- There is a bug in code where the default of note period / 2
is overwritten and instead note period / 16 is used.
(0x34,A0): Total calculated period (word)
(0x36,A0): Changed by $ee command, otherwise -1 (reset at pattern start)
Allowed values are 0 to 4 (besides the -1)
0: Reset to -1, clears some word which can be 0 to 2 (reset of something)
1-3: Takes note period from channel 1-3, checks if in range $11..$eee (if not, it's like case 0)
4: Takes channel 1 note period and skips range check
1-4 (value in range): Some sample is played with that note maybe?
(0x37,A0): ? (is set to 0 at start and is only set by $ef command but never read?)
Total length 0x38. Then next channel data follows.
After a call to FUN_ProcessInstrument,
D0 = Tone Period (word)
D1 = Channel Volume (byte)
The channel volumne is Volume - Division effect volume - other volume
=============================================
=============================================
New directly from Amberstar.68k
=============================================
=============================================
Ok seems almost identical to the above.
Size = 0x34 (per channel/voice)
0x00 (L): Voice data ptr
0x0c (L): Monopattern data ptr
0x14 (W): Offset to next division? (= 12)
0x1c (W): Remaining divisions
0x20 (B): Timbre index
0x21 (B): Voice transpose
0x2e (B): Voice index (0..2)
0x30 (B): Volume reduction (init for each voice with 0, but effect $f0 can set it)
0x31 (B): ? Initially set to 0 (bool?)
0x32 (B): Tone/noise flags (0: both active, 1: only noise, 2: only tone)
0x33 (B): ? Initially set to 0 (bool?)