Improve performance of line_down from 837970 to 835768 (cpu cyceles of a test)

This commit is contained in:
hugova 2025-03-29 21:50:25 +01:00
parent 963cc1b258
commit 96d9bc4440
2 changed files with 7 additions and 3 deletions

View file

@ -77,7 +77,9 @@ increment_pixel_x:
BCC increment_pixel_x_end; We need to move to the next chunk
move_8px_left:
;; Next chunk is 8 addresses away. Look in pixel_draw for more detail.
Add_16 >btp_mem_pos, <btp_mem_pos, #$08, #$00
;; -8.
;; C = 1 therefore you se 07
Add_16 >btp_mem_pos, <btp_mem_pos, #$07, #$00, !
;; Restores byte to paint
LDA #%10000000
STA byte_to_paint
@ -101,7 +103,9 @@ increment_y_pos:
move_8px_down: ; Z=1 --> C=1
LDY #$00
;; Switch to chunk bellow
Add_16 >btp_mem_pos, <btp_mem_pos, #$40, #$01; +320
; C = 1
; So we subtract #$3F, #$01 +C
Add_16 >btp_mem_pos, <btp_mem_pos, #$3F, #$01, !; +320
JMP for_x
increment_y_pos_end:
case_2:

View file

@ -3,7 +3,7 @@
.include "macros/timer.s"
.include "STARTUP.s"
.include "routines/line/line_test.s"
.include "routines/line/line_test_time.s"
;jsr char_draw
;;This is used by .s files to terminate nicely without reading includes at the end!
exit: