Push performance improvements from line_down.s to line_*.s

This commit is contained in:
hugova 2025-03-29 22:07:33 +01:00
parent 96d9bc4440
commit c0446ba5e2
4 changed files with 18 additions and 18 deletions

View file

@ -63,9 +63,9 @@ selfmod:
LDA <V
STA case_1 +7
end_selfmod:
LDY #$01
JSR pixel_draw ;;only used first pixel. after this relative position is abused
LDX X_pos
LDY #$00
for_x:
;; Paints A to address in |btp_mem_pos* + Y|
;; Y is pixel position in the chunk. Therefor it may be that Y = 0, 1, 2, 3, 4, ,5 ,6 ,7.

View file

@ -39,8 +39,8 @@ selfmod:
LDA <V
STA case_1 +7
end_selfmod:
LDY #$01
jsr pixel_draw
LDY #$00
LDX Y_pos
for_y:
LDA byte_to_paint
@ -52,7 +52,7 @@ increment_y_pos:
BNE increment_y_pos_end
move_8px_down:
LDY #$00
Add_16 >btp_mem_pos, <btp_mem_pos, #$40 ,#$01
Add_16 >btp_mem_pos, <btp_mem_pos, #$3F ,#$01, !
increment_y_pos_end:
INX
CPX Y_end
@ -65,7 +65,7 @@ increment_pixel_x:
LSR byte_to_paint
BCC for_y
move_8px_left:
Add_16 >btp_mem_pos, <btp_mem_pos, #$08, #$00
Add_16 >btp_mem_pos, <btp_mem_pos, #$07, #$00, !
LDA #%10000000
STA byte_to_paint
JMP for_y

View file

@ -41,8 +41,8 @@ selfmod:
STA case_1 +9
end_selfmod:
jsr pixel_draw
LDY #$01
Sub_16 >btp_mem_pos, <btp_mem_pos, #$01, #$00 ;; Y has always a offset of at least 1
LDY #$01
LDX X_pos
for_x:
LDA byte_to_paint
@ -52,7 +52,7 @@ increment_pixel_x:
LSR byte_to_paint
BCC increment_pixel_x_end
move_8px_left:
Add_16 >btp_mem_pos, <btp_mem_pos, #$08, #$00
Add_16 >btp_mem_pos, <btp_mem_pos, #$07, #$00,!
LDA #%10000000
STA byte_to_paint
increment_pixel_x_end:

View file

@ -29,18 +29,18 @@
Add_16 >D, <D, #$ff, #$01, !
Sub_16 >D, <D, dy, #$00
selfmod:
LDA >dx_2
STA case_2 +1
LDA <dx_2
STA case_2 +7
LDA >V
STA case_1 +1
LDA <V
STA case_1 +7
end_selfmod:
LDY #$01
selfmod:
LDA >dx_2
STA case_2 +1
LDA <dx_2
STA case_2 +7
LDA >V
STA case_1 +1
LDA <V
STA case_1 +7
end_selfmod:
jsr pixel_draw
LDY #$00
LDX Y_pos
for_y:
LDA byte_to_paint
@ -65,7 +65,7 @@ increment_pixel_x:
LSR byte_to_paint
BCC for_y
move_8px_left:
Add_16 >btp_mem_pos, <btp_mem_pos, #$08, #$00
Add_16 >btp_mem_pos, <btp_mem_pos, #$07, #$00,!
LDA #%10000000
STA byte_to_paint
JMP for_y