From 3d49c8dbaee9dd2729c9fc8715db50ba230fc14e Mon Sep 17 00:00:00 2001 From: Vince Weaver Date: Mon, 13 May 2019 14:50:33 -0400 Subject: [PATCH] pt3: finally playing a song! still not right though --- pt3_player/pt3_dumper.s | 2 +- pt3_player/pt3_lib.s | 10 ++++++---- 2 files changed, 7 insertions(+), 5 deletions(-) diff --git a/pt3_player/pt3_dumper.s b/pt3_player/pt3_dumper.s index b9959cc9..492cc630 100644 --- a/pt3_player/pt3_dumper.s +++ b/pt3_player/pt3_dumper.s @@ -183,7 +183,7 @@ six_space: no_frame_oflo: lda FRAMEL - cmp #8 + cmp #16 beq all_done lda DONE_PLAYING diff --git a/pt3_player/pt3_lib.s b/pt3_player/pt3_lib.s index 74be860b..adaadccc 100644 --- a/pt3_player/pt3_lib.s +++ b/pt3_player/pt3_lib.s @@ -863,7 +863,8 @@ decode_note: ; Skip decode if note still running lda note_a+NOTE_LEN_COUNT,X - beq keep_decoding ; assume not negative + cmp #2 + bcc keep_decoding ; blt, assume not negative ; we are still running, decrement and early return dec note_a+NOTE_LEN_COUNT,X @@ -1582,9 +1583,9 @@ pt3_make_frame: ; see if we need a new pattern ; we do if line==0 and subframe==0 lda current_line - bne line_good + bne pattern_good lda current_subframe - bne line_good + bne pattern_good ; load a new patterh in jsr pt3_set_pattern @@ -1598,6 +1599,7 @@ pattern_good: ; decode a new line jsr pt3_decode_line + line_good: ; Increment everything @@ -1612,7 +1614,7 @@ next_line: sta current_subframe inc current_line ; and increment line - + lda current_line ; FIXME: not always 64 cmp #64 ; if not max, continue bne do_frame