shave some cycles (cache last dst for RESET)

This commit is contained in:
4am 2020-11-21 14:21:15 -05:00
parent a0e82a2a13
commit 2d0dbe2b75

View File

@ -5,6 +5,7 @@
!to "build/FX/DHGR.SOFT.DIAG",plain !to "build/FX/DHGR.SOFT.DIAG",plain
*=$6000 *=$6000
lastdsthi = $C8
src = $C9 src = $C9
dst = $CB dst = $CB
y = $CD y = $CD
@ -26,7 +27,7 @@ zphgrrowhi = $E8
} }
!macro RESET_HGR_HI { !macro RESET_HGR_HI {
lda zphgrrowhi, x lda lastdsthi
sta dst+1 sta dst+1
eor #$60 eor #$60
sta src+1 sta src+1
@ -79,7 +80,11 @@ RowLoop
lda zphgrrowlo, x lda zphgrrowlo, x
sta src sta src
sta dst sta dst
+RESET_HGR_HI lda zphgrrowhi, x
sta dst+1
sta lastdsthi
eor #$60
sta src+1
ldy y ldy y
+BRANCH_IF_Y_IS_OFFSCREEN @block2 +BRANCH_IF_Y_IS_OFFSCREEN @block2