waterfall: urgh, is it done?

This commit is contained in:
Vince Weaver 2018-08-03 16:50:13 -04:00
parent eccd6feae6
commit 958501f2ff

View File

@ -542,352 +542,6 @@ gr_offsets:
.include "tfv_sprites.inc" .include "tfv_sprites.inc"
.align $100
;=================================
; Display Odd
;=================================
; we have 65 cycles per line
; the first 25 are in hblank
; we come in already 21 cycles into things
; so the first scanline is a loss (but that's OK)
; first scanline: comes in with 38
; second+ scanline need to kill 65
display_odd:
odd_first_four_lines:
; line 0
; 38
ldy #4 ; 2
asl DUMMY ; 6
asl DUMMY ; 6
asl DUMMY ; 6
lda YPOS ; 3
nop
nop
; line 1, 65 cycles
asl DUMMY ; 6
asl DUMMY ; 6
asl DUMMY ; 6
asl DUMMY ; 6
asl DUMMY ; 6
asl DUMMY ; 6
asl DUMMY ; 6
asl DUMMY ; 6
asl DUMMY ; 6
asl DUMMY ; 6
lda YPOS ; 3
nop ; 2
; line 2, 65 cycles
asl DUMMY ; 6
asl DUMMY ; 6
asl DUMMY ; 6
asl DUMMY ; 6
asl DUMMY ; 6
asl DUMMY ; 6
asl DUMMY ; 6
asl DUMMY ; 6
asl DUMMY ; 6
asl DUMMY ; 6
lda YPOS ; 3
nop ; 2
; line 3, 65 cycles
asl DUMMY ; 6
asl DUMMY ; 6
asl DUMMY ; 6
asl DUMMY ; 6
asl DUMMY ; 6
asl DUMMY ; 6
asl DUMMY ; 6
asl DUMMY ; 6
asl DUMMY ; 6
asl DUMMY ; 6
lda YPOS ; 3
nop ; 2
odd_twinkle_stars:
twinkle_loop_odd:
; line 0
bit PAGE1 ; 4
; delay 29
asl DUMMY ; 6
asl DUMMY ; 6
asl DUMMY ; 6
asl DUMMY ; 6
lda YPOS ; 3
nop ; 2
; falls
bit PAGE1 ; 4
lda YPOS ; 3
bit PAGE1 ; 4
; endfalls
; delay 21
asl DUMMY ; 6
asl DUMMY ; 6
asl DUMMY ; 6
lda YPOS ; 3
; line 2
bit PAGE1 ; 4
; delay 29
asl DUMMY ; 6
asl DUMMY ; 6
asl DUMMY ; 6
asl DUMMY ; 6
lda YPOS ; 3
nop ; 2
; falls
bit PAGE1 ; 4
lda YPOS ; 3
bit PAGE1 ; 4
; end falls
; delay 21
asl DUMMY ; 6
asl DUMMY ; 6
asl DUMMY ; 6
lda YPOS ; 3
; line 3
bit PAGE1 ; 4
; delay 29
asl DUMMY ; 6
asl DUMMY ; 6
asl DUMMY ; 6
asl DUMMY ; 6
lda YPOS ; 3
nop ; 2
; falls
bit PAGE1 ; 4
lda YPOS ; 3
bit PAGE1 ; 4
; end falls
; delay 21
asl DUMMY ; 6
asl DUMMY ; 6
asl DUMMY ; 6
lda YPOS ; 3
; line 4
bit PAGE1 ; 4
; delay 29
asl DUMMY ; 6
asl DUMMY ; 6
asl DUMMY ; 6
asl DUMMY ; 6
lda YPOS ; 3
nop ; 2
; falls
bit PAGE1 ; 4
lda YPOS ; 3
bit PAGE1 ; 4 ; 44
; end falls
; delay 21 - 7 from loop
asl DUMMY ; 6
asl DUMMY ; 6
nop ; 2 ; 58
dey ; 2
beq twinkle_loop_odd_done ;
; 2
jmp twinkle_loop_odd ; 3
twinkle_loop_odd_done:
ldy #31 ; 2
falls_loop_odd:
; line 0
bit PAGE0 ; 4
; delay 29
asl DUMMY ; 6
asl DUMMY ; 6
asl DUMMY ; 6
asl DUMMY ; 6
lda YPOS ; 3
nop ; 2
; falls
bit PAGE1 ; 4
lda YPOS ; 3
bit PAGE0 ; 4
; endfalls
; delay 21
asl DUMMY ; 6
asl DUMMY ; 6
asl DUMMY ; 6
lda YPOS ; 3
; line 2
bit PAGE0 ; 4
; delay 29
asl DUMMY ; 6
asl DUMMY ; 6
asl DUMMY ; 6
asl DUMMY ; 6
lda YPOS ; 3
nop ; 2
; falls
bit PAGE1 ; 4
lda YPOS ; 3
bit PAGE0 ; 4
; end falls
; delay 21
asl DUMMY ; 6
asl DUMMY ; 6
asl DUMMY ; 6
lda YPOS ; 3
; line 3
bit PAGE0 ; 4
; delay 29
asl DUMMY ; 6
asl DUMMY ; 6
asl DUMMY ; 6
asl DUMMY ; 6
lda YPOS ; 3
nop ; 2
; falls
bit PAGE0 ; 4
lda YPOS ; 3
bit PAGE0 ; 4
; end falls
; delay 21
asl DUMMY ; 6
asl DUMMY ; 6
asl DUMMY ; 6
lda YPOS ; 3
; line 4
bit PAGE0 ; 4
; delay 29
asl DUMMY ; 6
asl DUMMY ; 6
asl DUMMY ; 6
asl DUMMY ; 6
lda YPOS ; 3
nop ; 2
; falls
bit PAGE0 ; 4
lda YPOS ; 3
bit PAGE0 ; 4 ; 44
; end falls
; delay 21 - 7 from loop
asl DUMMY ; 6
asl DUMMY ; 6
nop ; 2 ; 58
dey ; 2
beq falls_loop_odd_done ;
; 2
jmp falls_loop_odd ; 3
falls_loop_odd_done:
; 3
ldy #12 ; 2
ground_loop_odd:
; line 0
bit PAGE1 ; 4
; delay 29
asl DUMMY ; 6
asl DUMMY ; 6
asl DUMMY ; 6
asl DUMMY ; 6
lda YPOS ; 3
nop ; 2
; falls
bit PAGE1 ; 4
lda YPOS ; 3
bit PAGE1 ; 4
; endfalls
; delay 21
asl DUMMY ; 6
asl DUMMY ; 6
asl DUMMY ; 6
lda YPOS ; 3
; line 2
bit PAGE0 ; 4
; delay 29
asl DUMMY ; 6
asl DUMMY ; 6
asl DUMMY ; 6
asl DUMMY ; 6
lda YPOS ; 3
nop ; 2
; falls
bit PAGE0 ; 4
lda YPOS ; 3
bit PAGE0 ; 4
; end falls
; delay 21
asl DUMMY ; 6
asl DUMMY ; 6
asl DUMMY ; 6
lda YPOS ; 3
; line 3
bit PAGE1 ; 4
; delay 29
asl DUMMY ; 6
asl DUMMY ; 6
asl DUMMY ; 6
asl DUMMY ; 6
lda YPOS ; 3
nop ; 2
; falls
bit PAGE1 ; 4
lda YPOS ; 3
bit PAGE1 ; 4
; end falls
; delay 21
asl DUMMY ; 6
asl DUMMY ; 6
asl DUMMY ; 6
lda YPOS ; 3
; line 4
bit PAGE0 ; 4
; delay 29
asl DUMMY ; 6
asl DUMMY ; 6
asl DUMMY ; 6
asl DUMMY ; 6
lda YPOS ; 3
nop ; 2
; falls
bit PAGE0 ; 4
lda YPOS ; 3
bit PAGE0 ; 4 ; 44
; end falls
; delay 21 - 7 from loop
asl DUMMY ; 6
asl DUMMY ; 6
nop ; 2 ; 58
dey ; 2
beq ground_loop_odd_done ;
; 2
jmp ground_loop_odd ; 3
ground_loop_odd_done:
; 3
nop ; 2
jmp display_loop_return ; 3
rts ; 6
.align $100 .align $100
@ -1250,6 +904,353 @@ ground_loop_even_done:
jmp display_loop_return ; 3 jmp display_loop_return ; 3
.align $100
;=================================
; Display Odd
;=================================
; we have 65 cycles per line
; the first 25 are in hblank
; we come in already 21 cycles into things
; so the first scanline is a loss (but that's OK)
; first scanline: comes in with 38
; second+ scanline need to kill 65
display_odd:
odd_first_four_lines:
; line 0
; 38
ldy #4 ; 2
asl DUMMY ; 6
asl DUMMY ; 6
asl DUMMY ; 6
lda YPOS ; 3
nop
nop
; line 1, 65 cycles
asl DUMMY ; 6
asl DUMMY ; 6
asl DUMMY ; 6
asl DUMMY ; 6
asl DUMMY ; 6
asl DUMMY ; 6
asl DUMMY ; 6
asl DUMMY ; 6
asl DUMMY ; 6
asl DUMMY ; 6
lda YPOS ; 3
nop ; 2
; line 2, 65 cycles
asl DUMMY ; 6
asl DUMMY ; 6
asl DUMMY ; 6
asl DUMMY ; 6
asl DUMMY ; 6
asl DUMMY ; 6
asl DUMMY ; 6
asl DUMMY ; 6
asl DUMMY ; 6
asl DUMMY ; 6
lda YPOS ; 3
nop ; 2
; line 3, 65 cycles
asl DUMMY ; 6
asl DUMMY ; 6
asl DUMMY ; 6
asl DUMMY ; 6
asl DUMMY ; 6
asl DUMMY ; 6
asl DUMMY ; 6
asl DUMMY ; 6
asl DUMMY ; 6
asl DUMMY ; 6
lda YPOS ; 3
nop ; 2
odd_twinkle_stars:
twinkle_loop_odd:
; line 0
bit PAGE1 ; 4
; delay 29
asl DUMMY ; 6
asl DUMMY ; 6
asl DUMMY ; 6
asl DUMMY ; 6
lda YPOS ; 3
nop ; 2
; falls
bit PAGE1 ; 4
lda YPOS ; 3
bit PAGE1 ; 4
; endfalls
; delay 21
asl DUMMY ; 6
asl DUMMY ; 6
asl DUMMY ; 6
lda YPOS ; 3
; line 2
bit PAGE1 ; 4
; delay 29
asl DUMMY ; 6
asl DUMMY ; 6
asl DUMMY ; 6
asl DUMMY ; 6
lda YPOS ; 3
nop ; 2
; falls
bit PAGE1 ; 4
lda YPOS ; 3
bit PAGE1 ; 4
; end falls
; delay 21
asl DUMMY ; 6
asl DUMMY ; 6
asl DUMMY ; 6
lda YPOS ; 3
; line 3
bit PAGE1 ; 4
; delay 29
asl DUMMY ; 6
asl DUMMY ; 6
asl DUMMY ; 6
asl DUMMY ; 6
lda YPOS ; 3
nop ; 2
; falls
bit PAGE1 ; 4
lda YPOS ; 3
bit PAGE1 ; 4
; end falls
; delay 21
asl DUMMY ; 6
asl DUMMY ; 6
asl DUMMY ; 6
lda YPOS ; 3
; line 4
bit PAGE1 ; 4
; delay 29
asl DUMMY ; 6
asl DUMMY ; 6
asl DUMMY ; 6
asl DUMMY ; 6
lda YPOS ; 3
nop ; 2
; falls
bit PAGE1 ; 4
lda YPOS ; 3
bit PAGE1 ; 4 ; 44
; end falls
; delay 21 - 7 from loop
asl DUMMY ; 6
asl DUMMY ; 6
nop ; 2 ; 58
dey ; 2
beq twinkle_loop_odd_done ;
; 2
jmp twinkle_loop_odd ; 3
twinkle_loop_odd_done:
ldy #31 ; 2
falls_loop_odd:
; line 0
bit PAGE0 ; 4
; delay 29
asl DUMMY ; 6
asl DUMMY ; 6
asl DUMMY ; 6
asl DUMMY ; 6
lda YPOS ; 3
nop ; 2
; falls
bit PAGE1 ; 4
lda YPOS ; 3
bit PAGE0 ; 4
; endfalls
; delay 21
asl DUMMY ; 6
asl DUMMY ; 6
asl DUMMY ; 6
lda YPOS ; 3
; line 2
bit PAGE0 ; 4
; delay 29
asl DUMMY ; 6
asl DUMMY ; 6
asl DUMMY ; 6
asl DUMMY ; 6
lda YPOS ; 3
nop ; 2
; falls
bit PAGE0 ; 4
lda YPOS ; 3
bit PAGE0 ; 4
; end falls
; delay 21
asl DUMMY ; 6
asl DUMMY ; 6
asl DUMMY ; 6
lda YPOS ; 3
; line 3
bit PAGE0 ; 4
; delay 29
asl DUMMY ; 6
asl DUMMY ; 6
asl DUMMY ; 6
asl DUMMY ; 6
lda YPOS ; 3
nop ; 2
; falls
bit PAGE0 ; 4
lda YPOS ; 3
bit PAGE0 ; 4
; end falls
; delay 21
asl DUMMY ; 6
asl DUMMY ; 6
asl DUMMY ; 6
lda YPOS ; 3
; line 4
bit PAGE0 ; 4
; delay 29
asl DUMMY ; 6
asl DUMMY ; 6
asl DUMMY ; 6
asl DUMMY ; 6
lda YPOS ; 3
nop ; 2
; falls
bit PAGE1 ; 4
lda YPOS ; 3
bit PAGE0 ; 4 ; 44
; end falls
; delay 21 - 7 from loop
asl DUMMY ; 6
asl DUMMY ; 6
nop ; 2 ; 58
dey ; 2
beq falls_loop_odd_done ;
; 2
jmp falls_loop_odd ; 3
falls_loop_odd_done:
; 3
ldy #12 ; 2
ground_loop_odd:
; line 0
bit PAGE1 ; 4
; delay 29
asl DUMMY ; 6
asl DUMMY ; 6
asl DUMMY ; 6
asl DUMMY ; 6
lda YPOS ; 3
nop ; 2
; falls
bit PAGE1 ; 4
lda YPOS ; 3
bit PAGE1 ; 4
; endfalls
; delay 21
asl DUMMY ; 6
asl DUMMY ; 6
asl DUMMY ; 6
lda YPOS ; 3
; line 2
bit PAGE0 ; 4
; delay 29
asl DUMMY ; 6
asl DUMMY ; 6
asl DUMMY ; 6
asl DUMMY ; 6
lda YPOS ; 3
nop ; 2
; falls
bit PAGE0 ; 4
lda YPOS ; 3
bit PAGE0 ; 4
; end falls
; delay 21
asl DUMMY ; 6
asl DUMMY ; 6
asl DUMMY ; 6
lda YPOS ; 3
; line 3
bit PAGE1 ; 4
; delay 29
asl DUMMY ; 6
asl DUMMY ; 6
asl DUMMY ; 6
asl DUMMY ; 6
lda YPOS ; 3
nop ; 2
; falls
bit PAGE1 ; 4
lda YPOS ; 3
bit PAGE1 ; 4
; end falls
; delay 21
asl DUMMY ; 6
asl DUMMY ; 6
asl DUMMY ; 6
lda YPOS ; 3
; line 4
bit PAGE0 ; 4
; delay 29
asl DUMMY ; 6
asl DUMMY ; 6
asl DUMMY ; 6
asl DUMMY ; 6
lda YPOS ; 3
nop ; 2
; falls
bit PAGE0 ; 4
lda YPOS ; 3
bit PAGE0 ; 4 ; 44
; end falls
; delay 21 - 7 from loop
asl DUMMY ; 6
asl DUMMY ; 6
nop ; 2 ; 58
dey ; 2
beq ground_loop_odd_done ;
; 2
jmp ground_loop_odd ; 3
ground_loop_odd_done:
; 3
nop ; 2
jmp display_loop_return ; 3
rts ; 6
.align $100 .align $100
@ -1794,7 +1795,7 @@ falls_loop_four:
lda YPOS ; 3 lda YPOS ; 3
nop ; 2 nop ; 2
; falls ; falls
bit PAGE0 ; 4 bit PAGE1 ; 4
lda YPOS ; 3 lda YPOS ; 3
bit PAGE0 ; 4 bit PAGE0 ; 4
; end falls ; end falls
@ -1834,7 +1835,7 @@ falls_loop_four:
lda YPOS ; 3 lda YPOS ; 3
nop ; 2 nop ; 2
; falls ; falls
bit PAGE1 ; 4 bit PAGE0 ; 4
lda YPOS ; 3 lda YPOS ; 3
bit PAGE0 ; 4 ; 44 bit PAGE0 ; 4 ; 44
; end falls ; end falls