From 2d0dbe2b7525d9e016a31e3fb19784783604a306 Mon Sep 17 00:00:00 2001 From: 4am Date: Sat, 21 Nov 2020 14:21:15 -0500 Subject: [PATCH] shave some cycles (cache last dst for RESET) --- src/fx/fx.dhgr.soft.diagonal.a | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/src/fx/fx.dhgr.soft.diagonal.a b/src/fx/fx.dhgr.soft.diagonal.a index d0f2ec60e..458fea6dd 100644 --- a/src/fx/fx.dhgr.soft.diagonal.a +++ b/src/fx/fx.dhgr.soft.diagonal.a @@ -5,6 +5,7 @@ !to "build/FX/DHGR.SOFT.DIAG",plain *=$6000 +lastdsthi = $C8 src = $C9 dst = $CB y = $CD @@ -26,7 +27,7 @@ zphgrrowhi = $E8 } !macro RESET_HGR_HI { - lda zphgrrowhi, x + lda lastdsthi sta dst+1 eor #$60 sta src+1 @@ -79,7 +80,11 @@ RowLoop lda zphgrrowlo, x sta src sta dst - +RESET_HGR_HI + lda zphgrrowhi, x + sta dst+1 + sta lastdsthi + eor #$60 + sta src+1 ldy y +BRANCH_IF_Y_IS_OFFSCREEN @block2