unroll loop for faster char-draw:s
This commit is contained in:
parent
98ef4eaef0
commit
c1a79b32b7
2 changed files with 21 additions and 6 deletions
|
@ -51,14 +51,29 @@ calculate_screen_position:
|
||||||
Add_16 screen_position, screen_position + 1, A, #$00
|
Add_16 screen_position, screen_position + 1, A, #$00
|
||||||
|
|
||||||
move_data:
|
move_data:
|
||||||
|
|
||||||
;; One character is 8 byte, move these bytes to screen
|
;; One character is 8 byte, move these bytes to screen
|
||||||
LDY #$07
|
LDY #$07
|
||||||
@loop:
|
|
||||||
LDA (petski_position), Y
|
LDA (petski_position), Y
|
||||||
STA (screen_position), Y
|
STA (screen_position), Y
|
||||||
DEY
|
DEY ;$06
|
||||||
BNE @loop
|
LDA (petski_position), Y
|
||||||
|
STA (screen_position), Y
|
||||||
|
DEY ;$05
|
||||||
|
LDA (petski_position), Y
|
||||||
|
STA (screen_position), Y
|
||||||
|
DEY ;$04
|
||||||
|
LDA (petski_position), Y
|
||||||
|
STA (screen_position), Y
|
||||||
|
DEY ;$03
|
||||||
|
LDA (petski_position), Y
|
||||||
|
STA (screen_position), Y
|
||||||
|
DEY ;$02
|
||||||
|
LDA (petski_position), Y
|
||||||
|
STA (screen_position), Y
|
||||||
|
DEY ;$01
|
||||||
|
LDA (petski_position), Y
|
||||||
|
STA (screen_position), Y
|
||||||
|
DEY ;$00
|
||||||
LDA (petski_position), Y
|
LDA (petski_position), Y
|
||||||
STA (screen_position), Y
|
STA (screen_position), Y
|
||||||
RTS
|
RTS
|
||||||
|
|
|
@ -9,10 +9,10 @@
|
||||||
;.include "dubbel_buffer/raster_irqs.s"
|
;.include "dubbel_buffer/raster_irqs.s"
|
||||||
|
|
||||||
.include "routines/line/line_test.s"
|
.include "routines/line/line_test.s"
|
||||||
;.include "routines/text/char_draw_test.s"
|
.include "routines/text/char_draw_test.s"
|
||||||
;.include "routines/pixel/pixel_test.s"
|
;.include "routines/pixel/pixel_test.s"
|
||||||
;.include "routines/memory/memcpy_test.s"
|
;.include "routines/memory/memcpy_test.s"
|
||||||
.include "routines/memory/memset_test.s"
|
;.include "routines/memory/memset_test.s"
|
||||||
;.include "routines/triangle/triangle_test.s"
|
;.include "routines/triangle/triangle_test.s"
|
||||||
exit:
|
exit:
|
||||||
JMP exit
|
JMP exit
|
||||||
|
|
Loading…
Add table
Reference in a new issue