From f1ebb21bcbf9861d19c1dcb9e38f37503b1d22ee Mon Sep 17 00:00:00 2001 From: Brooke Vibber Date: Tue, 31 Dec 2024 17:49:13 -0800 Subject: [PATCH 1/2] wip not working wide pixels --- mandel.s | 16 ++++++++++++---- 1 file changed, 12 insertions(+), 4 deletions(-) diff --git a/mandel.s b/mandel.s index 9546b68..f777cbc 100644 --- a/mandel.s +++ b/mandel.s @@ -234,9 +234,9 @@ display_list_len = display_list_end - display_list_start color_map: .byte 0 .repeat 85 - .byte 1 - .byte 2 - .byte 3 + .byte %01010101 + .byte %10101010 + .byte %11111111 .endrepeat @@ -285,6 +285,11 @@ fill_masks: .byte %00000001 .byte %00000000 +pixel_masks: + .byte $ff + .byte $0f + .byte $03 + viewport_zoom: .byte 1 .byte 6 @@ -1130,8 +1135,11 @@ enough: ; iter -> color ldx iter lda color_map,x + ldx fill_level + and pixel_masks,x sta pixel_color - lda #(255 - 3) + lda pixel_masks,x + eor #$ff sta pixel_mask ; sy -> line base address in temp From 49fe3155294c0e392904a85154bf7dbe9d2e7808 Mon Sep 17 00:00:00 2001 From: Brooke Vibber Date: Tue, 31 Dec 2024 20:13:11 -0800 Subject: [PATCH 2/2] 'wide pixels' should get better color on the composite video because the scanlines will be fuller of data --- mandel.s | 17 +++++++---------- todo.md | 3 +-- 2 files changed, 8 insertions(+), 12 deletions(-) diff --git a/mandel.s b/mandel.s index f777cbc..472f613 100644 --- a/mandel.s +++ b/mandel.s @@ -286,9 +286,9 @@ fill_masks: .byte %00000000 pixel_masks: - .byte $ff - .byte $0f - .byte $03 + .byte %11111111 + .byte %11110000 + .byte %11000000 viewport_zoom: .byte 1 @@ -1188,18 +1188,15 @@ point: ; pixel_mask <<= pixel_shift (shifting in ones) and #3 sta pixel_shift - lda #3 - sec - sbc pixel_shift tax shift_loop: beq shift_done - asl pixel_color - asl pixel_color + lsr pixel_color + lsr pixel_color sec - rol pixel_mask + ror pixel_mask sec - rol pixel_mask + ror pixel_mask dex jmp shift_loop shift_done: diff --git a/todo.md b/todo.md index 284d653..e8cffe3 100644 --- a/todo.md +++ b/todo.md @@ -11,8 +11,7 @@ things to try: * y-axis mirror optimization -* 'wide pixels' 2x and 4x for a fuller initial image in the tiered rendering - * maybe redo tiering to just 4x4, 2x2, 1x1? +* try filling in the extra scanlines on 4x4 and 2x2 tiering * extract viewport for display & re-input via keyboard