add more circle testing and remove none working offsets
This commit is contained in:
parent
7196992043
commit
c1846e35bd
4 changed files with 49 additions and 16 deletions
|
@ -29,8 +29,6 @@ draw_center_px_in_circle:
|
||||||
|
|
||||||
;; btp_mem_pos_center_two = 2*btp_mem_pos_center | used later for calculating btp_mem_pos_inv
|
;; btp_mem_pos_center_two = 2*btp_mem_pos_center | used later for calculating btp_mem_pos_inv
|
||||||
Mult_16 btp_mem_pos_center, btp_mem_pos_center + 1
|
Mult_16 btp_mem_pos_center, btp_mem_pos_center + 1
|
||||||
;; fix offset of 8 bytes, idk why this is needed
|
|
||||||
Sub_16 btp_mem_pos_center, btp_mem_pos_center + 1, #$40, #$01 ;-320
|
|
||||||
|
|
||||||
draw_lower_px_in_circle:
|
draw_lower_px_in_circle:
|
||||||
CLC
|
CLC
|
||||||
|
@ -47,9 +45,6 @@ draw_lower_px_in_circle:
|
||||||
LDA btp_mem_pos + 1
|
LDA btp_mem_pos + 1
|
||||||
STA btp_mem_pos_qdb + 1
|
STA btp_mem_pos_qdb + 1
|
||||||
STA btp_mem_pos_qcb + 1
|
STA btp_mem_pos_qcb + 1
|
||||||
;; fix offset of 8 bytes, idk why this is needed
|
|
||||||
Sub_16 btp_mem_pos_qcb, btp_mem_pos_qcb + 1, #$40, #$01 ;-320
|
|
||||||
Sub_16 btp_mem_pos_qdb, btp_mem_pos_qdb + 1, #$40, #$01 ;-320
|
|
||||||
|
|
||||||
LDA temp
|
LDA temp
|
||||||
STA Y_pos
|
STA Y_pos
|
||||||
|
@ -68,10 +63,8 @@ draw_right_px_in_circle:
|
||||||
LDA btp_mem_pos + 1
|
LDA btp_mem_pos + 1
|
||||||
STA btp_mem_pos_qda + 1
|
STA btp_mem_pos_qda + 1
|
||||||
|
|
||||||
;; fix offset of 8 bytes, idk why this is needed
|
|
||||||
Sub_16 btp_mem_pos_qda, btp_mem_pos_qda + 1, #$40, #$01 ;-320
|
|
||||||
|
|
||||||
while_x_bigger_then_y:
|
while_x_bigger_then_y:
|
||||||
|
SEC
|
||||||
;;Draw pixels and does the ypos incrementation logic
|
;;Draw pixels and does the ypos incrementation logic
|
||||||
;; WARNING expects C=1 before and C =0 !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
|
;; WARNING expects C=1 before and C =0 !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
|
||||||
JSR circle_help
|
JSR circle_help
|
||||||
|
|
|
@ -108,15 +108,8 @@ draw_qbb:;; the one not working
|
||||||
ORA (btp_mem_pos_qbb), Y
|
ORA (btp_mem_pos_qbb), Y
|
||||||
STA (btp_mem_pos_qbb), Y
|
STA (btp_mem_pos_qbb), Y
|
||||||
|
|
||||||
;LDY temp_
|
|
||||||
|
|
||||||
draw_qab:; xy swoped + mirroring
|
draw_qab:; xy swoped + mirroring
|
||||||
|
|
||||||
;STY temp_
|
|
||||||
;LDA #$07
|
|
||||||
;SBC temp_
|
|
||||||
;TAY
|
|
||||||
|
|
||||||
TXA
|
TXA
|
||||||
ORA (btp_mem_pos_qab), Y
|
ORA (btp_mem_pos_qab), Y
|
||||||
STA (btp_mem_pos_qab), Y
|
STA (btp_mem_pos_qab), Y
|
||||||
|
|
45
wip-hugo/routines/circle/circle_test_extensive.s
Normal file
45
wip-hugo/routines/circle/circle_test_extensive.s
Normal file
|
@ -0,0 +1,45 @@
|
||||||
|
.scope circle_test
|
||||||
|
.include "circle.inc"
|
||||||
|
|
||||||
|
LDA #$50
|
||||||
|
STA X_pos
|
||||||
|
STA Y_pos
|
||||||
|
LDA #$00
|
||||||
|
STA $EF
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
LDX #$ff
|
||||||
|
LDY #$ff
|
||||||
|
hihi:
|
||||||
|
NOP
|
||||||
|
NOP
|
||||||
|
DEX
|
||||||
|
BNE hihi
|
||||||
|
DEY
|
||||||
|
BNE hihi
|
||||||
|
|
||||||
|
LDA #$50
|
||||||
|
STA X_pos
|
||||||
|
STA Y_pos
|
||||||
|
|
||||||
|
INC $EF
|
||||||
|
LDA $EF
|
||||||
|
|
||||||
|
STA radius
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
VIC_bank = $4000
|
||||||
|
Mov_16 A_start, A_start + 1, #<VIC_bank, #>VIC_bank
|
||||||
|
Mov_16 length, length + 1, #<$1f40, #>$1f40
|
||||||
|
LDA #$00
|
||||||
|
jsr memset
|
||||||
|
|
||||||
|
JSR circle
|
||||||
|
|
||||||
|
LDX #$ff
|
||||||
|
LDY #$ff
|
||||||
|
|
||||||
|
jmp hihi
|
||||||
|
.endscope
|
|
@ -10,7 +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_extensive.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