2017-12-28 12:23:44 +00:00
|
|
|
musicheader: MACRO
|
2017-12-26 17:50:32 +00:00
|
|
|
; number of tracks, track idx, address
|
|
|
|
dbw ((\1 - 1) << 6) + (\2 - 1), \3
|
2017-12-28 21:31:16 +00:00
|
|
|
ENDM
|
2017-12-26 17:50:32 +00:00
|
|
|
|
2015-01-20 22:26:16 +00:00
|
|
|
note: MACRO
|
|
|
|
dn (\1), (\2) - 1
|
2017-12-28 21:31:16 +00:00
|
|
|
ENDM
|
2015-01-20 22:26:16 +00:00
|
|
|
|
2017-12-28 12:23:44 +00:00
|
|
|
sound: MACRO
|
2015-12-07 16:28:58 +00:00
|
|
|
note \1, \2
|
|
|
|
db \3 ; intensity
|
|
|
|
dw \4 ; frequency
|
2017-12-28 21:31:16 +00:00
|
|
|
ENDM
|
2015-01-20 22:26:16 +00:00
|
|
|
|
2017-12-28 12:23:44 +00:00
|
|
|
noise: MACRO
|
2015-12-07 16:28:58 +00:00
|
|
|
note \1, \2 ; duration
|
|
|
|
db \3 ; intensity
|
|
|
|
db \4 ; frequency
|
2017-12-28 21:31:16 +00:00
|
|
|
ENDM
|
2015-12-07 16:28:58 +00:00
|
|
|
|
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
|
2017-12-28 12:23:44 +00:00
|
|
|
octave: MACRO
|
2015-12-07 03:36:09 +00:00
|
|
|
db notetype_cmd - (\1)
|
2017-12-28 21:31:16 +00:00
|
|
|
ENDM
|
2015-01-20 08:01:23 +00:00
|
|
|
|
2017-12-28 12:23:44 +00:00
|
|
|
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
|
2017-12-28 21:31:16 +00:00
|
|
|
ENDM
|
2015-01-20 08:01:23 +00:00
|
|
|
|
2017-12-15 05:38:52 +00:00
|
|
|
enum pitchoffset_cmd ; $d9
|
2017-12-28 12:23:44 +00:00
|
|
|
pitchoffset: MACRO
|
2016-07-29 14:40:54 +00:00
|
|
|
db pitchoffset_cmd
|
|
|
|
dn \1, \2 - 1 ; octave, key
|
2017-12-28 21:31:16 +00:00
|
|
|
ENDM
|
2015-01-20 08:01:23 +00:00
|
|
|
|
2017-12-15 05:38:52 +00:00
|
|
|
enum tempo_cmd ; $da
|
2017-12-28 12:23:44 +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
|
2017-12-28 21:31:16 +00:00
|
|
|
ENDM
|
2015-01-20 08:01:23 +00:00
|
|
|
|
2017-12-15 05:38:52 +00:00
|
|
|
enum dutycycle_cmd ; $db
|
2017-12-28 12:23:44 +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
|
2017-12-28 21:31:16 +00:00
|
|
|
ENDM
|
2015-01-20 08:01:23 +00:00
|
|
|
|
2017-12-15 05:38:52 +00:00
|
|
|
enum intensity_cmd ; $dc
|
2017-12-28 12:23:44 +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
|
2017-12-28 21:31:16 +00:00
|
|
|
ENDM
|
2015-01-20 08:01:23 +00:00
|
|
|
|
2017-12-15 05:38:52 +00:00
|
|
|
enum soundinput_cmd ; $dd
|
2017-12-28 12:23:44 +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
|
2017-12-28 21:31:16 +00:00
|
|
|
ENDM
|
2015-01-20 08:01:23 +00:00
|
|
|
|
2017-12-15 05:38:52 +00:00
|
|
|
enum sound_duty_cmd ; $de
|
2017-12-28 12:23:44 +00:00
|
|
|
sound_duty: MACRO
|
2016-05-10 20:38:40 +00:00
|
|
|
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
|
2017-12-28 21:31:16 +00:00
|
|
|
ENDM
|
2015-01-20 08:01:23 +00:00
|
|
|
|
2017-12-15 05:38:52 +00:00
|
|
|
enum togglesfx_cmd ; $df
|
2017-12-28 12:23:44 +00:00
|
|
|
togglesfx: MACRO
|
2015-12-07 03:36:09 +00:00
|
|
|
db togglesfx_cmd
|
2017-12-28 21:31:16 +00:00
|
|
|
ENDM
|
2015-01-20 08:01:23 +00:00
|
|
|
|
2017-12-15 05:38:52 +00:00
|
|
|
enum slidepitchto_cmd ; $e0
|
2017-12-28 12:23:44 +00:00
|
|
|
slidepitchto: MACRO
|
2016-05-10 18:33:24 +00:00
|
|
|
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
|
2017-12-28 21:31:16 +00:00
|
|
|
ENDM
|
2015-01-20 08:01:23 +00:00
|
|
|
|
2017-12-15 05:38:52 +00:00
|
|
|
enum vibrato_cmd ; $e1
|
2017-12-28 12:23:44 +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
|
2017-12-28 21:31:16 +00:00
|
|
|
ENDM
|
2015-01-20 08:01:23 +00:00
|
|
|
|
2017-12-15 05:38:52 +00:00
|
|
|
enum unknownmusic0xe2_cmd ; $e2
|
2017-12-28 12:23:44 +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
|
2017-12-28 21:31:16 +00:00
|
|
|
ENDM
|
2015-01-20 08:01:23 +00:00
|
|
|
|
2017-12-15 05:38:52 +00:00
|
|
|
enum togglenoise_cmd ; $e3
|
2017-12-28 12:23:44 +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
|
2017-12-28 21:31:16 +00:00
|
|
|
ENDM
|
2015-01-20 08:01:23 +00:00
|
|
|
|
2017-12-15 05:38:52 +00:00
|
|
|
enum panning_cmd ; $e4
|
2017-12-28 12:23:44 +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
|
2017-12-28 21:31:16 +00:00
|
|
|
ENDM
|
2015-01-20 08:01:23 +00:00
|
|
|
|
2017-12-15 05:38:52 +00:00
|
|
|
enum volume_cmd ; $e5
|
2017-12-28 12:23:44 +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
|
2017-12-28 21:31:16 +00:00
|
|
|
ENDM
|
2015-01-20 08:01:23 +00:00
|
|
|
|
2017-12-15 05:38:52 +00:00
|
|
|
enum tone_cmd ; $e6
|
2017-12-28 12:23:44 +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
|
2017-12-28 21:31:16 +00:00
|
|
|
ENDM
|
2015-01-20 08:01:23 +00:00
|
|
|
|
2017-12-15 05:38:52 +00:00
|
|
|
enum unknownmusic0xe7_cmd ; $e7
|
2017-12-28 12:23:44 +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
|
2017-12-28 21:31:16 +00:00
|
|
|
ENDM
|
2015-01-20 08:01:23 +00:00
|
|
|
|
2017-12-15 05:38:52 +00:00
|
|
|
enum unknownmusic0xe8_cmd ; $e8
|
2017-12-28 12:23:44 +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
|
2017-12-28 21:31:16 +00:00
|
|
|
ENDM
|
2015-01-20 08:01:23 +00:00
|
|
|
|
2017-12-15 05:38:52 +00:00
|
|
|
enum tempo_relative_cmd ; $e9
|
2017-12-28 12:23:44 +00:00
|
|
|
tempo_relative: MACRO
|
2015-12-08 21:06:13 +00:00
|
|
|
db tempo_relative_cmd
|
2015-01-20 08:01:23 +00:00
|
|
|
bigdw \1 ; value
|
2017-12-28 21:31:16 +00:00
|
|
|
ENDM
|
2015-01-20 08:01:23 +00:00
|
|
|
|
2017-12-15 05:38:52 +00:00
|
|
|
enum restartchannel_cmd ; $ea
|
2017-12-28 12:23:44 +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
|
2017-12-28 21:31:16 +00:00
|
|
|
ENDM
|
2015-01-20 08:01:23 +00:00
|
|
|
|
2017-12-15 05:38:52 +00:00
|
|
|
enum newsong_cmd ; $eb
|
2017-12-28 12:23:44 +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
|
2017-12-28 21:31:16 +00:00
|
|
|
ENDM
|
2015-01-20 08:01:23 +00:00
|
|
|
|
2017-12-15 05:38:52 +00:00
|
|
|
enum sfxpriorityon_cmd ; $ec
|
2017-12-28 12:23:44 +00:00
|
|
|
sfxpriorityon: MACRO
|
2015-12-07 03:36:09 +00:00
|
|
|
db sfxpriorityon_cmd
|
2017-12-28 21:31:16 +00:00
|
|
|
ENDM
|
2015-01-20 08:01:23 +00:00
|
|
|
|
2017-12-15 05:38:52 +00:00
|
|
|
enum sfxpriorityoff_cmd ; $ed
|
2017-12-28 12:23:44 +00:00
|
|
|
sfxpriorityoff: MACRO
|
2015-12-07 03:36:09 +00:00
|
|
|
db sfxpriorityoff_cmd
|
2017-12-28 21:31:16 +00:00
|
|
|
ENDM
|
2015-01-20 08:01:23 +00:00
|
|
|
|
2017-12-15 05:38:52 +00:00
|
|
|
enum unknownmusic0xee_cmd ; $ee
|
2017-12-28 12:23:44 +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
|
2017-12-28 21:31:16 +00:00
|
|
|
ENDM
|
2015-01-20 08:01:23 +00:00
|
|
|
|
2017-12-15 05:38:52 +00:00
|
|
|
enum stereopanning_cmd ; $ef
|
2017-12-28 12:23:44 +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
|
2017-12-28 21:31:16 +00:00
|
|
|
ENDM
|
2015-01-20 08:01:23 +00:00
|
|
|
|
2017-12-15 05:38:52 +00:00
|
|
|
enum sfxtogglenoise_cmd ; $f0
|
2017-12-28 12:23:44 +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
|
2017-12-28 21:31:16 +00:00
|
|
|
ENDM
|
2015-01-20 08:01:23 +00:00
|
|
|
|
2017-12-15 05:38:52 +00:00
|
|
|
enum music0xf1_cmd ; $f1
|
2017-12-28 12:23:44 +00:00
|
|
|
music0xf1: MACRO
|
2015-12-07 03:36:09 +00:00
|
|
|
db music0xf1_cmd
|
2017-12-28 21:31:16 +00:00
|
|
|
ENDM
|
2015-01-20 08:01:23 +00:00
|
|
|
|
2017-12-15 05:38:52 +00:00
|
|
|
enum music0xf2_cmd ; $f2
|
2017-12-28 12:23:44 +00:00
|
|
|
music0xf2: MACRO
|
2015-12-07 03:36:09 +00:00
|
|
|
db music0xf2_cmd
|
2017-12-28 21:31:16 +00:00
|
|
|
ENDM
|
2015-01-20 08:01:23 +00:00
|
|
|
|
2017-12-15 05:38:52 +00:00
|
|
|
enum music0xf3_cmd ; $f3
|
2017-12-28 12:23:44 +00:00
|
|
|
music0xf3: MACRO
|
2015-12-07 03:36:09 +00:00
|
|
|
db music0xf3_cmd
|
2017-12-28 21:31:16 +00:00
|
|
|
ENDM
|
2015-01-20 08:01:23 +00:00
|
|
|
|
2017-12-15 05:38:52 +00:00
|
|
|
enum music0xf4_cmd ; $f4
|
2017-12-28 12:23:44 +00:00
|
|
|
music0xf4: MACRO
|
2015-12-07 03:36:09 +00:00
|
|
|
db music0xf4_cmd
|
2017-12-28 21:31:16 +00:00
|
|
|
ENDM
|
2015-01-20 08:01:23 +00:00
|
|
|
|
2017-12-15 05:38:52 +00:00
|
|
|
enum music0xf5_cmd ; $f5
|
2017-12-28 12:23:44 +00:00
|
|
|
music0xf5: MACRO
|
2015-12-07 03:36:09 +00:00
|
|
|
db music0xf5_cmd
|
2017-12-28 21:31:16 +00:00
|
|
|
ENDM
|
2015-01-20 08:01:23 +00:00
|
|
|
|
2017-12-15 05:38:52 +00:00
|
|
|
enum music0xf6_cmd ; $f6
|
2017-12-28 12:23:44 +00:00
|
|
|
music0xf6: MACRO
|
2015-12-07 03:36:09 +00:00
|
|
|
db music0xf6_cmd
|
2017-12-28 21:31:16 +00:00
|
|
|
ENDM
|
2015-01-20 08:01:23 +00:00
|
|
|
|
2017-12-15 05:38:52 +00:00
|
|
|
enum music0xf7_cmd ; $f7
|
2017-12-28 12:23:44 +00:00
|
|
|
music0xf7: MACRO
|
2015-12-07 03:36:09 +00:00
|
|
|
db music0xf7_cmd
|
2017-12-28 21:31:16 +00:00
|
|
|
ENDM
|
2015-01-20 08:01:23 +00:00
|
|
|
|
2017-12-15 05:38:52 +00:00
|
|
|
enum music0xf8_cmd ; $f8
|
2017-12-28 12:23:44 +00:00
|
|
|
music0xf8: MACRO
|
2015-12-07 03:36:09 +00:00
|
|
|
db music0xf8_cmd
|
2017-12-28 21:31:16 +00:00
|
|
|
ENDM
|
2015-01-20 08:01:23 +00:00
|
|
|
|
2017-12-15 05:38:52 +00:00
|
|
|
enum unknownmusic0xf9_cmd ; $f9
|
2017-12-28 12:23:44 +00:00
|
|
|
unknownmusic0xf9: MACRO
|
2015-12-07 03:36:09 +00:00
|
|
|
db unknownmusic0xf9_cmd
|
2017-12-28 21:31:16 +00:00
|
|
|
ENDM
|
2015-01-20 08:01:23 +00:00
|
|
|
|
2017-12-15 05:38:52 +00:00
|
|
|
enum setcondition_cmd ; $fa
|
2017-12-28 12:23:44 +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
|
2017-12-28 21:31:16 +00:00
|
|
|
ENDM
|
2015-01-20 08:01:23 +00:00
|
|
|
|
2017-12-15 05:38:52 +00:00
|
|
|
enum jumpif_cmd ; $fb
|
2017-12-28 12:23:44 +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
|
2017-12-28 21:31:16 +00:00
|
|
|
ENDM
|
2015-01-20 08:01:23 +00:00
|
|
|
|
2017-12-15 05:38:52 +00:00
|
|
|
enum jumpchannel_cmd ; $fc
|
2017-12-28 12:23:44 +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
|
2017-12-28 21:31:16 +00:00
|
|
|
ENDM
|
2015-01-20 08:01:23 +00:00
|
|
|
|
2017-12-15 05:38:52 +00:00
|
|
|
enum loopchannel_cmd ; $fd
|
2017-12-28 12:23:44 +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
|
2017-12-28 21:31:16 +00:00
|
|
|
ENDM
|
2015-01-20 08:01:23 +00:00
|
|
|
|
2017-12-15 05:38:52 +00:00
|
|
|
enum callchannel_cmd ; $fe
|
2017-12-28 12:23:44 +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
|
2017-12-28 21:31:16 +00:00
|
|
|
ENDM
|
2015-01-20 08:01:23 +00:00
|
|
|
|
2017-12-15 05:38:52 +00:00
|
|
|
enum endchannel_cmd ; $ff
|
2017-12-28 12:23:44 +00:00
|
|
|
endchannel: MACRO
|
2015-12-07 03:36:09 +00:00
|
|
|
db endchannel_cmd
|
2017-12-28 21:31:16 +00:00
|
|
|
ENDM
|