From 2118890977591785a15aef0fcbce86414ebdd7db Mon Sep 17 00:00:00 2001 From: Brooke Vibber Date: Sun, 29 Dec 2024 13:10:35 -0800 Subject: [PATCH] add an alternate viewport (compile-time currently) zoomed to max --- mandel.s | 40 +++++++++++++++++++++++++++++++--------- 1 file changed, 31 insertions(+), 9 deletions(-) diff --git a/mandel.s b/mandel.s index d6ae4c6..3e60083 100644 --- a/mandel.s +++ b/mandel.s @@ -246,6 +246,18 @@ fill_masks: .byte %00000001 .byte %00000000 +viewport_zoom: + .byte 1 + .byte 8 + +viewport_ox: + .word $0000 + .word $f110 + +viewport_oy: + .word $0000 + .word $fbe0 + ; 2 + 9 * byte cycles .macro add bytes, dest, arg1, arg2 clc ; 2 cyc @@ -1213,13 +1225,27 @@ zero_byte_loop: jsr imul8xe_init - ; ox = 0; oy = 0 + ; initialize viewport + ;ldx #0 ; overview + ldx #1 ; closeup + lda viewport_zoom,x + sta zoom + + txa + asl a + tax + lda viewport_ox,x + sta ox + lda viewport_oy,x + sta oy + inx + lda viewport_ox,x + sta ox + 1 + lda viewport_oy,x + sta oy + 1 + ; count_frames = 0; count_pixels = 0 lda #0 - sta ox - sta ox + 1 - sta oy - sta oy + 1 sta count_frames sta count_pixels @@ -1229,10 +1255,6 @@ zero_byte_loop: ldx #total_pixels jsr ZF1 - ; zoom = 2x - lda #1 - sta zoom - ; Disable display DMA lda #0 sta DMACTL