From 9f6e149b7ce0c75d0b038585c77d92c8b8fc2c17 Mon Sep 17 00:00:00 2001 From: Vince Weaver Date: Wed, 5 Jun 2019 11:22:12 -0400 Subject: [PATCH] pt3: add a few more cycle counts --- pt3_player/pt3_lib.s | 34 +++++++++++++++++----------------- 1 file changed, 17 insertions(+), 17 deletions(-) diff --git a/pt3_player/pt3_lib.s b/pt3_player/pt3_lib.s index bf3d8f24..f67f8df7 100644 --- a/pt3_player/pt3_lib.s +++ b/pt3_player/pt3_lib.s @@ -1321,15 +1321,15 @@ decode_case_cX: decode_case_c0: ; special case $C0 means shut down the note - sta note_a+NOTE_ENABLED,X ; enabled=0 + sta note_a+NOTE_ENABLED,X ; enabled=0 ; 5 jsr reset_note ; 6+69 - bne done_decode ; branch always + bne done_decode ; branch always ; 3 decode_case_cx_not_c0: - sta note_a+NOTE_VOLUME,X ; volume=current_val&0xf; - bne done_decode ; branch always + sta note_a+NOTE_VOLUME,X ; volume=current_val&0xf; 5 + bne done_decode ; branch always ; 3 decode_case_dX: ;============================== @@ -1367,31 +1367,31 @@ decode_case_d0: ;============================== decode_case_fX: ; disable envelope - lda #0 - sta note_a+NOTE_ENVELOPE_ENABLED,X + lda #0 ; 2 + sta note_a+NOTE_ENVELOPE_ENABLED,X ; 5 ; Set ornament to low byte of command - lda note_command_bottom - jsr load_ornament ; ornament to load in A + lda note_command_bottom ; 4 + jsr load_ornament ; ornament to load in A ; 6+? ; Get next byte - iny ; point to next byte - lda (PATTERN_L),Y + iny ; point to next byte ; 2 + lda (PATTERN_L),Y ; 5 ; Set sample to value/2 - lsr ; divide by two - jsr load_sample ; sample to load in A + lsr ; divide by two ; 2 + jsr load_sample ; sample to load in A ; 6+? ; fallthrough done_decode: - iny ; point to next byte + iny ; point to next byte ; 2 - lda decode_done - bne handle_effects - - jmp note_decode_loop + lda decode_done ; 4 + bne handle_effects ; 3 + ; -1 + jmp note_decode_loop ; 3 ;=================================