From b98ea0479c113b22960b0ce2790ca73676b93ca4 Mon Sep 17 00:00:00 2001 From: Vince Weaver Date: Sat, 10 Mar 2018 22:07:20 -0500 Subject: [PATCH] chiptune: update timing info --- chiptune_player/README.chiptune | 11 +++++++++++ chiptune_player/interrupt_handler.s | 11 ++++++++--- 2 files changed, 19 insertions(+), 3 deletions(-) diff --git a/chiptune_player/README.chiptune b/chiptune_player/README.chiptune index ce936996..10ed3208 100644 --- a/chiptune_player/README.chiptune +++ b/chiptune_player/README.chiptune @@ -459,3 +459,14 @@ lz4/diff: 13669 bytes (11431 -9) gzip/diff: 10821 bytes bzip2/diff: 10477 bytes lzma/diff: 7257 bytes + + + + +Timing: +======= + Originally roughly 1500 cycles from start of interrupt + to all registers being written. + + Moved clock to after, near the visualization stuff, more like + 1378 = 13+ (105*13) diff --git a/chiptune_player/interrupt_handler.s b/chiptune_player/interrupt_handler.s index a2b58e7a..74c8767f 100644 --- a/chiptune_player/interrupt_handler.s +++ b/chiptune_player/interrupt_handler.s @@ -57,6 +57,8 @@ mb_write_loop: lda #1 ; set done playing ; 2 jmp quiet_exit ; 3 + ;=========== + ; typ 13 mb_not_done: @@ -67,6 +69,8 @@ mb_not_done: bne mb_not_13 ; 3/2nt cmp #$ff ; 2 beq increment_offset ; 3/2nt + ;============ + ; typ 5 mb_not_13: sta MB_VALUE ; 3 @@ -83,7 +87,8 @@ mb_not_13: ; so write same to both ; left/right ; 53 - + ;=========== + ; 68 ;==================== ; point to next page ;==================== @@ -97,8 +102,8 @@ mb_not_13: cpx #14 ; if 14 we're done ; 2 bmi mb_write_loop ; otherwise, loop ; 3/2nt ;============ - ; roughly 95? - ; *13= 1235? + ; 19 + ;==============================================