diff --git a/demos/l/music_256/d2.s b/demos/l/music_256/d2.s index 1c4c2dee..8eda7f6c 100644 --- a/demos/l/music_256/d2.s +++ b/demos/l/music_256/d2.s @@ -30,6 +30,8 @@ ; 247 bytes -- count on X always being $FF when hit delay ; 246 bytes -- make SONG_COUNTDOWN self-modify code ; 241 bytes -- forgot we didn't need to init volume in play_frame anymore +; 238 bytes -- can use Y to save note value in play_frame now +; 237 bytes -- make song terminator #$FF so we don't have to load it .zeropage ;.globalzp rot_smc @@ -98,6 +100,8 @@ inner_wait: ; pad so starts at $80 .byte $00,$00,$00,$00 .byte $00,$00,$00,$00,$00 +.byte $00,$00,$00 +.byte $00 ; music .include "mA2E_2.s" diff --git a/demos/l/music_256/play_frame.s b/demos/l/music_256/play_frame.s index fd1fed5f..a5d550c9 100644 --- a/demos/l/music_256/play_frame.s +++ b/demos/l/music_256/play_frame.s @@ -23,29 +23,23 @@ set_notes_loop: ;==================================== ; if at end, loop back to beginning - asl ; reset song offset to 0 - tax + tax ; reset stack offset to $FF txs - beq set_notes_loop + bmi set_notes_loop not_end: ; NNNNNECC -- c=channel, e=end, n=note - sta SAVE ; save note + tay ; save note and #3 - tax - - ldy #$0E - sty AY_REGS+8,X ; $08 set volume A,B,C asl tax ; put channel offset in X + tya ; restore note - lda SAVE ; restore note - tay and #$4 sta song_countdown_smc+1 ; always 4 long? diff --git a/demos/l/music_256/text_to_tiny.c b/demos/l/music_256/text_to_tiny.c index e06c41e5..8c393164 100644 --- a/demos/l/music_256/text_to_tiny.c +++ b/demos/l/music_256/text_to_tiny.c @@ -458,7 +458,7 @@ printf("\n"); // printf("\t.byte $FF ; end\n"); /* assume 16 notes or fewer */ - printf("\t.byte $80 ; end\n"); + printf("\t.byte $FF ; end\n"); total_len++; int o,n;