diff --git a/music/tiny_tracker6/play_frame.s b/music/tiny_tracker6/play_frame.s index 1bf374d2..35821837 100644 --- a/music/tiny_tracker6/play_frame.s +++ b/music/tiny_tracker6/play_frame.s @@ -78,14 +78,15 @@ not_end: pla ; restore note - tay + pha + and #$6 -; asl - asl - asl + lsr + tay + lda lengths,Y sta SONG_COUNTDOWN ; - tya + pla lsr lsr lsr ; get note in A @@ -119,6 +120,9 @@ done_update_song: channel_a_volume: .byte 14,14,14,14,11,11,10,10 + lengths: + .byte 0*8,1*8,2*8,4*8 + tracks_l: .byte =0) { /* note is shifted left by 3, channel 1 */ temp_value=(*b_last<<3)|1; - length=(*total_len<<1); + if (*total_len==4) { + length=3<<1; + } + else { + length=(*total_len<<1); + } temp_value|=length; - if (*c_last<0) { + if (*c_last>=0) { // temp_value|=2; fprintf(stderr,"Error, shouldn't have C\n"); }