Created
January 16, 2022 18:06
-
-
Save intoinside/cbcb2fbc52bd0c6bf598bf1e3a688d38 to your computer and use it in GitHub Desktop.
C64 routine in assembly to play a tree fall fx
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
SID: { | |
.label VOICE1_FREQ_1 = $d400 | |
.label VOICE1_FREQ_2 = $d401 | |
.label VOICE1_CTRL = $d404 | |
.label VOICE1_ATTACK_DECAY = $d405 | |
.label VOICE1_SUSTAIN_RELEASE = $d406 | |
.label VOLUME_FILTER_MODES = $d418 | |
} | |
TreeFall: { | |
lda #%00011011 | |
sta SID.VOLUME_FILTER_MODES | |
lda #%10100000 | |
sta SID.VOICE1_FREQ_1 | |
lda #240 | |
sta SID.VOICE1_FREQ_2 | |
lda #%10011010 | |
sta SID.VOICE1_ATTACK_DECAY | |
lda #%00000111 | |
sta SID.VOICE1_SUSTAIN_RELEASE | |
lda #%00000000 | |
sta SID.VOICE1_CTRL | |
lda #%10000001 | |
sta SID.VOICE1_CTRL | |
rts | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment