From e84a990789b13c6c67e63cdb2db2a2be2b7893a6 Mon Sep 17 00:00:00 2001 From: Brooke Vibber Date: Thu, 26 Dec 2024 21:41:03 -0800 Subject: [PATCH] tweaks: --- mandel.s | 18 ++++++++++-------- 1 file changed, 10 insertions(+), 8 deletions(-) diff --git a/mandel.s b/mandel.s index 79d9c78..8c6130b 100644 --- a/mandel.s +++ b/mandel.s @@ -435,9 +435,15 @@ fill_masks: ;.align 256 ; warning - if not aligned this will cost an extra cycle sometimes bank_switch_table: .repeat 256, i - .byte ((i & $c0) >> 5) | $c1 + .byte ((i & $c0) >> 4) | $d1 .endrepeat +.macro bank_switch bank + lda #((bank << 2) | $d1) + sta PORTB +.endmacro + + ; 58-77 cycles ; clobbers x, y, dest to dest + 3 .macro imul8xe dest, arg1, arg2 @@ -497,11 +503,6 @@ bank_switch_table: done: .endmacro -.macro bank_switch bank - lda #((bank << 1) | $c1) - sta PORTB -.endmacro - .proc imul8xe_init ; go through the input set, in four 16KB chunks @@ -576,13 +577,14 @@ inner_loop: sta result lda #0 adc result + 1 - sta result + sta result + 1 + clc lda arg2 adc result sta result lda #0 adc result + 1 - sta result + sta result + 1 ; inner loop check inc arg1