diff options
| author | dannye <33dannye@gmail.com> | 2025-07-02 21:15:13 -0500 |
|---|---|---|
| committer | dannye <33dannye@gmail.com> | 2025-07-02 21:15:13 -0500 |
| commit | ca019eac8fd96559f4d4e712f0b53e95492e5dcb (patch) | |
| tree | 209a500e3bda6c2109e5acec60448e9e52f8c2af /audio | |
| parent | Use more ldpikacry (diff) | |
| parent | Require RGBDS 0.9.3 for its DMG palette specs (#513) (diff) | |
| download | pokeyellow-ca019eac8fd96559f4d4e712f0b53e95492e5dcb.tar.gz pokeyellow-ca019eac8fd96559f4d4e712f0b53e95492e5dcb.tar.xz pokeyellow-ca019eac8fd96559f4d4e712f0b53e95492e5dcb.zip | |
Merge branch 'master' of https://github.com/pret/pokered
Diffstat (limited to 'audio')
| -rw-r--r-- | audio/engine_1.asm | 50 | ||||
| -rw-r--r-- | audio/engine_2.asm | 54 | ||||
| -rw-r--r-- | audio/engine_3.asm | 4 | ||||
| -rw-r--r-- | audio/engine_4.asm | 4 | ||||
| -rw-r--r-- | audio/low_health_alarm.asm | 2 | ||||
| -rw-r--r-- | audio/wave_samples.asm | 2 |
6 files changed, 58 insertions, 58 deletions
diff --git a/audio/engine_1.asm b/audio/engine_1.asm index fc70c73d..930c085e 100644 --- a/audio/engine_1.asm +++ b/audio/engine_1.asm @@ -20,10 +20,10 @@ Audio1_UpdateMusic:: set BIT_MUTE_AUDIO, a ld [wMuteAudioAndPauseMusic], a xor a ; disable all channels' output - ldh [rNR51], a - ldh [rNR30], a - ld a, $80 - ldh [rNR30], a + ldh [rAUDTERM], a + ldh [rAUD3ENA], a + ld a, AUD3ENA_ON + ldh [rAUD3ENA], a jr .nextChannel .applyAffects call Audio1_ApplyMusicAffects @@ -191,10 +191,10 @@ Audio1_sound_ret: cp CHAN7 jr nz, .skipSfxChannel3 ; restart hardware channel 3 (wave channel) output - ld a, $0 - ldh [rNR30], a - ld a, $80 - ldh [rNR30], a + ld a, AUD3ENA_OFF + ldh [rAUD3ENA], a + ld a, AUD3ENA_ON + ldh [rAUD3ENA], a .skipSfxChannel3 jr nz, .dontDisable ld a, [wDisableChannelOutputWhenSfxEnds] @@ -228,9 +228,9 @@ Audio1_sound_ret: .disableChannelOutput ld hl, Audio1_HWChannelDisableMasks add hl, bc - ldh a, [rNR51] + ldh a, [rAUDTERM] and [hl] - ldh [rNR51], a + ldh [rAUDTERM], a .afterDisable ld a, [wChannelSoundIDs + CHAN5] cp CRY_SFX_START @@ -250,7 +250,7 @@ Audio1_sound_ret: ret c .skipRewind ld a, [wSavedVolume] - ldh [rNR50], a + ldh [rAUDVOL], a xor a ld [wSavedVolume], a .skipCry @@ -558,7 +558,7 @@ Audio1_volume: cp volume_cmd jr nz, Audio1_execute_music call Audio1_GetNextMusicByte - ldh [rNR50], a ; store volume + ldh [rAUDVOL], a ; store volume jp Audio1_sound_ret Audio1_execute_music: @@ -648,7 +648,7 @@ Audio1_pitch_sweep: bit BIT_EXECUTE_MUSIC, [hl] jr nz, Audio1_note ; no call Audio1_GetNextMusicByte - ldh [rNR10], a + ldh [rAUD1SWEEP], a jp Audio1_sound_ret Audio1_note: @@ -780,9 +780,9 @@ Audio1_note_pitch: ld b, 0 ld hl, Audio1_HWChannelDisableMasks add hl, bc - ldh a, [rNR51] + ldh a, [rAUDTERM] and [hl] - ldh [rNR51], a ; disable hardware channel 3's output + ldh [rAUDTERM], a ; disable hardware channel 3's output jr .done .notChannel3 ld b, REG_VOLUME_ENVELOPE @@ -855,7 +855,7 @@ Audio1_EnableChannelOutput: ld b, 0 call Audio1_ApplyMonoStereo add hl, bc - ldh a, [rNR51] + ldh a, [rAUDTERM] or [hl] ; set this channel's bits ld d, a ld a, c @@ -877,7 +877,7 @@ Audio1_EnableChannelOutput: add hl, bc and [hl] ld d, a - ldh a, [rNR51] + ldh a, [rAUDTERM] ld hl, Audio1_HWChannelDisableMasks add hl, bc and [hl] ; reset this channel's output bits @@ -885,7 +885,7 @@ Audio1_EnableChannelOutput: ld d, a .skip ld a, d - ldh [rNR51], a + ldh [rAUDTERM], a ret Audio1_ApplyDutyCycleAndSoundLength: @@ -936,10 +936,10 @@ Audio1_ApplyWavePatternAndFrequency: ld e, [hl] inc hl ld d, [hl] - ld hl, rWave_0 - ld b, $f + ld hl, _AUD3WAVERAM + ld b, AUD3WAVE_SIZE - 1 ld a, $0 ; stop hardware channel 3 - ldh [rNR30], a + ldh [rAUD3ENA], a .loop ld a, [de] inc de @@ -948,8 +948,8 @@ Audio1_ApplyWavePatternAndFrequency: dec b and a jr nz, .loop - ld a, $80 ; start hardware channel 3 - ldh [rNR30], a + ld a, AUD3ENA_ON ; start hardware channel 3 + ldh [rAUD3ENA], a pop de .notChannel3 ld a, d @@ -1546,10 +1546,10 @@ Audio1_PlaySound:: ld a, [wSavedVolume] and a jr nz, .done - ldh a, [rNR50] + ldh a, [rAUDVOL] ld [wSavedVolume], a ld a, $77 - ldh [rNR50], a ; full volume + ldh [rAUDVOL], a ; full volume .done ret diff --git a/audio/engine_2.asm b/audio/engine_2.asm index 2b5a219c..4d925ed4 100644 --- a/audio/engine_2.asm +++ b/audio/engine_2.asm @@ -182,10 +182,10 @@ Audio2_PlaySound:: ld a, [wSavedVolume] and a jr nz, .done - ldh a, [rNR50] + ldh a, [rAUDVOL] ld [wSavedVolume], a ld a, $77 - ldh [rNR50], a + ldh [rAUDVOL], a .done ret @@ -256,17 +256,17 @@ Audio2_InitMusicVariables:: ld a, $ff ld [wStereoPanning], a xor a - ldh [rNR50], a - ld a, $8 - ldh [rNR10], a + ldh [rAUDVOL], a + ld a, AUD1SWEEP_DOWN + ldh [rAUD1SWEEP], a ld a, 0 - ldh [rNR51], a + ldh [rAUDTERM], a xor a - ldh [rNR30], a - ld a, $80 - ldh [rNR30], a + ldh [rAUD3ENA], a + ld a, AUD3ENA_ON + ldh [rAUD3ENA], a ld a, $77 - ldh [rNR50], a + ldh [rAUDVOL], a ret Audio2_InitSFXVariables:: @@ -353,28 +353,28 @@ Audio2_InitSFXVariables:: ld a, e cp CHAN5 ret nz - ld a, $8 - ldh [rNR10], a ; sweep off + ld a, AUD1SWEEP_DOWN + ldh [rAUD1SWEEP], a ; sweep off ret Audio2_StopAllAudio:: - ld a, $80 - ldh [rNR52], a ; sound hardware on - ldh [rNR30], a ; wave playback on + ld a, AUDENA_ON + ldh [rAUDENA], a ; sound hardware on + ldh [rAUD3ENA], a ; wave playback on xor a - ldh [rNR51], a ; no sound output - ldh [rNR32], a ; mute channel 3 (wave channel) - ld a, $8 - ldh [rNR10], a ; sweep off - ldh [rNR12], a ; mute channel 1 (pulse channel 1) - ldh [rNR22], a ; mute channel 2 (pulse channel 2) - ldh [rNR42], a ; mute channel 4 (noise channel) - ld a, $40 - ldh [rNR14], a ; counter mode - ldh [rNR24], a - ldh [rNR44], a + ldh [rAUDTERM], a ; no sound output + ldh [rAUD3LEVEL], a ; mute channel 3 (wave channel) + ld a, AUD1SWEEP_DOWN + ldh [rAUD1SWEEP], a ; sweep off + ldh [rAUD1ENV], a ; mute channel 1 (pulse channel 1) + ldh [rAUD2ENV], a ; mute channel 2 (pulse channel 2) + ldh [rAUD4ENV], a ; mute channel 4 (noise channel) + ld a, AUD1HIGH_LENGTH_ON + ldh [rAUD1HIGH], a ; counter mode + ldh [rAUD2HIGH], a + ldh [rAUD4GO], a ld a, $77 - ldh [rNR50], a ; full volume + ldh [rAUDVOL], a ; full volume xor a ld [wUnusedMusicByte], a ld [wDisableChannelOutputWhenSfxEnds], a diff --git a/audio/engine_3.asm b/audio/engine_3.asm index 36de3fff..09ced4c0 100644 --- a/audio/engine_3.asm +++ b/audio/engine_3.asm @@ -180,10 +180,10 @@ Audio3_PlaySound:: ld a, [wSavedVolume] and a jr nz, .done - ldh a, [rNR50] + ldh a, [rAUDVOL] ld [wSavedVolume], a ld a, $77 - ldh [rNR50], a ; full volume + ldh [rAUDVOL], a ; full volume .done ret diff --git a/audio/engine_4.asm b/audio/engine_4.asm index 12d72d08..fb6b966a 100644 --- a/audio/engine_4.asm +++ b/audio/engine_4.asm @@ -180,10 +180,10 @@ Audio4_PlaySound:: ld a, [wSavedVolume] and a jr nz, .done - ldh a, [rNR50] + ldh a, [rAUDVOL] ld [wSavedVolume], a ld a, $77 - ldh [rNR50], a ; full volume + ldh [rAUDVOL], a ; full volume .done ret diff --git a/audio/low_health_alarm.asm b/audio/low_health_alarm.asm index 728f5f65..e14e21cb 100644 --- a/audio/low_health_alarm.asm +++ b/audio/low_health_alarm.asm @@ -49,7 +49,7 @@ Music_DoLowHealthAlarm:: ;update sound channel 1 to play the alarm, overriding all other sounds. .playTone - ld hl, rNR10 ;channel 1 sound register + ld hl, rAUD1SWEEP ;channel 1 sound register ld c, $5 xor a diff --git a/audio/wave_samples.asm b/audio/wave_samples.asm index d35c80bd..52d2d0fe 100644 --- a/audio/wave_samples.asm +++ b/audio/wave_samples.asm @@ -12,7 +12,7 @@ ; these are the definitions for the channel 3 instruments ; each instrument definition is made up of 32 points (nibbles) that form ; the graph of the wave -; the current instrument is copied to rWave_0--rWave_f +; the current instrument is copied to _AUD3WAVERAM .wave0 dn 0, 2, 4, 6, 8, 10, 12, 14, 15, 15, 15, 14, 14, 13, 13, 12, 12, 11, 10, 9, 8, 7, 6, 5, 4, 4, 3, 3, 2, 2, 1, 1 |
