diff --git a/wip-hugo/routines/line/line_up.s b/wip-hugo/routines/line/line_up.s index 73ee4bc..8b58abf 100644 --- a/wip-hugo/routines/line/line_up.s +++ b/wip-hugo/routines/line/line_up.s @@ -12,6 +12,15 @@ .proc line_up .include "line.inc"; Defines memory positions, ex X_pos + ;LDA #$20 + ;STA X_pos + ;STA Y_pos + ;LDA #$10 + ;STA Y_end + ;LDA #$40 + ;STA X_end + + ;;We need to clear this memory LDA #$00 STA dy_2 + SBC >V STA >V; V, dy_2, dy_2, =V. + ;; V_max = 00000001 11111111 + ;; For us to work with unsigned numbers we add 00000001 11111111 + ;; to V and the branch logic to V! ;;D = 2*dy - dx + 2*255 ;;Our D is bigger then wikipedia because D is unsigned. @@ -45,25 +58,43 @@ STA >D LDA D, D, D, btp_mem_pos, btp_mem_pos), Y + STA (>btp_mem_pos), Y +increment_pixel_x: + LSR byte_to_paint + BCC increment_pixel_x_end +move_8px_left: + Add_16 >btp_mem_pos, D, D, V, D, V, btp_mem_pos, D, dy_2, D, dy_2,