fireworks: allow pause between lines

This commit is contained in:
Vince Weaver 2018-09-12 15:56:49 -04:00
parent 1fa0db0016
commit 1dda82e43e
3 changed files with 53 additions and 27 deletions

View File

@ -15,6 +15,7 @@ GBASH = $27
BASL = $28
BASH = $29
FRAME = $60
WAITING = $62
LETTERL = $63
LETTERH = $64
LETTERX = $65
@ -78,6 +79,7 @@ setup_background:
lda #0
sta DRAW_PAGE
sta STATE
sta WAITING
init_letters:
lda #<letters
sta LETTERL
@ -205,24 +207,23 @@ display_loop:
; 152 * 65 = 9880
; -12 for HIRES/PAGE0 at top
; -5 for LORES+ldy+br fallthrough at bottom
; -121 for move_letters
; 9742
; -132 for move_letters
; 9731
bit HIRES ; 4
bit PAGE0 ; 4
bit FULLGR ; 4
;===========
; 12
jsr move_letters ; 6+110
jsr move_letters ; 6+126
; Try X=9 Y=191 cycles=9742
; Try X=242 Y=8 cycles=9729 R2
; lda DRAW_PAGE ; nop ; 3
; nop ; 2
nop ; 2
ldy #191 ; 2
hgloop1:ldx #9 ; 2
ldy #8 ; 2
hgloop1:ldx #242 ; 2
hgloop2:dex ; 2
bne hgloop2 ; 2nt/3
dey ; 2
@ -390,9 +391,9 @@ restart:
eor #$C0
sta sound1+2
lda sound2+2
eor #$C0
sta sound2+2
; lda sound2+2
; eor #$C0
; sta sound2+2
lda sound3+2
eor #$C0

View File

@ -585,7 +585,9 @@ explosion_erase_waste:
; waste 2176-4 = 2172
sound2:
bit SPEAKER ; 4
; bit SPEAKER ; 4
nop
nop
; Try X=47 Y=9 cycles=2170 R2

View File

@ -1,19 +1,28 @@
;===============================================
; Move Letters
;===============================================
; Normal P0 =13+2+22+41+37 = 115
; Normal P1 =13+2+22+41+37 = 115
; End of line =13+2+22+41+9+(28) = 115
; done entirely =13+5+(6+37+26+28) = 115
; Next line =13+5+9+34+(26+28) = 115
; Normal P0 =6+13+2+22+46+37 = 126
; Normal P1 =6+13+2+22+46+37 = 126
; End of line =6+13+2+22+46+9+(28) = 126
; Next line =6+13+5+14+34+(26+28) = 126
; done entirely =6+13+5+(6+42+26+28) = 126
; Waiting =6+7+(11+6+42+26+28) = 126
; all forced to be 115
; all forced to be 126
move_letters:
ldy WAITING ; 3
beq not_waiting ; 3
;============
; 6
;-1
dec WAITING ; 5
jmp wait_it_out ; 3
;===========
; 7
not_waiting:
; load letter from pointer, save into LETTER
ldy #0 ; 2
@ -59,6 +68,9 @@ letter_page1:
;============================
letter_erase:
ldy LETTERX ; nop ; 3
nop ; nop ; 5
ldy #0 ; erase old char with space ; 2
lda #' '|$80 ; 2
ldy LETTERX ; 3
@ -75,7 +87,7 @@ letter_erase:
cmp LETTERD ; 3
beq letter_next ; 3
;===========
; 41
; 46
;-1
lda #0 ; 2
@ -107,11 +119,14 @@ letter_special:
; -1
and #$7f ; clear top ; 2
sta WAITING ; this is waiting value ; 3
ldy #1 ; otherwise, Y,X pair ; 2
lda (LETTERL),Y ; get Y, put in LETTERY ; 5
sta LETTERY ; 3
;===========
; 9
; 14
iny ; get dest ; 2
lda (LETTERL),Y ; 5
@ -129,11 +144,18 @@ letter_special:
;===========
; 34
wait_it_out:
; wait 11
inc BLARGH ; 5
lda LETTERH ; 3
lda LETTERH ; 3
letter_done:
lda LETTERH ; 3
lda LETTERH ; 3
waste_37:
waste_42:
ldx #0 ; 2
inc BLARGH ; 5
inc BLARGH ; 5
@ -142,6 +164,7 @@ waste_37:
inc BLARGH ; 5
inc BLARGH ; 5
inc BLARGH ; 5
inc BLARGH ; 5
waste_26:
ldx #0 ; 2
ldx #0 ; 2
@ -171,7 +194,7 @@ letters:
.byte 22+128,28,"CODE BY",128
.byte 23,28, "DEATER",128
.byte 23+128,28,"DEATER",128
.byte 23+128,28,"DEATER",198
.byte 22,28, " ",128
.byte 22+128,28," ",128
@ -183,7 +206,7 @@ letters:
.byte 22+128,28,"FIREWORKS",128
.byte 23,28, "FOZZTEXX",128
.byte 23+128,28,"FOZZTEXX",128
.byte 23+128,28,"FOZZTEXX",198
.byte 22,28, " ",128
.byte 22+128,28," ",128