Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
namespace mute
// FLG register
flag:
dw $000f // length of the code
lda #$6c
sta $f2
lda #$20 // unmute, disable_echo
sta $f3
cmp $f3, #$20
bne flag
// Lower Left Output Echo Volume
left:
lda #$2c
sta $f2
lda $f3 // read current volume
cmp #$10 // already at lowest?
beq right
dec // decrement it
sta $f3 // and write it back
cmp $f3
bne left
// Lower Right Output Echo Volume
right:
lda #$3c
sta $f2
lda $f3
cmp #$10
beq loop
dec
sta $f3
cmp $f3
bne right
loop:
bra loop
namespace unmute
// FLG register
flag:
dw $000f // length of the code
lda #$6c
sta $f2
lda #$20 // unmute, disable_echo
sta $f3
cmp $f3, #$20
bne flag
// Lower Left Output Echo Volume
left:
lda #$2c
sta $f2
lda $f3 // read current volume
cmp #$23 // already at desired volume?
beq right
inc // increment it
sta $f3 // and write it back
cmp $f3
bne left
// Lower Right Output Echo Volume
right:
lda #$3c
sta $f2
lda $f3
cmp #$23
beq loop
inc
sta $f3
cmp $f3
bne right
loop:
bra loop
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment