From cda44f292c3bb2264bcfd28d85eb4836a9a7fc4b Mon Sep 17 00:00:00 2001 From: hugova Date: Thu, 17 Jul 2025 13:53:56 +0200 Subject: [PATCH] Reduses one CMP instruction in line_up_inv --- wip-hugo/routines/line/line_up_inv.s | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/wip-hugo/routines/line/line_up_inv.s b/wip-hugo/routines/line/line_up_inv.s index 63e1a84..e8929fc 100644 --- a/wip-hugo/routines/line/line_up_inv.s +++ b/wip-hugo/routines/line/line_up_inv.s @@ -52,6 +52,8 @@ selfmod: end_selfmod: JSR pixel_calc ;;only used first pixel. after this relative position is abused STA byte_to_paint + INY + Sub_16 btp_mem_pos, btp_mem_pos + 1, #$01, #$00 ;; Y has always a offset of at least 1 ;LDY #$00 LDX dy for_y: @@ -60,11 +62,10 @@ for_y: STA (btp_mem_pos), Y decrement_y_pos: DEY - CPY #$ff BNE decrement_y_pos_end move_8px_up: - LDY #$07 - Sub_16 btp_mem_pos, btp_mem_pos + 1,#$40 , #$01, ! + LDY #$08 + Sub_16 btp_mem_pos, btp_mem_pos + 1,#$3F , #$01, ! decrement_y_pos_end: DEX BEQ end