flyer: save 1 byte

This commit is contained in:
Vince Weaver 2022-01-15 15:07:37 -05:00
parent 53f9fc0bc2
commit 27bfa9d049

View File

@ -40,17 +40,11 @@ ay3_irq_handler:
bit MOCK_6522_T1CL bit MOCK_6522_T1CL
; drop note down after first ; drop note down after first (rudimentary envelope)
lda #$C lda #$C
sta AY_REGS+8 sta AY_REGS+8 ; Channel A
sta AY_REGS+10 sta AY_REGS+9 ; Channel B
; lda #$0E
; sta AY_REGS+8 ; $08 volume A
; lda #$0C
; sta AY_REGS+9 ; $09 volume B
; sta AY_REGS+10 ; $0A volume C
;============================ ;============================
; see if still counting down ; see if still counting down
@ -85,39 +79,27 @@ set_notes_loop:
all_ok: all_ok:
; see if note
; tay handle_note:
; and #$C0
; cmp #$C0
; beq handle_timing
note_only:
; tya
; NNNNNLLC -- c=channel, n=note ; NNNNNLLC -- c=channel, n=note
tay tay ; save in Y
ldx #0 and #1
asl
tax ; channel A/B*2 in X
tya
lsr lsr
bcc channel_a
ldx #4 ; skip to C
channel_a:
and #$3 and #$3
sta SONG_COUNTDOWN sta SONG_COUNTDOWN
; inc SONG_COUNTDOWN
tya tya
lsr lsr
lsr lsr
lsr lsr
; and #$FE ; fine register value, want in X
; tax
; tya ; get note
; and #$1F
tay ; lookup in table tay ; lookup in table
lda frequencies_low,Y lda frequencies_low,Y
@ -127,7 +109,7 @@ channel_a:
sta AY_REGS+1,X sta AY_REGS+1,X
lda #$F lda #$F
sta AY_REGS+8 sta AY_REGS+8 ; volume A
;============================ ;============================
; point to next ; point to next