From 0ed8359f66f3e52719d806abda0daf53c55abcc2 Mon Sep 17 00:00:00 2001 From: hugova Date: Wed, 2 Jul 2025 01:17:08 +0200 Subject: [PATCH] more minute optimisations of circle draw --- wip-hugo/routines/circle/circle_help.s | 27 +++++++++----------------- 1 file changed, 9 insertions(+), 18 deletions(-) diff --git a/wip-hugo/routines/circle/circle_help.s b/wip-hugo/routines/circle/circle_help.s index 98d92c9..3b73aaf 100644 --- a/wip-hugo/routines/circle/circle_help.s +++ b/wip-hugo/routines/circle/circle_help.s @@ -8,7 +8,7 @@ ;; | ;; qbb | qab ;; | - ;; qba | qaa + ;; qba (2) | qaa (1) ;;---------------X-----------------> X ;; qca | qda ;; | @@ -57,7 +57,7 @@ end_calculation: ;; Lets draw all half-quatrons of the circle. This draws only 8 pixels per iteration. ;; Note that I have the draw_qxx in listed pairs. Each pair chair the same Y-register :) - +STY temp draw_qaa: LDA byte_to_paint ;A byte containing a single 1. Coresponds to X position in the chunk. ORA (btp_mem_pos), Y @@ -65,13 +65,11 @@ draw_qaa: draw_qba: ;;mirror_technique LDX byte_to_paint LDA inverse_factor_value, X;; (see END.s) + STA temp___ ORA (btp_mem_pos_qba), Y STA (btp_mem_pos_qba), Y draw_qcb:; xy swoped - STY temp - - LDA inverse_factor_value, X;; (see END.s) - TAX + LDX temp___ LDA log, X TAY @@ -83,7 +81,7 @@ draw_qcb:; xy swoped ORA (btp_mem_pos_qcb), Y STA (btp_mem_pos_qcb), Y -draw_qdb:; xy swaped and y is inverted. ;;;;;;;;;;;;;;;;;;; +draw_qdb:; xy swaped and y is inverted. LDA inverse_factor_value, X STA temp__ @@ -98,14 +96,11 @@ draw_qbb: SBC temp_ TAY - LDX temp - LDA binary_factor, X; (see END.s) - TAX - + TXA ORA (btp_mem_pos_qbb), Y STA (btp_mem_pos_qbb), Y -draw_qab:; xy swoped + mirroring ;!!!!!!!!!!!!!!!!!!!!!!!!!!1111111!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! +draw_qab:; xy swoped + mirroring LDA temp__ ORA (btp_mem_pos_qab), Y @@ -124,12 +119,8 @@ draw_qda:; y is inverted draw_qca: ;;mirror technique - ;; calculate byte_to_paint_inv 00000001 --> 10000000, 00000010 --> 01000000 ... etc - ;; uses a table! - LDX byte_to_paint - LDA inverse_factor_value, X;; (see END.s) - ; A = byte_to_paint_inv - ORA (btp_mem_pos_qca), Y + LDA temp___ + ORA (btp_mem_pos_qca), Y STA (btp_mem_pos_qca), Y ;;Recover the Y value (we changed it because evrything is inverted)