botdemo: credits sorta working

This commit is contained in:
Vince Weaver 2020-11-17 15:33:00 -05:00
parent 374600e9eb
commit a96e78ac0f
4 changed files with 167 additions and 52 deletions

View File

@ -8,10 +8,12 @@
STROUT = $db3a
DONE = 0
DO_LOAD = 1
DO_LIST = 2
DO_RUN = 3
NONE = 0
DO_LOAD = 1
DO_LIST = 2
DO_RUN = 3
DO_CREDITS = 4
DONE = 5
;==========================================
; we are loaded at $6000
@ -123,10 +125,16 @@ not_do_list:
not_do_load:
cmp #DO_RUN ; if command is run
bne not_trigger
bne not_do_run
jmp do_run ; then do it
not_do_run:
; cmp #DO_CREDITS
; bne not_trigger
; jmp switch_to_credits
not_trigger:
jmp command_loop

View File

@ -1,44 +1,90 @@
switch_to_credits:
; clear bottom of page2 and set split
bit TEXTGR
ldx #39
lda #' '|$80
clear_bottom_loop:
sta $A50,X
sta $AD0,X
sta $B50,X
sta $BD0,X
dex
bpl clear_bottom_loop
; set "done"
lda #DONE
sta command
; clear time
lda #0
sta seconds
sta ticks
rts
display_credits:
; display music bars
; a bar
lda A_VOLUME
asl
asl
lsr
lsr
sta draw_a_bar_loop+1
ldx #4
lda #' '
lda #' '|$80
draw_a_bar_loop:
cpx #$4
beq skip_a_bar
bne skip_a_bar
eor #$80
sta $A50,X
skip_a_bar:
sta $A50,X
dex
bpl draw_a_bar_loop
; b bar
lda B_VOLUME
asl
asl
tax
lsr
lsr
sta draw_b_bar_loop+1
ldx #4
lda #' '|$80
draw_b_bar_loop:
lda #' '
sta $Ad0,X
cpx #$4
bne skip_b_bar
eor #$80
skip_b_bar:
sta $AD0,X
dex
bpl draw_b_bar_loop
lda C_VOLUME
asl
asl
tax
lsr
lsr
sta draw_c_bar_loop+1
ldx #4
lda #' '|$80
draw_c_bar_loop:
lda #' '
cpx #$4
bne skip_c_bar
eor #$80
skip_c_bar:
sta $B50,X
dex
bpl draw_c_bar_loop
; write credits
; write credits
actual_credits:
lda ticks
cmp #25
bne done_credits
@ -58,24 +104,65 @@ draw_c_bar_loop:
bne done_credits
next_credit:
;========================
; write the credits
write_credits:
ldx #4
outer_credit_loop:
; X is proper line
; point to start of proper output line
lda credits_address,X
sta credits_address_smc+1
lda credits_address+1,X
sta credits_address_smc+2
; load proper input location
lda which_credit
asl
tay
txa
asl
asl
asl ; *16 (already *2)
clc
adc credits_table,Y
sta write_credit_1_loop+1
lda credits_table+1,Y
adc #0
sta write_credit_1_loop+2
ldy #0
write_credit_1_loop:
lda $dede,Y
beq done_credit1_loop
sta $Ad0+20,Y
ora #$80
credits_address_smc:
sta $dede,Y
iny
jmp write_credit_1_loop
cpy #16
bne write_credit_1_loop
done_credit1_loop:
dex
dex
bpl outer_credit_loop
inc which_credit
done_credits:
rts
credits_address:
.word $ad0+12
.word $b50+12
.word $bd0+12
credits_table:
.word credits1
.word credits2
@ -85,29 +172,29 @@ credits_table:
credits1:
.byte "Code:",0
.byte " ",0
.byte "Deater",0
.byte " Code: "
.byte " "
.byte " Deater "
credits2:
.byte "Music:",0
.byte " ",0
.byte "mAZE",0
.byte " Music: "
.byte " "
.byte " mAZE "
credits3:
.byte "Algorithms:",0
.byte " ",0
.byte "Hellmood",0
.byte " Algorithms: "
.byte " Qkumba "
.byte " Hellmood "
credits4:
.byte "Apple II bot",0
.byte " ",0
.byte "Kay Savetz",0
.byte " Apple II bot "
.byte " "
.byte " Kay Savetz "
credits5:
.byte " _ ",0
.byte " _|(_ _",0
.byte "(_| _) | ",0
.byte " _ "
.byte " _|(_ _ "
.byte " (_| _) | "
which_credit:
.byte $0

View File

@ -65,7 +65,7 @@ no_tick_oflo:
lda seconds
cmp timeout
bne done_match
bne handle_credits
inc trigger
@ -74,6 +74,14 @@ no_tick_oflo:
tax
lda todo_list,x
sta command
cmp #DO_CREDITS
bne itsnot
jsr switch_to_credits
lda command
itsnot:
cmp #DONE
beq handle_credits
@ -103,7 +111,10 @@ no_tick_oflo:
rti
handle_credits:
bit TEXTGR
lda command
cmp #DONE
bne done_match
jsr display_credits
done_match:

View File

@ -12,43 +12,52 @@
todo_list:
.byte DO_LOAD,1, DO_LIST,4, DO_RUN,5 ; flame
.byte DO_LOAD,1, DO_LIST,4, DO_RUN,10 ; autumn
.byte DO_CREDITS,$FF
.byte DONE,$FF
.byte DO_LOAD,1, DO_LIST,4, DO_RUN,15 ; a2
.byte DO_LOAD,1, DO_LIST,4, DO_RUN,10 ; flyer
.byte DO_LOAD,1, DO_LIST,4, DO_RUN,15 ; nyan
.byte DO_LOAD,1, DO_LIST,4, DO_RUN,15 ; rle
; .byte DO_LOAD,1, DO_LIST,4, DO_RUN,15 ; rle
.byte DO_LOAD,1, DO_LIST,4, DO_RUN,15 ; raster
.byte DO_LOAD,1, DO_LIST,4, DO_RUN,15 ; qr
.byte DO_LOAD,1, DO_LIST,4, DO_RUN,10 ; dhgr
.byte DO_LOAD,1, DO_LIST,4, DO_RUN,10 ; circles
.byte DO_LOAD,1, DO_LIST,4, DO_RUN,10 ; autumn
.byte DONE,$FF
file_list:
.word flame,flame_end
.word autumn,autumn_end
.word a2,a2_end
.word flyer,flyer_end
.word nyan,nyan_end
.word rle,rle_end
; .word rle,rle_end
.word raster,raster_end
.word qr,qr_end
.word dhgr,dhgr_end
.word circles,circles_end
.word autumn,autumn_end
title_list:
.word flame_title
.word autumn_title
.word a2_title
.word flyer_title
.word nyan_title
.word rle_title
; .word rle_title
.word raster_title
.word qr_title
.word dhgr_title
.word circles_title
.word autumn_title
; 0123456789012345678901234567890123456789
flame_title:
@ -63,8 +72,8 @@ qr_title:
.byte " BAR CODE WILL NEVER LET YOU DOWN "
autumn_title:
.byte " HI-RES FRACTAL "
rle_title:
.byte " RLE SHAPES "
;rle_title:
; .byte " RLE SHAPES "
circles_title:
.byte " HYPNOTIC CIRCLES "
dhgr_title:
@ -97,9 +106,9 @@ autumn:
.incbin "AUTUMN.BAS"
autumn_end:
rle:
.incbin "RLE.BAS"
rle_end:
;rle:
;.incbin "RLE.BAS"
;rle_end:
raster:
.incbin "RASTER4.BAS"