Improve performance of line_down from 837970 to 835768 (cpu cyceles of a test)
This commit is contained in:
parent
963cc1b258
commit
96d9bc4440
2 changed files with 7 additions and 3 deletions
|
@ -77,7 +77,9 @@ increment_pixel_x:
|
||||||
BCC increment_pixel_x_end; We need to move to the next chunk
|
BCC increment_pixel_x_end; We need to move to the next chunk
|
||||||
move_8px_left:
|
move_8px_left:
|
||||||
;; Next chunk is 8 addresses away. Look in pixel_draw for more detail.
|
;; 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
|
;; Restores byte to paint
|
||||||
LDA #%10000000
|
LDA #%10000000
|
||||||
STA byte_to_paint
|
STA byte_to_paint
|
||||||
|
@ -101,7 +103,9 @@ increment_y_pos:
|
||||||
move_8px_down: ; Z=1 --> C=1
|
move_8px_down: ; Z=1 --> C=1
|
||||||
LDY #$00
|
LDY #$00
|
||||||
;; Switch to chunk bellow
|
;; 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
|
JMP for_x
|
||||||
increment_y_pos_end:
|
increment_y_pos_end:
|
||||||
case_2:
|
case_2:
|
||||||
|
|
|
@ -3,7 +3,7 @@
|
||||||
.include "macros/timer.s"
|
.include "macros/timer.s"
|
||||||
|
|
||||||
.include "STARTUP.s"
|
.include "STARTUP.s"
|
||||||
.include "routines/line/line_test.s"
|
.include "routines/line/line_test_time.s"
|
||||||
;jsr char_draw
|
;jsr char_draw
|
||||||
;;This is used by .s files to terminate nicely without reading includes at the end!
|
;;This is used by .s files to terminate nicely without reading includes at the end!
|
||||||
exit:
|
exit:
|
||||||
|
|
Loading…
Add table
Reference in a new issue