From b834506cac16a1fcb52ac4e0634a19f6ee6d2a49 Mon Sep 17 00:00:00 2001 From: Vince Weaver Date: Mon, 13 May 2019 22:41:07 -0400 Subject: [PATCH] pt3: extraneous iny in portamento sounds good, let's dump and compare --- pt3_player/pt3_dumper.s | 17 ++++++++++------- pt3_player/pt3_lib.s | 29 ++++++++++++++++++++++++++++- 2 files changed, 38 insertions(+), 8 deletions(-) diff --git a/pt3_player/pt3_dumper.s b/pt3_player/pt3_dumper.s index eef53ef3..2f641a5b 100644 --- a/pt3_player/pt3_dumper.s +++ b/pt3_player/pt3_dumper.s @@ -192,13 +192,16 @@ no_frame_oflo: ; STOP EARLY for DEBUGGING - lda FRAMEL - cmp #$A4 - bne checkcheck - lda FRAMEH - cmp #$1 - beq all_done -checkcheck: +; lda FRAMEL +; cmp #$A4 +; bne checkcheck +; lda FRAMEH +; cmp #$1 +; beq all_done +;checkcheck: + + + ; check if end lda DONE_PLAYING bne all_done jmp main_loop diff --git a/pt3_player/pt3_lib.s b/pt3_player/pt3_lib.s index 5ebfadcf..45c0c133 100644 --- a/pt3_player/pt3_lib.s +++ b/pt3_player/pt3_lib.s @@ -221,6 +221,7 @@ sample_b1: .byte $0 ; Header offsets +PT3_VERSION = $D PT3_HEADER_FREQUENCY = $63 PT3_PATTERN_LOC_L = $67 PT3_PATTERN_LOC_H = $68 @@ -404,6 +405,33 @@ pt3_init_song: sta pt3_envelope_period_h sta pt3_envelope_type + ;============================ + ; calculate patterns in song + ; FIXME: is this necessary? can just end when we hit FF playing? + ldy #0 +length_loop: + lda PT3_LOC+PT3_PATTERN_TABLE,Y + iny + cmp #$ff + bne length_loop + + sty pt3_music_len + + ;====================== + ; calculate version + lda #6 + sta pt3_version + lda PT3_LOC+PT3_VERSION + cmp #'0' + bcc not_ascii_number ; blt + cmp #'9' + bcs not_ascii_number ; bge + sec + sbc #'0' + sta pt3_version + +not_ascii_number: + rts e_slide_amount: .byte $0 @@ -1344,7 +1372,6 @@ effect_2_small: ; FIXME: make smaller sta note_a+NOTE_TONE_SLIDE_DELAY,X sta note_a+NOTE_TONE_SLIDE_COUNT,X - iny iny iny