diff --git a/wip-hugo/END.s b/wip-hugo/END.s index 11f9e49..bc46e95 100644 --- a/wip-hugo/END.s +++ b/wip-hugo/END.s @@ -1,19 +1,33 @@ inverse_factor_value: ;lookup 00000001 --gives--> 10000000 , etc etc. only 1st 1 in binary numbers NOP -.byte %10000000, %01000000 +.byte %10000000, %01000000; (inverse factor value) NOP -.byte %00100000 +.byte %00100000; (inverse factor value) +NOP +NOP;.byte $0; (log) +NOP;.byte $1; (log) +.byte %00010000; (inverse factor value) +log: +NOP +.byte $0; (log) +.byte $1; (log) +NOP +.byte $2 NOP NOP -NOP -.byte %00010000 -NOP +.byte %00001000; (inverse factor value) +.byte $3 NOP NOP ;; i put another lookup table where nops normaly are' binary_factor: -.byte %10000000, %01000000, %00100000, %00010000, %00001000, %00000100, %00000010, %00000001 -;; ^ this one it is (in inverse_faktor value) +.byte %10000000, %01000000, %00100000, %00010000, %00001000, %00000100, %00000010, %00000001; (binary factor) +;; ^(log) +NOP +NOP +NOP +NOP +.byte %00000100; (inverse factor value) NOP NOP NOP @@ -22,11 +36,7 @@ NOP NOP NOP NOP -NOP -NOP -NOP -NOP -.byte %00000100 +.byte $5 NOP NOP NOP @@ -49,6 +59,8 @@ NOP NOP NOP NOP +.byte %00000010; (inverse factor value) + NOP NOP NOP @@ -57,8 +69,7 @@ NOP NOP NOP NOP -NOP -.byte %00000010 +.byte $6 ;; i put another lookup table where nops normaly are Bitmap = $4000 ;;This is used by pixel_draw! look at it for more detail @@ -117,13 +128,13 @@ NOP NOP NOP NOP -NOP -NOP -NOP -NOP -NOP -NOP -NOP -NOP -NOP .byte %00000001 +NOP +NOP +NOP +NOP +NOP +NOP +NOP +NOP +.byte $7 diff --git a/wip-hugo/routines/circle/circle.inc b/wip-hugo/routines/circle/circle.inc index adbe318..72a4451 100644 --- a/wip-hugo/routines/circle/circle.inc +++ b/wip-hugo/routines/circle/circle.inc @@ -9,8 +9,10 @@ Y_rel = $E2 temp = $E3 temp_ = $E4 - X_swap = $E5 - byte_to_paint_swap = $EF + temo__ = $E5 + byte_to_paint_qaa = byte_to_paint + byte_to_paint_qcb = $EB ;16bit value (uses EC) + ; E8 - EA is used by pixel.inc btp_mem_pos_center = $E6 ; 16bit value (uses E7) btp_mem_pos_center_two = btp_mem_pos_center diff --git a/wip-hugo/routines/circle/circle.s b/wip-hugo/routines/circle/circle.s index fbb4da8..2a02e2f 100644 --- a/wip-hugo/routines/circle/circle.s +++ b/wip-hugo/routines/circle/circle.s @@ -104,8 +104,7 @@ move_8px_left: Sub_16 btp_mem_pos_qdb, btp_mem_pos_qdb +1, #$40, #$01, ! ;+320 ;; Restores byte to paint - LDX #%00000001 - STX byte_to_paint + INC byte_to_paint LDA t2 decrement_x_pos_end: diff --git a/wip-hugo/routines/circle/circle_help.s b/wip-hugo/routines/circle/circle_help.s index aed3612..f70fc1c 100644 --- a/wip-hugo/routines/circle/circle_help.s +++ b/wip-hugo/routines/circle/circle_help.s @@ -63,20 +63,12 @@ draw_qaa: draw_qcb:; xy swoped STY temp - LDA byte_to_paint - STA temp__ - ;;modify Y_pos - LDY #$00 - JMP goto_loop -loop: - INY -goto_loop: - ASL byte_to_paint - BCC loop -revert_byte_to_paint: - LDA temp__ - STA byte_to_paint + LDX byte_to_paint + LDA inverse_factor_value, X;; (see END.s) + TAX + LDA log, X + TAY ;;modify X_pos LDX temp diff --git a/wip-hugo/routines/circle/circle_test.s b/wip-hugo/routines/circle/circle_test.s index bfe18aa..ede0265 100644 --- a/wip-hugo/routines/circle/circle_test.s +++ b/wip-hugo/routines/circle/circle_test.s @@ -3,7 +3,7 @@ LDA #$50 STA X_pos STA Y_pos - LDA #$55 + LDA #$40 STA radius JSR circle .endscope 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"