From c2a4ff416d82341bb05be2b01c174c8e5433917f Mon Sep 17 00:00:00 2001 From: hugova Date: Sun, 11 May 2025 20:45:11 +0200 Subject: [PATCH] fix comment and fix syntax --- wip-hugo/END.s | 2 ++ wip-hugo/routines/line/line_down.s | 16 ++++++++-------- wip-hugo/routines/pixel/pixel_draw.s | 2 +- 3 files changed, 11 insertions(+), 9 deletions(-) create mode 100644 wip-hugo/END.s diff --git a/wip-hugo/END.s b/wip-hugo/END.s new file mode 100644 index 0000000..8e89422 --- /dev/null +++ b/wip-hugo/END.s @@ -0,0 +1,2 @@ +binary_factor: +.byte %00000001, %00000010, %00000100, %00001000, %00010000, %00100000, %01000000, %10000000 diff --git a/wip-hugo/routines/line/line_down.s b/wip-hugo/routines/line/line_down.s index 9b34434..106538c 100644 --- a/wip-hugo/routines/line/line_down.s +++ b/wip-hugo/routines/line/line_down.s @@ -39,7 +39,7 @@ ;; and to its branch logic later in the loop. ;;D = 2*dy - dx + 2*255 - Mov_16 D, D + 1, dy_2, dy_2 +1 + Mov_16 D, D + 1, dy_2, dy_2 + 1 Add_16 D, D + 1, #$ff, #$01, ! Sub_16 D, D + 1, dx, #$00 selfmod: @@ -50,17 +50,17 @@ selfmod: ;; dy_2 ;; Modifies LDA >dy_2 LDA dy_2 - STA case_2 +1 + STA case_2 + 1 ;; Modifies LDA V LDA V - STA case_1 +1 + STA case_1 + 1 ;; Modifies SBC C=1 ;; Switch to chunk bellow ; C = 1 ; So we subtract #$3F, #$01 +C - Add_16 btp_mem_pos, btp_mem_pos +1, #$3F, #$01, !; +320 + Add_16 btp_mem_pos, btp_mem_pos + 1, #$3F, #$01, !; +320 JMP for_x increment_y_pos_end: case_2: diff --git a/wip-hugo/routines/pixel/pixel_draw.s b/wip-hugo/routines/pixel/pixel_draw.s index c79ddc3..0735dd5 100755 --- a/wip-hugo/routines/pixel/pixel_draw.s +++ b/wip-hugo/routines/pixel/pixel_draw.s @@ -11,7 +11,7 @@ AND #%00000111 TAX - # this is the same as: A = 2^X + ;;this is the same as: A = 2^X LDA binary_factor, X STA byte_to_paint