reduse instructions in circle draw
This commit is contained in:
parent
fbb7c395e4
commit
4916678549
2 changed files with 12 additions and 13 deletions
|
@ -55,8 +55,7 @@ draw_upper_px_in_circle:
|
||||||
LDA btp_mem_pos + 1
|
LDA btp_mem_pos + 1
|
||||||
STA btp_mem_pos_qbb + 1
|
STA btp_mem_pos_qbb + 1
|
||||||
STA btp_mem_pos_qab + 1
|
STA btp_mem_pos_qab + 1
|
||||||
LDA byte_to_paint
|
|
||||||
STA byte_to_paint_qca
|
|
||||||
|
|
||||||
STY Y_qbb
|
STY Y_qbb
|
||||||
|
|
||||||
|
@ -76,6 +75,7 @@ draw_left_px_in_circle:
|
||||||
LDA btp_mem_pos + 1
|
LDA btp_mem_pos + 1
|
||||||
STA btp_mem_pos_qca + 1
|
STA btp_mem_pos_qca + 1
|
||||||
STA btp_mem_pos_qba + 1
|
STA btp_mem_pos_qba + 1
|
||||||
|
|
||||||
LDA byte_to_paint
|
LDA byte_to_paint
|
||||||
STA byte_to_paint_qca
|
STA byte_to_paint_qca
|
||||||
|
|
||||||
|
@ -124,7 +124,8 @@ draw_right_px_in_circle:
|
||||||
|
|
||||||
STY Y_qda
|
STY Y_qda
|
||||||
STY Y_qaa
|
STY Y_qaa
|
||||||
while_x_bigger_then_y:
|
LDX #$08
|
||||||
|
while_x_bigger_then_y: ; X=8 always expected
|
||||||
|
|
||||||
draw_qaa:
|
draw_qaa:
|
||||||
LDY Y_qaa
|
LDY Y_qaa
|
||||||
|
@ -180,9 +181,8 @@ qaa_y_underflow:
|
||||||
qaa_y_end:
|
qaa_y_end:
|
||||||
qda_y:
|
qda_y:
|
||||||
INC Y_qda
|
INC Y_qda
|
||||||
LDA Y_qda
|
CPX Y_qda
|
||||||
CMP #$08
|
BNE qda_y_end
|
||||||
BCC qda_y_end
|
|
||||||
qda_y_overflow:
|
qda_y_overflow:
|
||||||
Add_16 btp_mem_pos_qda, btp_mem_pos_qda + 1, #$3f, #$01,! ;+319 + C
|
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
|
Add_16 btp_mem_pos_qca, btp_mem_pos_qca + 1, #$40, #$01,! ;+320
|
||||||
|
@ -203,8 +203,8 @@ qcb_x:
|
||||||
BCC qcb_x_end
|
BCC qcb_x_end
|
||||||
qcb_x_overflow:
|
qcb_x_overflow:
|
||||||
INC byte_to_paint_qcb
|
INC byte_to_paint_qcb
|
||||||
LDA #$01
|
;LDA #$01
|
||||||
STA byte_to_paint_qcb
|
;STA byte_to_paint_qcb
|
||||||
Sub_16 btp_mem_pos_qcb, btp_mem_pos_qcb + 1, #$08, #$00,!
|
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,!
|
Sub_16 btp_mem_pos_qbb, btp_mem_pos_qbb + 1, #$08, #$00,!
|
||||||
qcb_x_end:
|
qcb_x_end:
|
||||||
|
@ -260,9 +260,8 @@ qdb_y_end:
|
||||||
|
|
||||||
qbb_y:
|
qbb_y:
|
||||||
INC Y_qbb
|
INC Y_qbb
|
||||||
LDA Y_qbb
|
CPX Y_qbb ; Is Y_qbb ==8 ?
|
||||||
CMP #$08
|
BNE qbb_y_end
|
||||||
BCC qbb_y_end
|
|
||||||
qbb_y_overflow:
|
qbb_y_overflow:
|
||||||
|
|
||||||
Add_16 btp_mem_pos_qbb, btp_mem_pos_qbb + 1, #$3f, #$01, ! ;+320
|
Add_16 btp_mem_pos_qbb, btp_mem_pos_qbb + 1, #$3f, #$01, ! ;+320
|
||||||
|
|
|
@ -10,9 +10,9 @@
|
||||||
|
|
||||||
;.include "routines/arithmatic/mult_test.s"
|
;.include "routines/arithmatic/mult_test.s"
|
||||||
;.include "routines/arithmatic/div_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_size.s"
|
||||||
.include "routines/circle/circle_test_position.s"
|
;.include "routines/circle/circle_test_position.s"
|
||||||
;.include "routines/line/line_test.s"
|
;.include "routines/line/line_test.s"
|
||||||
;.include "routines/text/char_draw_test.s"
|
;.include "routines/text/char_draw_test.s"
|
||||||
;.include "routines/pixel/pixel_test.s"
|
;.include "routines/pixel/pixel_test.s"
|
||||||
|
|
Loading…
Add table
Reference in a new issue