2015-01-20 22:26:16 +00:00
|
|
|
note: MACRO
|
|
|
|
dn (\1), (\2) - 1
|
|
|
|
ENDM
|
|
|
|
|
|
|
|
sound: macro
|
2015-12-07 16:28:58 +00:00
|
|
|
note \1, \2
|
|
|
|
db \3 ; intensity
|
|
|
|
dw \4 ; frequency
|
2015-01-20 22:26:16 +00:00
|
|
|
endm
|
|
|
|
|
|
|
|
noise: macro
|
2015-12-07 16:28:58 +00:00
|
|
|
note \1, \2 ; duration
|
|
|
|
db \3 ; intensity
|
|
|
|
db \4 ; frequency
|
|
|
|
endm
|
|
|
|
|
|
|
|
musicheader: macro
|
2016-03-02 03:31:21 +00:00
|
|
|
; number of tracks, track idx, address
|
2015-12-07 16:28:58 +00:00
|
|
|
dbw ((\1 - 1) << 6) + (\2 - 1), \3
|
2015-01-20 22:26:16 +00:00
|
|
|
endm
|
|
|
|
|
2015-12-07 17:42:35 +00:00
|
|
|
cry_header: macro
|
|
|
|
dw \1, \2, \3
|
|
|
|
endm
|
|
|
|
|
2017-12-12 18:22:19 +00:00
|
|
|
; MusicCommands indexes (see audio/engine.asm)
|
2015-12-07 03:36:09 +00:00
|
|
|
enum_start $d8
|
2017-12-12 18:22:19 +00:00
|
|
|
|
2017-12-15 05:38:52 +00:00
|
|
|
enum notetype_cmd ; $d8
|
2015-01-20 08:01:23 +00:00
|
|
|
octave: macro
|
2015-12-07 03:36:09 +00:00
|
|
|
db notetype_cmd - (\1)
|
2015-01-20 08:01:23 +00:00
|
|
|
endm
|
|
|
|
|
|
|
|
notetype: macro
|
2015-12-07 03:36:09 +00:00
|
|
|
db notetype_cmd
|
2015-01-20 08:01:23 +00:00
|
|
|
db \1 ; note_length
|
|
|
|
if _NARG >= 2
|
|
|
|
db \2 ; intensity
|
|
|
|
endc
|
|
|
|
endm
|
|
|
|
|
2017-12-15 05:38:52 +00:00
|
|
|
enum pitchoffset_cmd ; $d9
|
2016-07-29 14:40:54 +00:00
|
|
|
pitchoffset: macro
|
|
|
|
db pitchoffset_cmd
|
|
|
|
dn \1, \2 - 1 ; octave, key
|
2015-01-20 08:01:23 +00:00
|
|
|
endm
|
|
|
|
|
2017-12-15 05:38:52 +00:00
|
|
|
enum tempo_cmd ; $da
|
2015-01-20 08:01:23 +00:00
|
|
|
tempo: macro
|
2015-12-07 03:36:09 +00:00
|
|
|
db tempo_cmd
|
2015-01-20 08:01:23 +00:00
|
|
|
bigdw \1 ; tempo
|
|
|
|
endm
|
|
|
|
|
2017-12-15 05:38:52 +00:00
|
|
|
enum dutycycle_cmd ; $db
|
2015-01-20 08:01:23 +00:00
|
|
|
dutycycle: macro
|
2015-12-07 03:36:09 +00:00
|
|
|
db dutycycle_cmd
|
2015-01-20 08:01:23 +00:00
|
|
|
db \1 ; duty_cycle
|
|
|
|
endm
|
|
|
|
|
2017-12-15 05:38:52 +00:00
|
|
|
enum intensity_cmd ; $dc
|
2015-01-20 08:01:23 +00:00
|
|
|
intensity: macro
|
2015-12-07 03:36:09 +00:00
|
|
|
db intensity_cmd
|
2015-01-20 08:01:23 +00:00
|
|
|
db \1 ; intensity
|
|
|
|
endm
|
|
|
|
|
2017-12-15 05:38:52 +00:00
|
|
|
enum soundinput_cmd ; $dd
|
2015-01-20 08:01:23 +00:00
|
|
|
soundinput: macro
|
2015-12-07 03:36:09 +00:00
|
|
|
db soundinput_cmd
|
2015-01-20 08:01:23 +00:00
|
|
|
db \1 ; input
|
|
|
|
endm
|
|
|
|
|
2017-12-15 05:38:52 +00:00
|
|
|
enum sound_duty_cmd ; $de
|
2016-05-10 20:38:40 +00:00
|
|
|
sound_duty: macro
|
|
|
|
db sound_duty_cmd
|
2017-12-24 17:52:05 +00:00
|
|
|
if _NARG == 4
|
2016-05-10 20:46:46 +00:00
|
|
|
db \1 | (\2 << 2) | (\3 << 4) | (\4 << 6) ; duty sequence
|
2017-12-24 17:52:05 +00:00
|
|
|
else
|
|
|
|
db \1 ; one-byte duty value for legacy support
|
|
|
|
endc
|
2015-01-20 08:01:23 +00:00
|
|
|
endm
|
|
|
|
|
2017-12-15 05:38:52 +00:00
|
|
|
enum togglesfx_cmd ; $df
|
2015-01-20 08:01:23 +00:00
|
|
|
togglesfx: macro
|
2015-12-07 03:36:09 +00:00
|
|
|
db togglesfx_cmd
|
2015-01-20 08:01:23 +00:00
|
|
|
endm
|
|
|
|
|
2017-12-15 05:38:52 +00:00
|
|
|
enum slidepitchto_cmd ; $e0
|
2016-05-10 18:33:24 +00:00
|
|
|
slidepitchto: macro
|
|
|
|
db slidepitchto_cmd
|
2016-07-29 14:40:54 +00:00
|
|
|
db \1 - 1 ; duration
|
2015-12-07 03:36:09 +00:00
|
|
|
dn \2, \3 ; octave, pitch
|
2015-01-20 08:01:23 +00:00
|
|
|
endm
|
|
|
|
|
2017-12-15 05:38:52 +00:00
|
|
|
enum vibrato_cmd ; $e1
|
2015-01-20 08:01:23 +00:00
|
|
|
vibrato: macro
|
2015-12-07 03:36:09 +00:00
|
|
|
db vibrato_cmd
|
2015-01-20 08:01:23 +00:00
|
|
|
db \1 ; delay
|
|
|
|
db \2 ; extent
|
|
|
|
endm
|
|
|
|
|
2017-12-15 05:38:52 +00:00
|
|
|
enum unknownmusic0xe2_cmd ; $e2
|
2015-01-20 08:01:23 +00:00
|
|
|
unknownmusic0xe2: macro
|
2015-12-07 03:36:09 +00:00
|
|
|
db unknownmusic0xe2_cmd
|
2015-01-20 08:01:23 +00:00
|
|
|
db \1 ; unknown
|
|
|
|
endm
|
|
|
|
|
2017-12-15 05:38:52 +00:00
|
|
|
enum togglenoise_cmd ; $e3
|
2015-01-20 08:01:23 +00:00
|
|
|
togglenoise: macro
|
2015-12-07 03:36:09 +00:00
|
|
|
db togglenoise_cmd
|
2015-01-20 08:01:23 +00:00
|
|
|
db \1 ; id
|
|
|
|
endm
|
|
|
|
|
2017-12-15 05:38:52 +00:00
|
|
|
enum panning_cmd ; $e4
|
2015-01-20 08:01:23 +00:00
|
|
|
panning: macro
|
2015-12-07 03:36:09 +00:00
|
|
|
db panning_cmd
|
2015-01-20 08:01:23 +00:00
|
|
|
db \1 ; tracks
|
|
|
|
endm
|
|
|
|
|
2017-12-15 05:38:52 +00:00
|
|
|
enum volume_cmd ; $e5
|
2015-01-20 08:01:23 +00:00
|
|
|
volume: macro
|
2015-12-07 03:36:09 +00:00
|
|
|
db volume_cmd
|
2015-01-20 08:01:23 +00:00
|
|
|
db \1 ; volume
|
|
|
|
endm
|
|
|
|
|
2017-12-15 05:38:52 +00:00
|
|
|
enum tone_cmd ; $e6
|
2015-01-20 08:01:23 +00:00
|
|
|
tone: macro
|
2015-12-07 03:36:09 +00:00
|
|
|
db tone_cmd
|
2015-01-20 08:01:23 +00:00
|
|
|
bigdw \1 ; tone
|
|
|
|
endm
|
|
|
|
|
2017-12-15 05:38:52 +00:00
|
|
|
enum unknownmusic0xe7_cmd ; $e7
|
2015-01-20 08:01:23 +00:00
|
|
|
unknownmusic0xe7: macro
|
2015-12-07 03:36:09 +00:00
|
|
|
db unknownmusic0xe7_cmd
|
2015-01-20 08:01:23 +00:00
|
|
|
db \1 ; unknown
|
|
|
|
endm
|
|
|
|
|
2017-12-15 05:38:52 +00:00
|
|
|
enum unknownmusic0xe8_cmd ; $e8
|
2015-01-20 08:01:23 +00:00
|
|
|
unknownmusic0xe8: macro
|
2015-12-07 03:36:09 +00:00
|
|
|
db unknownmusic0xe8_cmd
|
2015-01-20 08:01:23 +00:00
|
|
|
db \1 ; unknown
|
|
|
|
endm
|
|
|
|
|
2017-12-15 05:38:52 +00:00
|
|
|
enum tempo_relative_cmd ; $e9
|
2015-12-08 21:06:13 +00:00
|
|
|
tempo_relative: macro
|
|
|
|
db tempo_relative_cmd
|
2015-01-20 08:01:23 +00:00
|
|
|
bigdw \1 ; value
|
|
|
|
endm
|
|
|
|
|
2017-12-15 05:38:52 +00:00
|
|
|
enum restartchannel_cmd ; $ea
|
2015-01-20 08:01:23 +00:00
|
|
|
restartchannel: macro
|
2015-12-07 03:36:09 +00:00
|
|
|
db restartchannel_cmd
|
2015-01-20 08:01:23 +00:00
|
|
|
dw \1 ; address
|
|
|
|
endm
|
|
|
|
|
2017-12-15 05:38:52 +00:00
|
|
|
enum newsong_cmd ; $eb
|
2015-01-20 08:01:23 +00:00
|
|
|
newsong: macro
|
2015-12-07 03:36:09 +00:00
|
|
|
db newsong_cmd
|
2015-01-20 08:01:23 +00:00
|
|
|
bigdw \1 ; id
|
|
|
|
endm
|
|
|
|
|
2017-12-15 05:38:52 +00:00
|
|
|
enum sfxpriorityon_cmd ; $ec
|
2015-01-20 08:01:23 +00:00
|
|
|
sfxpriorityon: macro
|
2015-12-07 03:36:09 +00:00
|
|
|
db sfxpriorityon_cmd
|
2015-01-20 08:01:23 +00:00
|
|
|
endm
|
|
|
|
|
2017-12-15 05:38:52 +00:00
|
|
|
enum sfxpriorityoff_cmd ; $ed
|
2015-01-20 08:01:23 +00:00
|
|
|
sfxpriorityoff: macro
|
2015-12-07 03:36:09 +00:00
|
|
|
db sfxpriorityoff_cmd
|
2015-01-20 08:01:23 +00:00
|
|
|
endm
|
|
|
|
|
2017-12-15 05:38:52 +00:00
|
|
|
enum unknownmusic0xee_cmd ; $ee
|
2015-01-20 08:01:23 +00:00
|
|
|
unknownmusic0xee: macro
|
2015-12-07 03:36:09 +00:00
|
|
|
db unknownmusic0xee_cmd
|
2015-01-20 08:01:23 +00:00
|
|
|
dw \1 ; address
|
|
|
|
endm
|
|
|
|
|
2017-12-15 05:38:52 +00:00
|
|
|
enum stereopanning_cmd ; $ef
|
2015-01-20 08:01:23 +00:00
|
|
|
stereopanning: macro
|
2015-12-07 03:36:09 +00:00
|
|
|
db stereopanning_cmd
|
2015-01-20 08:01:23 +00:00
|
|
|
db \1 ; tracks
|
|
|
|
endm
|
|
|
|
|
2017-12-15 05:38:52 +00:00
|
|
|
enum sfxtogglenoise_cmd ; $f0
|
2015-01-20 08:01:23 +00:00
|
|
|
sfxtogglenoise: macro
|
2015-12-07 03:36:09 +00:00
|
|
|
db sfxtogglenoise_cmd
|
2015-01-20 08:01:23 +00:00
|
|
|
db \1 ; id
|
|
|
|
endm
|
|
|
|
|
2017-12-15 05:38:52 +00:00
|
|
|
enum music0xf1_cmd ; $f1
|
2015-01-20 08:01:23 +00:00
|
|
|
music0xf1: macro
|
2015-12-07 03:36:09 +00:00
|
|
|
db music0xf1_cmd
|
2015-01-20 08:01:23 +00:00
|
|
|
endm
|
|
|
|
|
2017-12-15 05:38:52 +00:00
|
|
|
enum music0xf2_cmd ; $f2
|
2015-01-20 08:01:23 +00:00
|
|
|
music0xf2: macro
|
2015-12-07 03:36:09 +00:00
|
|
|
db music0xf2_cmd
|
2015-01-20 08:01:23 +00:00
|
|
|
endm
|
|
|
|
|
2017-12-15 05:38:52 +00:00
|
|
|
enum music0xf3_cmd ; $f3
|
2015-01-20 08:01:23 +00:00
|
|
|
music0xf3: macro
|
2015-12-07 03:36:09 +00:00
|
|
|
db music0xf3_cmd
|
2015-01-20 08:01:23 +00:00
|
|
|
endm
|
|
|
|
|
2017-12-15 05:38:52 +00:00
|
|
|
enum music0xf4_cmd ; $f4
|
2015-01-20 08:01:23 +00:00
|
|
|
music0xf4: macro
|
2015-12-07 03:36:09 +00:00
|
|
|
db music0xf4_cmd
|
2015-01-20 08:01:23 +00:00
|
|
|
endm
|
|
|
|
|
2017-12-15 05:38:52 +00:00
|
|
|
enum music0xf5_cmd ; $f5
|
2015-01-20 08:01:23 +00:00
|
|
|
music0xf5: macro
|
2015-12-07 03:36:09 +00:00
|
|
|
db music0xf5_cmd
|
2015-01-20 08:01:23 +00:00
|
|
|
endm
|
|
|
|
|
2017-12-15 05:38:52 +00:00
|
|
|
enum music0xf6_cmd ; $f6
|
2015-01-20 08:01:23 +00:00
|
|
|
music0xf6: macro
|
2015-12-07 03:36:09 +00:00
|
|
|
db music0xf6_cmd
|
2015-01-20 08:01:23 +00:00
|
|
|
endm
|
|
|
|
|
2017-12-15 05:38:52 +00:00
|
|
|
enum music0xf7_cmd ; $f7
|
2015-01-20 08:01:23 +00:00
|
|
|
music0xf7: macro
|
2015-12-07 03:36:09 +00:00
|
|
|
db music0xf7_cmd
|
2015-01-20 08:01:23 +00:00
|
|
|
endm
|
|
|
|
|
2017-12-15 05:38:52 +00:00
|
|
|
enum music0xf8_cmd ; $f8
|
2015-01-20 08:01:23 +00:00
|
|
|
music0xf8: macro
|
2015-12-07 03:36:09 +00:00
|
|
|
db music0xf8_cmd
|
2015-01-20 08:01:23 +00:00
|
|
|
endm
|
|
|
|
|
2017-12-15 05:38:52 +00:00
|
|
|
enum unknownmusic0xf9_cmd ; $f9
|
2015-01-20 08:01:23 +00:00
|
|
|
unknownmusic0xf9: macro
|
2015-12-07 03:36:09 +00:00
|
|
|
db unknownmusic0xf9_cmd
|
2015-01-20 08:01:23 +00:00
|
|
|
endm
|
|
|
|
|
2017-12-15 05:38:52 +00:00
|
|
|
enum setcondition_cmd ; $fa
|
2015-01-20 08:01:23 +00:00
|
|
|
setcondition: macro
|
2015-12-07 03:36:09 +00:00
|
|
|
db setcondition_cmd
|
2015-01-20 08:01:23 +00:00
|
|
|
db \1 ; condition
|
|
|
|
endm
|
|
|
|
|
2017-12-15 05:38:52 +00:00
|
|
|
enum jumpif_cmd ; $fb
|
2015-01-20 08:01:23 +00:00
|
|
|
jumpif: macro
|
2015-12-07 03:36:09 +00:00
|
|
|
db jumpif_cmd
|
2015-01-20 08:01:23 +00:00
|
|
|
db \1 ; condition
|
|
|
|
dw \2 ; address
|
|
|
|
endm
|
|
|
|
|
2017-12-15 05:38:52 +00:00
|
|
|
enum jumpchannel_cmd ; $fc
|
2015-01-20 08:01:23 +00:00
|
|
|
jumpchannel: macro
|
2015-12-07 03:36:09 +00:00
|
|
|
db jumpchannel_cmd
|
2015-01-20 08:01:23 +00:00
|
|
|
dw \1 ; address
|
|
|
|
endm
|
|
|
|
|
2017-12-15 05:38:52 +00:00
|
|
|
enum loopchannel_cmd ; $fd
|
2015-01-20 08:01:23 +00:00
|
|
|
loopchannel: macro
|
2015-12-07 03:36:09 +00:00
|
|
|
db loopchannel_cmd
|
2015-01-20 08:01:23 +00:00
|
|
|
db \1 ; count
|
|
|
|
dw \2 ; address
|
|
|
|
endm
|
|
|
|
|
2017-12-15 05:38:52 +00:00
|
|
|
enum callchannel_cmd ; $fe
|
2015-01-20 08:01:23 +00:00
|
|
|
callchannel: macro
|
2015-12-07 03:36:09 +00:00
|
|
|
db callchannel_cmd
|
2015-01-20 08:01:23 +00:00
|
|
|
dw \1 ; address
|
|
|
|
endm
|
|
|
|
|
2017-12-15 05:38:52 +00:00
|
|
|
enum endchannel_cmd ; $ff
|
2015-01-20 08:01:23 +00:00
|
|
|
endchannel: macro
|
2015-12-07 03:36:09 +00:00
|
|
|
db endchannel_cmd
|
2015-01-20 08:01:23 +00:00
|
|
|
endm
|