summaryrefslogtreecommitdiff
path: root/macros/sound.asm
diff options
context:
space:
mode:
authorPikalaxALT <PikalaxALT@gmail.com>2015-12-07 11:28:58 -0500
committerPikalaxALT <PikalaxALT@gmail.com>2015-12-07 11:28:58 -0500
commit159d3efc8f369fcb284ef63a69ec502fb199597a (patch)
tree3266a9e47bce36092eb896bce84c553d853187ca /macros/sound.asm
parent02d05255fe96e9c06d176c0960395fb5aeb36211 (diff)
new and updated music macros
Diffstat (limited to 'macros/sound.asm')
-rw-r--r--macros/sound.asm31
1 files changed, 25 insertions, 6 deletions
diff --git a/macros/sound.asm b/macros/sound.asm
index cb81fd7d3..c580ed7f7 100644
--- a/macros/sound.asm
+++ b/macros/sound.asm
@@ -3,15 +3,20 @@ note: MACRO
ENDM
sound: macro
- db \1 ; duration
- db \2 ; intensity
- dw \3 ; frequency
+ note \1, \2
+ db \3 ; intensity
+ dw \4 ; frequency
endm
noise: macro
- db \1 ; duration
- db \2 ; intensity
- db \3 ; frequency
+ note \1, \2 ; duration
+ db \3 ; intensity
+ db \4 ; frequency
+ endm
+
+musicheader: macro
+ ; number of tracks, ??, address
+ dbw ((\1 - 1) << 6) + (\2 - 1), \3
endm
; pitch
@@ -29,6 +34,20 @@ A_ EQU 10
A# EQU 11
B_ EQU 12
+; channel
+ const_def
+ const CHAN1
+ const CHAN2
+ const CHAN3
+ const CHAN4
+NUM_MUSIC_CHANS EQU const_value
+NUM_NOISE_CHANS EQU const_value
+ const CHAN5
+ const CHAN6
+ const CHAN7
+ const CHAN8
+NUM_CHANNELS EQU const_value
+
enum_start $d8
enum notetype_cmd
octave: macro