tiny_tracker: a few more bytes
This commit is contained in:
parent
ba0588c037
commit
fc1a5afa97
|
@ -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"
|
||||
|
|
|
@ -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?
|
||||
|
||||
|
|
|
@ -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;
|
||||
|
|
Loading…
Reference in New Issue