aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--dla.s14
1 files changed, 8 insertions, 6 deletions
diff --git a/dla.s b/dla.s
index 68a13ba..5a0932b 100644
--- a/dla.s
+++ b/dla.s
@@ -551,10 +551,10 @@ checkneigh:
; check neighbors. used to be a subroutine, inlined it.
; also inlined plotsetup here.
sty part_y ; 3
- lda lineaddrs_l,y
- sta pixptr
- lda lineaddrs_h,y
- sta pixptr+1
+ lda lineaddrs_l,y ; 5
+ sta pixptr ; 3
+ lda lineaddrs_h,y ; 5
+ sta pixptr+1 ; 3
; 3/4 of the time, we can use a faster code path, check
; (-1,0) and (1,0) at the same time. this happens only when
@@ -601,8 +601,10 @@ pp1ok:
tay
lda (pixptr),y
and pixmask
- bne stick
- jmp dwloop ; too far for branch. X *still* holds (maybe modified) part_x
+ beq dwloop ; ...or fall through to stick.
+ ; note that if we add much more code to drunkwalk, the beq will
+ ; have to become a jmp, which takes 3 extra cycles. so any code
+ ; added above had better save more than 3 cycles!
stick: ; we always get here with Z flag clear
stx part_x ; only update part_x at exit.