-
Notifications
You must be signed in to change notification settings - Fork 4
/
sndhv21.txt
202 lines (179 loc) · 7.6 KB
/
sndhv21.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
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
; SNDH file structure, Revision 2.10
; Original SNDH Format devised by Jochen Knaus
; SNDH V1.1 Updated/Created by Anders Eriksson and Odd Skancke
; SNDH V2.0 by Phil Graham
; SNDH V2.1 by Phil Graham
; This document was originally created by Anders Eriksson, updated and
; adapted with SNDH v2 structures by Phil Graham.
; October, 2012
;
;
; All values are in MOTOROLA BIG ENDIAN format
;---------------------------------------------------------------------------
;Offset Size Function Example
;---------------------------------------------------------------------------
;0 4 INIT music driver bra.w init_music_driver
; (subtune number in d0.w)
;4 4 EXIT music driver bra.w exit_music_driver
;8 4 music driver PLAY bra.w vbl_play
;12 4 SNDH head dc.b 'SNDH'
;---------------------------------------------------------------------------
;Beneath follows the different TAGS that can (should) be used.
;The order of the TAGS is not important.
;---------------------------------------------------------------------------
;---------------------------------------------------------------------------
; TAG Description Example Termination
;---------------------------------------------------------------------------
; TITL Title of Song dc.b 'TITL','Led Storm',0 0 (Null)
; COMM Composer Name dc.b 'COMM','Tim Follin',0 0 (Null)
; RIPP Ripper Name dc.b 'RIPP','Me the hacker',0 0 (Null)
; CONV Converter Name dc.b 'CONV','Me the converter',0 0 (Null)
; ##?? Sub Tunes dc.b '##04',0 0 (Null)
; TA??? Timer A dc.b 'TA50',0 0 (Null)
; TB??? Timer B dc.b 'TB60',0 0 (Null)
; TC??? Timer C dc.b 'TC50',0 0 (Null)
; TD??? Timer D dc.b 'TD100',0 0 (Null)
; !V?? VBL dc.b '!V50',0 0 (Null)
; YEAR Year of release dc.b '1996',0 0 (Null) SNHDv2
; !#?? Default Sub tune dc.b '!#02',0 0 (Null) SNDHv21
; !#SN Sub tune names dc.w x1,x2,x3,x4 None
; dc.b "Subtune Name 1",0 0 (Null) SNDHv21
; dc.b "Subtune Name 2",0 0 (Null) SNDHv21
; dc.b "Subtune Name 3",0 0 (Null) SNDHv21
; dc.b "Subtune Name 4",0 0 (Null) SNDHv21
; TIME (sub) tune time dc.b 'TIME' None SNDHv2
; (in seconds) dc.w x1,x2,x3,x4
; HDNS End of Header dc.b 'HDNS' None SNDHv2
;---------------------------------------------------------------------------
;Calling method and speed
;---------------------------------------------------------------------------
;This a very important part to do correctly.
;Here you specify what hardware interrupt to use for calling the music
;driver.
;
;These options are available;
;dc.b '!Vnn' VBL (nn=frequency)
;dc.b 'TAnnn',0 Timer A (nnn=frequency)
;dc.b 'TBnnn',0 Timer B (nnn=frequency)
;dc.b 'TCnnn',0 Timer C (nnn=frequency)
;dc.b 'TDnnn',0 Timer D (nnn=frequency)
;
;VBL - Is NOT recommended for use. There is no change made to the
; VBL frequency so it will play at the current VBL speed.
;
;Timer A - Is only recommended if Timer C is not accurate enough. Use
; with caution, many songs are using Timer A for special
; effects.
;
;Timer B - Is only recommended if Timer C is not accurate enough. Use
; with caution, many songs are using Timer B for special
; effects.
;
;Timer C - The default timer if nothing is specified. Default speed
; is 50Hz. Use Timer C playback wherever possible. It hooks
; up to the OS 200Hz Timer C interrupt and leaves all other
; interrupts free for special effects.
;
; For songs with a replay speed uneven of 200Hz, SND Player
; uses a smart routine to correct for the wrong speed. The
; result is usually very good. If the result isn't good
; enough,then consider another Timer, but be careful with
; Timer collisions!
;
;Timer D - Is only recommended if Timer C is not accurate enough.
; Use with caution, many songs are using Timer D for
; special effects.
;---------------------------------------------------------------------------
; Default Tune Tag (!#??)
;---------------------------------------------------------------------------
; The !# Tag is followed by a two character ascii value signifying the
; default sub-tune to be played. If this tag is null then a sub-tune of
; 1 is assumed.
;---------------------------------------------------------------------------
;---------------------------------------------------------------------------
; Sub Tune Names (!#SN)
;---------------------------------------------------------------------------
; The !#SN Tag is followed by a table of word offsets pointing to the ascii
; text of sub tune names. The base offset is the actaul !#SN tag. See
; example header below.
;---------------------------------------------------------------------------
;---------------------------------------------------------------------------
; TIME Tag
;---------------------------------------------------------------------------
; The TIME tag is followed by 'x' short words ('x' being the number of
; tunes). Each word contains the length of each sub tune in seconds. If the
; word is null then it is assumed that the tune endlessly loops.
;---------------------------------------------------------------------------
;---------------------------------------------------------------------------
; HDNS Tag
;---------------------------------------------------------------------------
; The HDNS signifies the end of the SNDH header and the start of the actual
; music data. This tag must be on an even boundary.
;---------------------------------------------------------------------------
;---------------------------------------------------------------------------
;Example of a complete SNDH header/file
;---------------------------------------------------------------------------
;
; section text
;
; bra.w sndh_init
; bra.w sndh_exit
; bra.w sndh_vbl
;
; dc.b 'SNDH'
; dc.b 'TITL','Mindbomb - Digi Synth',0
; dc.b 'COMM','Spaz',0
; dc.b 'RIPP','Grazey/PHF',0
; dc.b 'CONV','Quartet-2-SNDH (c) PHF',0
; dc.b '##06',0
; dc.b 'TC200',0
; dc.b '!#01',0
; even
;.subt dc.b '!#SN' ; Subtune names
; dc.w .t1-.subt ; Offset from .subt
; dc.w .t2-.subt
; dc.w .t3-.subt
; dc.w .t4-.subt
; dc.w .t5-.subt
; dc.w .t6-.subt
;
;.t1 dc.b 'What a Bummer',0
;.t2 dc.b 'Paninaro',0
;.t3 dc.b 'Fade to a Pinkish Red',0
;.t4 dc.b 'Revenge of the Mutant Wafer Biscuits',0
;.t5 dc.b 'Mind Bomb (Theme)',0
;.t6 dc.b 'In The Night',0
;
; even
; dc.b 'YEAR','1990',0
; dc.b 'TIME'
; dc.w $e1,$60,$78,$11c,$40,$5f
; even
; dc.b 'HDNS',0
;
;
;sndh_init:
; movem.l d0-a6,-(sp)
; bsr.w player
; movem.l (sp)+,d0-a6
; rts
;
;sndh_exit:
; movem.l d0-a6,-(sp)
; bsr.w player+4
; movem.l (sp)+,d0-a6
; rts
;
;sndh_vbl:
; movem.l d0-a6,-(sp)
; bsr.w player+8
; movem.l (sp)+,d0-a6
; rts
;
; section data
;
;player:
; incbin 'replaycode.bin'
; even
;http://phf.atari.org
;(EOF)