diff --git a/wip-hugo/routines/line/line.s b/wip-hugo/routines/line/line.s index 56bdb55..796214e 100644 --- a/wip-hugo/routines/line/line.s +++ b/wip-hugo/routines/line/line.s @@ -10,7 +10,7 @@ STA dx BCC dx_no_underflow;; X_end >= X_pos EOR #$ff ; Fix bit underflow - dx_no_underflow: +dx_no_underflow: SEC LDA Y_pos SBC Y_end diff --git a/wip-hugo/routines/line/line_down_inv.s b/wip-hugo/routines/line/line_down_inv.s index f7430c1..c8f64d3 100644 --- a/wip-hugo/routines/line/line_down_inv.s +++ b/wip-hugo/routines/line/line_down_inv.s @@ -57,8 +57,9 @@ 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 + Sub_16 btp_mem_pos, btp_mem_pos + 1, #$00, #$00, ! LDX dy + CLC for_y: LDA byte_to_paint ORA (btp_mem_pos), Y @@ -68,7 +69,7 @@ increment_y_pos: BNE increment_y_pos_end move_8px_down: LDY #$08 - Sub_16 btp_mem_pos, btp_mem_pos + 1, #$40 ,#$01 + Sub_16 btp_mem_pos, btp_mem_pos + 1, #$3f ,#$01, ! increment_y_pos_end: DEX ;CPX Y_end @@ -80,8 +81,8 @@ increment_pixel_x: ASL byte_to_paint BCC for_y move_8px_left: - ROL byte_to_paint Sub_16 btp_mem_pos, btp_mem_pos + 1, #$08, #$00 + ROL byte_to_paint JMP for_y case_2: Add_16 D, D + 1, #>dx_2, #