From 3ce76c02a8825d1ca081e9225beb284d0e58c6d7 Mon Sep 17 00:00:00 2001 From: hugova Date: Mon, 24 Mar 2025 18:00:17 +0100 Subject: [PATCH] Rewrote 4 branch instructions to 2. 2% performance increase --- .gitignore | 1 + wip-hugo/routines/line/line_down.s | 9 +++------ 2 files changed, 4 insertions(+), 6 deletions(-) diff --git a/.gitignore b/.gitignore index 448c5a2..07ddc1e 100644 --- a/.gitignore +++ b/.gitignore @@ -2,3 +2,4 @@ *.prg *.o *.list +*.note diff --git a/wip-hugo/routines/line/line_down.s b/wip-hugo/routines/line/line_down.s index c45e3b6..cc0d657 100644 --- a/wip-hugo/routines/line/line_down.s +++ b/wip-hugo/routines/line/line_down.s @@ -50,8 +50,8 @@ Add_16 >D, D, btp_mem_pos), Y STA (>btp_mem_pos), Y increment_pixel_x: - ;CLC LSR byte_to_paint - BCS move_8px_left - JMP increment_pixel_x_end + BCC increment_pixel_x_end move_8px_left: ;; add +8 to btp_mem_pos. Find more of why in pixel_draw Add_16 >btp_mem_pos, btp_mem_pos, C=1 ;; +320-8 bytes LDY #$00