2015-12-07 23:33:04 +00:00
|
|
|
; pitch
|
2017-12-15 17:38:59 +00:00
|
|
|
; FrequencyTable indexes (see audio/notes.asm)
|
2019-09-02 08:40:58 +00:00
|
|
|
const_def 1
|
2017-12-09 18:28:23 +00:00
|
|
|
const C_ ; 1
|
|
|
|
const C# ; 2
|
|
|
|
const D_ ; 3
|
|
|
|
const D# ; 4
|
|
|
|
const E_ ; 5
|
|
|
|
const F_ ; 6
|
|
|
|
const F# ; 7
|
|
|
|
const G_ ; 8
|
|
|
|
const G# ; 9
|
|
|
|
const A_ ; a
|
|
|
|
const A# ; b
|
|
|
|
const B_ ; c
|
2022-06-06 21:25:42 +00:00
|
|
|
DEF NUM_NOTES EQU const_value - 1
|
2015-12-07 23:33:04 +00:00
|
|
|
|
|
|
|
; channel
|
2018-04-01 15:01:51 +00:00
|
|
|
; ChannelPointers indexes (see audio/engine.asm)
|
2015-12-07 23:33:04 +00:00
|
|
|
const_def
|
2017-12-09 18:28:23 +00:00
|
|
|
const CHAN1 ; 0
|
|
|
|
const CHAN2 ; 1
|
|
|
|
const CHAN3 ; 2
|
|
|
|
const CHAN4 ; 3
|
2022-06-06 21:25:42 +00:00
|
|
|
DEF NUM_MUSIC_CHANS EQU const_value
|
2017-12-09 18:28:23 +00:00
|
|
|
const CHAN5 ; 4
|
|
|
|
const CHAN6 ; 5
|
|
|
|
const CHAN7 ; 6
|
|
|
|
const CHAN8 ; 7
|
2022-06-06 21:25:42 +00:00
|
|
|
DEF NUM_NOISE_CHANS EQU const_value - NUM_MUSIC_CHANS
|
|
|
|
DEF NUM_CHANNELS EQU const_value
|
2015-12-07 23:33:04 +00:00
|
|
|
|
2022-09-11 05:05:07 +00:00
|
|
|
; channel_struct members (see macros/ram.asm)
|
2021-03-04 03:22:41 +00:00
|
|
|
rsreset
|
2022-06-06 21:25:42 +00:00
|
|
|
DEF CHANNEL_MUSIC_ID rw
|
|
|
|
DEF CHANNEL_MUSIC_BANK rb
|
|
|
|
DEF CHANNEL_FLAGS1 rb
|
|
|
|
DEF CHANNEL_FLAGS2 rb
|
|
|
|
DEF CHANNEL_FLAGS3 rb
|
|
|
|
DEF CHANNEL_MUSIC_ADDRESS rw
|
|
|
|
DEF CHANNEL_LAST_MUSIC_ADDRESS rw
|
|
|
|
rb_skip 2
|
|
|
|
DEF CHANNEL_NOTE_FLAGS rb
|
|
|
|
DEF CHANNEL_CONDITION rb
|
|
|
|
DEF CHANNEL_DUTY_CYCLE rb
|
|
|
|
DEF CHANNEL_VOLUME_ENVELOPE rb
|
|
|
|
DEF CHANNEL_FREQUENCY rw
|
|
|
|
DEF CHANNEL_PITCH rb
|
|
|
|
DEF CHANNEL_OCTAVE rb
|
|
|
|
DEF CHANNEL_TRANSPOSITION rb
|
|
|
|
DEF CHANNEL_NOTE_DURATION rb
|
|
|
|
DEF CHANNEL_FIELD16 rb
|
|
|
|
rb_skip
|
|
|
|
DEF CHANNEL_LOOP_COUNT rb
|
|
|
|
DEF CHANNEL_TEMPO rw
|
|
|
|
DEF CHANNEL_TRACKS rb
|
|
|
|
DEF CHANNEL_DUTY_CYCLE_PATTERN rb
|
|
|
|
DEF CHANNEL_VIBRATO_DELAY_COUNT rb
|
|
|
|
DEF CHANNEL_VIBRATO_DELAY rb
|
|
|
|
DEF CHANNEL_VIBRATO_EXTENT rb
|
|
|
|
DEF CHANNEL_VIBRATO_RATE rb
|
|
|
|
DEF CHANNEL_PITCH_SLIDE_TARGET rw
|
|
|
|
DEF CHANNEL_PITCH_SLIDE_AMOUNT rb
|
|
|
|
DEF CHANNEL_PITCH_SLIDE_AMOUNT_FRACTION rb
|
|
|
|
DEF CHANNEL_FIELD25 rb
|
|
|
|
rb_skip
|
|
|
|
DEF CHANNEL_PITCH_OFFSET rw
|
|
|
|
DEF CHANNEL_FIELD29 rb
|
|
|
|
DEF CHANNEL_FIELD2A rw
|
|
|
|
DEF CHANNEL_FIELD2C rb
|
|
|
|
DEF CHANNEL_NOTE_LENGTH rb
|
|
|
|
DEF CHANNEL_FIELD2E rb
|
|
|
|
DEF CHANNEL_FIELD2F rb
|
|
|
|
DEF CHANNEL_FIELD30 rb
|
|
|
|
rb_skip
|
|
|
|
DEF CHANNEL_STRUCT_LENGTH EQU _RS
|
2018-06-04 09:35:27 +00:00
|
|
|
|
2022-06-06 21:25:42 +00:00
|
|
|
DEF NOISE_CHAN_F EQU 2 ; bit set in CHAN5-CHAN7
|
2018-04-05 15:44:02 +00:00
|
|
|
|
2015-12-07 23:33:04 +00:00
|
|
|
; Flags1
|
2017-12-09 18:28:23 +00:00
|
|
|
const_def
|
|
|
|
const SOUND_CHANNEL_ON ; 0
|
|
|
|
const SOUND_SUBROUTINE ; 1
|
|
|
|
const SOUND_LOOPING ; 2
|
|
|
|
const SOUND_SFX ; 3
|
|
|
|
const SOUND_NOISE ; 4
|
2021-04-12 18:48:05 +00:00
|
|
|
const SOUND_CRY ; 5
|
2015-12-07 23:33:04 +00:00
|
|
|
|
|
|
|
; Flags2
|
2017-12-09 18:28:23 +00:00
|
|
|
const_def
|
2019-09-02 08:40:58 +00:00
|
|
|
const SOUND_VIBRATO ; 0
|
|
|
|
const SOUND_PITCH_SLIDE ; 1
|
|
|
|
const SOUND_DUTY_LOOP ; 2
|
|
|
|
const SOUND_UNKN_0B ; 3
|
|
|
|
const SOUND_PITCH_OFFSET ; 4
|
|
|
|
const SOUND_UNKN_0D ; 5
|
|
|
|
const SOUND_UNKN_0E ; 6
|
|
|
|
const SOUND_UNKN_0F ; 7
|
2015-12-07 23:33:04 +00:00
|
|
|
|
|
|
|
; Flags3
|
2017-12-09 18:28:23 +00:00
|
|
|
const_def
|
|
|
|
const SOUND_VIBRATO_DIR ; 0
|
2019-09-02 08:40:58 +00:00
|
|
|
const SOUND_PITCH_SLIDE_DIR ; 1
|
2015-12-07 23:33:04 +00:00
|
|
|
|
|
|
|
; NoteFlags
|
2017-12-09 18:28:23 +00:00
|
|
|
const_def
|
|
|
|
const NOTE_DUTY_OVERRIDE ; 0
|
|
|
|
const NOTE_FREQ_OVERRIDE ; 1
|
|
|
|
const NOTE_UNUSED ; 2
|
2019-09-02 08:40:58 +00:00
|
|
|
const NOTE_PITCH_SWEEP ; 3
|
2017-12-09 18:28:23 +00:00
|
|
|
const NOTE_NOISE_SAMPLING ; 4
|
|
|
|
const NOTE_REST ; 5
|
|
|
|
const NOTE_VIBRATO_OVERRIDE ; 6
|
|
|
|
|
2018-01-23 21:45:34 +00:00
|
|
|
; wVolume
|
2022-06-06 21:25:42 +00:00
|
|
|
DEF VOLUME_SO1_F EQU 3
|
|
|
|
DEF VOLUME_SO2_F EQU 7
|
|
|
|
DEF VOLUME_SO1_LEVEL EQU %00000111
|
|
|
|
DEF VOLUME_SO2_LEVEL EQU %01110000
|
|
|
|
DEF MAX_VOLUME EQU $77
|
2017-12-16 05:50:03 +00:00
|
|
|
|
2018-01-23 22:39:09 +00:00
|
|
|
; wSoundInput
|
2022-06-06 21:25:42 +00:00
|
|
|
DEF SOUND_INPUT_CH1_F EQU 0
|
|
|
|
DEF SOUND_INPUT_CH2_F EQU 1
|
|
|
|
DEF SOUND_INPUT_CH3_F EQU 2
|
|
|
|
DEF SOUND_INPUT_CH4_F EQU 3
|
|
|
|
DEF SOUND_INPUT_GLOBAL_F EQU 7
|
2017-12-16 05:50:03 +00:00
|
|
|
|
2018-01-23 21:45:34 +00:00
|
|
|
; wLowHealthAlarm
|
2022-06-06 21:25:42 +00:00
|
|
|
DEF DANGER_PITCH_F EQU 4
|
|
|
|
DEF DANGER_ON_F EQU 7
|
2017-12-16 05:50:03 +00:00
|
|
|
|
2018-01-23 22:39:09 +00:00
|
|
|
; wMusicFade
|
2022-06-06 21:25:42 +00:00
|
|
|
DEF MUSIC_FADE_IN_F EQU 7
|