Removed 1 instruction from draw_line_down.s 6% performance boost
This commit is contained in:
parent
3ce76c02a8
commit
9b8e3fe33f
1 changed files with 3 additions and 4 deletions
|
@ -52,6 +52,7 @@
|
||||||
|
|
||||||
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
|
||||||
LDY #$00
|
LDY #$00
|
||||||
|
LDX X_pos
|
||||||
for_x:
|
for_x:
|
||||||
;; Paints A to address i btp_mem_pos* + Y
|
;; Paints A to address i btp_mem_pos* + Y
|
||||||
;; Y is our Y-pos-chunk-offset.
|
;; Y is our Y-pos-chunk-offset.
|
||||||
|
@ -68,8 +69,7 @@ move_8px_left:
|
||||||
LDA #%10000000
|
LDA #%10000000
|
||||||
STA byte_to_paint
|
STA byte_to_paint
|
||||||
increment_pixel_x_end:
|
increment_pixel_x_end:
|
||||||
INC X_pos;; legacy
|
INX
|
||||||
LDX X_pos
|
|
||||||
CPX X_end
|
CPX X_end
|
||||||
BEQ end
|
BEQ end
|
||||||
;;If D < %00000010 00000000: case_2
|
;;If D < %00000010 00000000: case_2
|
||||||
|
@ -78,14 +78,13 @@ increment_pixel_x_end:
|
||||||
case_1:; C =1 so we can use !
|
case_1:; C =1 so we can use !
|
||||||
Sub_16 >D, <D, >V, <V, ! ; D = D - V
|
Sub_16 >D, <D, >V, <V, ! ; D = D - V
|
||||||
increment_y_pos:
|
increment_y_pos:
|
||||||
;Add_16 >btp_mem_pos, <btp_mem_pos, #$01, #$00
|
|
||||||
INY
|
INY
|
||||||
CPY #$08 ;
|
CPY #$08 ;
|
||||||
BNE for_x
|
BNE for_x
|
||||||
move_8px_down: ; Z=1 --> C=1
|
move_8px_down: ; Z=1 --> C=1
|
||||||
;; +320-8 bytes
|
;; +320-8 bytes
|
||||||
LDY #$00
|
LDY #$00
|
||||||
Add_16 >btp_mem_pos, <btp_mem_pos,#$40, #$01
|
Add_16 >btp_mem_pos, <btp_mem_pos, #$40, #$01
|
||||||
jmp for_x
|
jmp for_x
|
||||||
increment_y_pos_end:
|
increment_y_pos_end:
|
||||||
case_2: ;; C =0 because LAG_16 so we can use !
|
case_2: ;; C =0 because LAG_16 so we can use !
|
||||||
|
|
Loading…
Add table
Reference in a new issue