diff --git a/wip-hugo/routines/circle/circle.s b/wip-hugo/routines/circle/circle.s index b0be423..839c83b 100644 --- a/wip-hugo/routines/circle/circle.s +++ b/wip-hugo/routines/circle/circle.s @@ -55,8 +55,7 @@ draw_upper_px_in_circle: LDA btp_mem_pos + 1 STA btp_mem_pos_qbb + 1 STA btp_mem_pos_qab + 1 - LDA byte_to_paint - STA byte_to_paint_qca + STY Y_qbb @@ -76,6 +75,7 @@ draw_left_px_in_circle: LDA btp_mem_pos + 1 STA btp_mem_pos_qca + 1 STA btp_mem_pos_qba + 1 + LDA byte_to_paint STA byte_to_paint_qca @@ -124,7 +124,8 @@ draw_right_px_in_circle: STY Y_qda STY Y_qaa -while_x_bigger_then_y: + LDX #$08 +while_x_bigger_then_y: ; X=8 always expected draw_qaa: LDY Y_qaa @@ -180,9 +181,8 @@ qaa_y_underflow: qaa_y_end: qda_y: INC Y_qda - LDA Y_qda - CMP #$08 - BCC qda_y_end + CPX Y_qda + BNE qda_y_end qda_y_overflow: Add_16 btp_mem_pos_qda, btp_mem_pos_qda + 1, #$3f, #$01,! ;+319 + C Add_16 btp_mem_pos_qca, btp_mem_pos_qca + 1, #$40, #$01,! ;+320 @@ -203,8 +203,8 @@ qcb_x: BCC qcb_x_end qcb_x_overflow: INC byte_to_paint_qcb - LDA #$01 - STA byte_to_paint_qcb + ;LDA #$01 + ;STA byte_to_paint_qcb Sub_16 btp_mem_pos_qcb, btp_mem_pos_qcb + 1, #$08, #$00,! Sub_16 btp_mem_pos_qbb, btp_mem_pos_qbb + 1, #$08, #$00,! qcb_x_end: @@ -260,9 +260,8 @@ qdb_y_end: qbb_y: INC Y_qbb - LDA Y_qbb - CMP #$08 - BCC qbb_y_end + CPX Y_qbb ; Is Y_qbb ==8 ? + BNE qbb_y_end qbb_y_overflow: Add_16 btp_mem_pos_qbb, btp_mem_pos_qbb + 1, #$3f, #$01, ! ;+320 diff --git a/wip-hugo/source.s b/wip-hugo/source.s index 05bc81b..f08c9db 100644 --- a/wip-hugo/source.s +++ b/wip-hugo/source.s @@ -10,9 +10,9 @@ ;.include "routines/arithmatic/mult_test.s" ;.include "routines/arithmatic/div_test.s" -;.include "routines/circle/circle_test.s" +.include "routines/circle/circle_test.s" ;.include "routines/circle/circle_test_size.s" -.include "routines/circle/circle_test_position.s" +;.include "routines/circle/circle_test_position.s" ;.include "routines/line/line_test.s" ;.include "routines/text/char_draw_test.s" ;.include "routines/pixel/pixel_test.s"