xmas2019: vapor lock on tree, not many cycles to spare

This commit is contained in:
Vince Weaver 2019-12-19 11:38:19 -05:00
parent 8be4fff5f3
commit 7b606bdf01

View File

@ -207,24 +207,6 @@ clear_lores_loop:
; -1
; 4550 cycles - 3 -1703 = 2844
; Try X=12 Y=43 cycles=2839R5
nop
lda COLOR
ldy #43 ; 2
dloop1: ldx #12 ; 2
dloop2: dex ; 2
bne dloop2 ; 2nt/3
dey ; 2
bne dloop1 ; 2nt/3
jmp display_loop
;============================================================
;============================================================
; move line
@ -238,6 +220,11 @@ dloop2: dex ; 2
;=====
; 13
jmp draw_tree ; 3
.align $100
draw_tree:
;==========================================================
;==========================================================
@ -247,9 +234,9 @@ dloop2: dex ; 2
;NEW: 2,4,6,8,10,12,14,16,18,2,2,2
;
; 2-1 + 7*TREESIZE + 85*TREESIZE +
; 18*(2+4+6+8+10+12+14+16+18+2+2+2)
; 18*(2+4+6+8+10+12+14+16+18+2+1+1)
;
; 1 + 84 + 1020 + 18*92 = 1105 + 1656 = 2761
; 1 + 84 + 1020 + 18*94 = 1105 + 1692 = 2797
ldx #0 ; 2
@ -344,20 +331,22 @@ ll_smc4:
;==============================================================
; 4550 cycles
;-1708
; -13
;-2761
; +1
; -3
;-1703 erase lores
; -13 move tree
; -3 jmp (alignment)
;-2797 draw tree
; -3 jmp at end
;========
; 66
; 31
; Try X=3 Y=3 cycles=64R2
; Try X=4 Y=1 cycles=27 R4
nop
nop
ldy #3 ; 2
eloop1: ldx #3 ; 2
ldy #1 ; 2
eloop1: ldx #4 ; 2
eloop2: dex ; 2
bne eloop2 ; 2nt/3
dey ; 2
@ -387,7 +376,7 @@ tree:
tree_color: .byte $DD,$44,$CC,$44, $CC,$11, $44, $CC, $44,$11, $CC, $88
tree_line: .byte 0, 1, 2, 3, 4, 4, 5, 6, 7, 7, 8, 9
tree_start: .byte 19, 18, 17, 16, 15, 20, 14, 13, 12, 16, 11, 19
tree_len: .byte 2-1,4-1,6-1,8-1,10-1,2-1,12-1,14-1,16-1,2-1,18-1, 2-1
tree_len: .byte 2-1,4-1,6-1,8-1,10-1,1-1,12-1,14-1,16-1,1-1,18-1, 2-1
gr_offsets_l:
.byte <$400,<$480,<$500,<$580,<$600,<$680,<$700,<$780