fix small issues with linedraw
This commit is contained in:
parent
1ad8071f75
commit
8fe1c85a40
5 changed files with 18 additions and 16 deletions
|
@ -10,7 +10,7 @@
|
|||
STA dx
|
||||
BCC dx_no_underflow;; X_end >= X_pos
|
||||
EOR #$ff ; Fix bit underflow
|
||||
dx_no_underflow:
|
||||
dx_no_underflow:
|
||||
SEC
|
||||
LDA Y_pos
|
||||
SBC Y_end
|
||||
|
|
|
@ -57,8 +57,9 @@ end_selfmod:
|
|||
JSR pixel_calc ;;only used first pixel. after this relative position is abused
|
||||
STA byte_to_paint
|
||||
INY
|
||||
Sub_16 btp_mem_pos, btp_mem_pos + 1, #$01, #$00
|
||||
Sub_16 btp_mem_pos, btp_mem_pos + 1, #$00, #$00, !
|
||||
LDX dy
|
||||
CLC
|
||||
for_y:
|
||||
LDA byte_to_paint
|
||||
ORA (btp_mem_pos), Y
|
||||
|
@ -68,7 +69,7 @@ increment_y_pos:
|
|||
BNE increment_y_pos_end
|
||||
move_8px_down:
|
||||
LDY #$08
|
||||
Sub_16 btp_mem_pos, btp_mem_pos + 1, #$40 ,#$01
|
||||
Sub_16 btp_mem_pos, btp_mem_pos + 1, #$3f ,#$01, !
|
||||
increment_y_pos_end:
|
||||
DEX
|
||||
;CPX Y_end
|
||||
|
@ -80,8 +81,8 @@ increment_pixel_x:
|
|||
ASL byte_to_paint
|
||||
BCC for_y
|
||||
move_8px_left:
|
||||
ROL byte_to_paint
|
||||
Sub_16 btp_mem_pos, btp_mem_pos + 1, #$08, #$00
|
||||
ROL byte_to_paint
|
||||
JMP for_y
|
||||
case_2:
|
||||
Add_16 D, D + 1, #>dx_2, #<dx_2, ! ;D = D + 2*dx
|
||||
|
|
|
@ -53,7 +53,7 @@ selfmod:
|
|||
end_selfmod:
|
||||
JSR pixel_calc ;;only used first pixel. after this relative position is abused
|
||||
STA byte_to_paint
|
||||
Sub_16 btp_mem_pos, btp_mem_pos + 1, #$01, #$00 ;; Y has always a offset of at least 1
|
||||
Sub_16 btp_mem_pos, btp_mem_pos + 1, #$00, #$00, !
|
||||
;LDY #$01
|
||||
INY
|
||||
LDX dx
|
||||
|
|
|
@ -53,8 +53,8 @@ end_selfmod:
|
|||
JSR pixel_calc ;;only used first pixel. after this relative position is abused
|
||||
STA byte_to_paint
|
||||
INY
|
||||
Sub_16 btp_mem_pos, btp_mem_pos + 1, #$01, #$00 ;; Y has always a offset of at least 1
|
||||
;LDY #$00
|
||||
Sub_16 btp_mem_pos, btp_mem_pos + 1, #$00, #$00,!
|
||||
CLC
|
||||
LDX dy
|
||||
for_y:
|
||||
LDA byte_to_paint
|
||||
|
@ -65,6 +65,7 @@ decrement_y_pos:
|
|||
BNE decrement_y_pos_end
|
||||
move_8px_up:
|
||||
LDY #$08
|
||||
; C=0
|
||||
Sub_16 btp_mem_pos, btp_mem_pos + 1,#$3F , #$01, !
|
||||
decrement_y_pos_end:
|
||||
DEX
|
||||
|
|
|
@ -8,17 +8,17 @@
|
|||
.include "STARTUP.s"
|
||||
;.include "dubbel_buffer/raster_irqs.s"
|
||||
|
||||
;.include "routines/arithmatic/mult_test.s"
|
||||
;.include "routines/arithmatic/div_test.s"
|
||||
;.include "routines/circle/circle_test.s"
|
||||
;.include "routines/circle/circle_test_size.s"
|
||||
;.include "routines/circle/circle_test_position.s"
|
||||
.include "routines/arithmatic/mult_test.s"
|
||||
.include "routines/arithmatic/div_test.s"
|
||||
.include "routines/circle/circle_test.s"
|
||||
.include "routines/circle/circle_test_size.s"
|
||||
.include "routines/circle/circle_test_position.s"
|
||||
.include "routines/line/line_test.s"
|
||||
.include "routines/line/line_test_extensive.s"
|
||||
;.include "routines/text/char_draw_test.s"
|
||||
;.include "routines/pixel/pixel_test.s"
|
||||
;.include "routines/memory/memcpy_test.s"
|
||||
;.include "routines/memory/memset_test.s"
|
||||
.include "routines/text/char_draw_test.s"
|
||||
.include "routines/pixel/pixel_test.s"
|
||||
.include "routines/memory/memcpy_test.s"
|
||||
.include "routines/memory/memset_test.s"
|
||||
|
||||
;.include "routines/triangle/triangle_test.s"
|
||||
exit:
|
||||
|
|
Loading…
Add table
Reference in a new issue