diff --git a/tfv/OPTIMIZATION b/tfv/OPTIMIZATION index 12a1d458..db8f3149 100644 --- a/tfv/OPTIMIZATION +++ b/tfv/OPTIMIZATION @@ -110,3 +110,15 @@ Move to 40x40 mode Total = 224,981 Frame Rate = 4.44 fps +Remove some unnecessary zero page copies in the mode7 code + Cycles: flying= 187 + Cycles: getkey= 46 + Cycles: page_flip= 26 + Cycles: multiply= 49,613 + Cycles: mode7= 141,269 + Cycles: lookup_map= 21,718 + Cycles: put_sprite= 2,561 + ================================ + Total = 215,420 + Frame Rate = 4.64 fps + diff --git a/tfv/TODO b/tfv/TODO index 23176148..ee727048 100644 --- a/tfv/TODO +++ b/tfv/TODO @@ -2,15 +2,8 @@ mode7 speed fixes: + faster multiply routine - If result is AABBCCDD we only need BBCC for fixed point result - - Pass NUM1H in A? no because used multiple places - - + inline hlin_setup? (save 12 cycles) - + Skip key parsing if no key read - slower: move to 40x40 again - draw every other line. First with color/black - then xor in the second line short term: diff --git a/tfv/tfv_flying.s b/tfv/tfv_flying.s index e885fc5b..d9eb8214 100644 --- a/tfv/tfv_flying.s +++ b/tfv/tfv_flying.s @@ -1027,7 +1027,7 @@ lookup_map: lda SPACEY_I ; 3 sta LAST_SPACEY_I ; 3 and #CONST_MAP_MASK_Y ; wrap to 64x64 grid ; 2 - sta SPACEY_I + sta SPACEY_I ; 3 asl ; 2 @@ -1040,7 +1040,7 @@ lookup_map: ; SPACEX_I is in y cpy #$8 ; 2 ;============ - ; 34 + ; 37 bcs ocean_color ; bgt 8 ;^2nt/3 ldy SPACEY_I ; 3