From e0314e8530cc409fbe444d58fd33d459299a289e Mon Sep 17 00:00:00 2001 From: hugova Date: Tue, 1 Jul 2025 15:16:59 +0200 Subject: [PATCH] added more extensive testing on circle draw and found a bug that depends on the circle x-pos --- wip-hugo/routines/circle/circle.s | 2 - .../routines/circle/circle_test_position.s | 44 +++++++++++++++++++ ...le_test_extensive.s => circle_test_size.s} | 4 +- wip-hugo/source.s | 4 +- 4 files changed, 48 insertions(+), 6 deletions(-) create mode 100644 wip-hugo/routines/circle/circle_test_position.s rename wip-hugo/routines/circle/{circle_test_extensive.s => circle_test_size.s} (93%) diff --git a/wip-hugo/routines/circle/circle.s b/wip-hugo/routines/circle/circle.s index bd9e30a..fbb4da8 100644 --- a/wip-hugo/routines/circle/circle.s +++ b/wip-hugo/routines/circle/circle.s @@ -2,8 +2,6 @@ .proc circle .include "circle.inc" - ;; We use the algorithm jerkos method - ;; git ;; X_rel = radius (share the same address) diff --git a/wip-hugo/routines/circle/circle_test_position.s b/wip-hugo/routines/circle/circle_test_position.s new file mode 100644 index 0000000..1d65e63 --- /dev/null +++ b/wip-hugo/routines/circle/circle_test_position.s @@ -0,0 +1,44 @@ +.scope circle_test_position_x + .include "circle.inc" + + LDA #$50 + STA $ED + LDA #$50 + STA $EE + LDA #$08 + STA $EF + + + + LDX #$ff + LDY #$ff + hihi: + NOP + NOP + DEX + BNE hihi + DEY + BNE hihi + + INC $ED + + LDA $ED + STA X_pos + LDA $EE + STA Y_pos + LDA $EF + STA radius + + VIC_bank = $4000 + Mov_16 A_start, A_start + 1, #VIC_bank + Mov_16 length, length + 1, #<$1f40, #>$1f40 + LDA #$00 + jsr memset + + JSR circle + + LDX #$ff + LDY #$ff + + jmp hihi +.endscope diff --git a/wip-hugo/routines/circle/circle_test_extensive.s b/wip-hugo/routines/circle/circle_test_size.s similarity index 93% rename from wip-hugo/routines/circle/circle_test_extensive.s rename to wip-hugo/routines/circle/circle_test_size.s index cd12dd5..09ef974 100644 --- a/wip-hugo/routines/circle/circle_test_extensive.s +++ b/wip-hugo/routines/circle/circle_test_size.s @@ -1,10 +1,10 @@ -.scope circle_test +.scope circle_test_size .include "circle.inc" LDA #$50 STA X_pos STA Y_pos - LDA #$00 + LDA #$01 STA $EF diff --git a/wip-hugo/source.s b/wip-hugo/source.s index ac6e45e..05bc81b 100644 --- a/wip-hugo/source.s +++ b/wip-hugo/source.s @@ -11,8 +11,8 @@ ;.include "routines/arithmatic/mult_test.s" ;.include "routines/arithmatic/div_test.s" ;.include "routines/circle/circle_test.s" -.include "routines/circle/circle_test_extensive.s" - +;.include "routines/circle/circle_test_size.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"