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 LDA <V
STA case_1 +7 STA case_1 +7
end_selfmod: end_selfmod:
LDY #$01
JSR pixel_draw ;;only used first pixel. after this relative position is abused JSR pixel_draw ;;only used first pixel. after this relative position is abused
LDX X_pos LDX X_pos
LDY #$00
for_x: for_x:
;; Paints A to address in |btp_mem_pos* + Y| ;; 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. ;; 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 LDA <V
STA case_1 +7 STA case_1 +7
end_selfmod: end_selfmod:
LDY #$01
jsr pixel_draw jsr pixel_draw
LDY #$00
LDX Y_pos LDX Y_pos
for_y: for_y:
LDA byte_to_paint LDA byte_to_paint
@ -52,7 +52,7 @@ increment_y_pos:
BNE increment_y_pos_end BNE increment_y_pos_end
move_8px_down: move_8px_down:
LDY #$00 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: increment_y_pos_end:
INX INX
CPX Y_end CPX Y_end
@ -65,7 +65,7 @@ increment_pixel_x:
LSR byte_to_paint LSR byte_to_paint
BCC for_y BCC for_y
move_8px_left: 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 LDA #%10000000
STA byte_to_paint STA byte_to_paint
JMP for_y JMP for_y

View file

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

View file

@ -39,8 +39,8 @@
LDA <V LDA <V
STA case_1 +7 STA case_1 +7
end_selfmod: end_selfmod:
LDY #$01
jsr pixel_draw jsr pixel_draw
LDY #$00
LDX Y_pos LDX Y_pos
for_y: for_y:
LDA byte_to_paint LDA byte_to_paint
@ -65,7 +65,7 @@ increment_pixel_x:
LSR byte_to_paint LSR byte_to_paint
BCC for_y BCC for_y
move_8px_left: 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 LDA #%10000000
STA byte_to_paint STA byte_to_paint
JMP for_y JMP for_y