This commit is contained in:
Brooke Vibber 2022-12-08 06:29:50 -08:00
parent 0510cdc95f
commit d2bc874011

View file

@ -158,7 +158,7 @@ wait_loop:
sty COLPF2 sty COLPF2
.endmacro .endmacro
.macro audio_play_lo ; 11 cycles .macro audio_play_lo
lda audiotemp ; 3 cyc lda audiotemp ; 3 cyc
and #$0f ; 2 cyc and #$0f ; 2 cyc
ora #$10 ; 2 cyc ora #$10 ; 2 cyc
@ -198,18 +198,18 @@ wait_loop:
.macro run_frame palette1, palette2, palette3 .macro run_frame palette1, palette2, palette3
.scope .scope
each_scanline: each_scanline_pair:
;audio_prep audio_prep
inner_scanline palette1, palette2, palette3 inner_scanline palette1, palette2, palette3
;audio_play_lo audio_play_lo
inner_scanline palette1, palette2, palette3 inner_scanline palette1, palette2, palette3
;audio_play_hi ;audio_play_hi ; too slow
ldy VCOUNT ; save for audio lookup ldy VCOUNT ; save for audio lookup
cpy #130 cpy #130
bne each_scanline bne each_scanline_pair
;audio_inc
audio_inc
lda frame_counter lda frame_counter
eor #1 eor #1
sta frame_counter sta frame_counter
@ -221,7 +221,9 @@ wait_loop:
lda #(256 - scanline_offset) lda #(256 - scanline_offset)
sta scanline sta scanline
lda frame_counter lda frame_counter
bne run_frame2 beq run_frame1
jmp run_frame2
run_frame1:
run_frame frame1_palette1, frame1_palette2, frame1_palette3 run_frame frame1_palette1, frame1_palette2, frame1_palette3
run_frame2: run_frame2:
run_frame frame2_palette1, frame2_palette2, frame2_palette3 run_frame frame2_palette1, frame2_palette2, frame2_palette3