mode7_demo: credits mostly there now

This commit is contained in:
Vince Weaver 2018-01-31 11:37:41 -05:00
parent 6a6c5fa2bc
commit b18f036f09
5 changed files with 40 additions and 42 deletions

7
mode7_demo/TODO Normal file
View File

@ -0,0 +1,7 @@
+ jmp/jsr tail calls
+ Mockingboard music
+ Print release day in loader
+ Hide VMW logo in binary when loading
+ Improve the starfield demo

View File

@ -1,11 +1,8 @@
; Closing Credits
;===========
; CONSTANTS
;===========
NUM_CREDITS EQU 10
;===================
; init credits
;===================
init_credits:
ldy #0
@ -56,16 +53,16 @@ done_print:
; click
;==================
lda LOOP
beq not_waiting
lda LOOP ; get wait-at-end loop counter
beq not_waiting ; if not waiting, skip ahead
clc
clc ; decrement counter
adc #$ff
sta LOOP
bne done_click
bne done_click ; if not zero, skip ahead
jsr next_credit ; was zero, skip to next credit
jsr init_credits
jmp done_click
@ -83,53 +80,49 @@ not_waiting:
cpx #0 ; if not 1, then continue
bne done_click
lda YY
cmp #9
bne short_loop
long_loop:
lda #$ff
bne store_loop
short_loop:
lda #$30 ; set delay to show the credit before
store_loop:
sta LOOP ; continuing
done_click:
rts
;==================
; Delay since done
;==================
lda #$F0
jsr WAIT
lda #$F0
jsr WAIT
lda #$F0
jsr WAIT
lda #$F0
jsr WAIT
;==================
; Next credit
;==================
next_credit:
lda #8
lda #8 ; point to text line
sta CH
lda #22
sta CV
lda OUTH
lda OUTH ; save credits pointer
pha
lda OUTL
pha
lda #>empty
lda #>empty ; point to empty string
sta OUTH
lda #<empty
sta OUTL
jsr print_both_pages
jsr print_both_pages ; clear line on both pages
pla
pla ; restore credits pointer
sta OUTL
pla
sta OUTH
ldy #0
skip_credit:
skip_credit: ; skip ahead to next credit
lda (OUTL),Y
inc OUTL
@ -138,17 +131,16 @@ skip_credit:
overflow:
cmp #0
beq done_skip
jmp skip_credit
bne skip_credit
done_skip:
ldx YY
ldx YY ; increment credit pointer
inx
stx YY
cpx #10
; beq forever
rts
;===============================
; draw the above-credits chrome
;===============================
@ -210,8 +202,6 @@ credits_draw_bottom:
lda #36
jmp hlin_double ; tail call, will return for us
; rts
;============================
; Draw text mode boilerplate
;============================

Binary file not shown.

View File

@ -17,10 +17,10 @@
;================================
main_loop:
; jsr title_routine
jsr title_routine
; jsr checkerboard_demo
; jsr island_demo
jsr checkerboard_demo
jsr island_demo
jsr star_demo
jsr star_credits

View File

@ -198,8 +198,9 @@ starcredits_loop:
jsr page_flip ; 6
inc FRAME_COUNT
lda FRAME_COUNT
cmp #$ff
lda YY
cmp #10
beq done_star_credits
;==================