botdemo: some improvements

reset out of dhgr mode for one
titles for another
This commit is contained in:
Vince Weaver 2020-11-17 01:12:08 -05:00
parent 9d57327e91
commit 786407575b
6 changed files with 118 additions and 23 deletions

View File

@ -10,7 +10,7 @@ all: bot_demo.dsk
bot_demo.dsk: HELLO LOADER
cp empty.dsk bot_demo.dsk
$(DOS33) -y bot_demo.dsk BSAVE -a 0x1000 LOADER
$(DOS33) -y bot_demo.dsk BSAVE -a 0x6000 BOTDEMO MYSTERY
# $(DOS33) -y bot_demo.dsk BSAVE -a 0x6000 BOTDEMO MYSTERY
$(DOS33) -y bot_demo.dsk SAVE A HELLO

View File

@ -4,3 +4,8 @@
+ code to reset to 40-col text mode after interrupted
also reset ROT=0?
+ credits
bars with music
scroll in both sides
lowercase
.oOo.

View File

@ -87,32 +87,45 @@ mockingboard_not_found:
jsr mock_anim
;==============================
;==============================
;==============================
; command loop
;==============================
;==============================
;==============================
command_loop:
; check if irq handler has set trigger because we hit limit
lda trigger
beq not_trigger
lda #0
lda #0 ; reset trigger
sta trigger
lda command
cmp #DONE
lda command ; load current command (also set in irq)
cmp #DONE ; if done, just loop forever
beq command_loop
cmp #DO_LIST
cmp #DO_LIST ; if command is list
bne not_do_list
jmp do_list
jmp do_list ; then do it
not_do_list:
cmp #DO_LOAD
cmp #DO_LOAD ; if command is load
bne not_do_load
jsr do_load
jsr do_load ; then do it
jmp not_trigger
not_do_load:
cmp #DO_RUN
cmp #DO_RUN ; if command is run
bne not_trigger
jmp do_run
jmp do_run ; then do it
not_trigger:

View File

@ -23,11 +23,16 @@ load_file:
do_list:
; try to get things back to normal
bit SET_TEXT
bit LORES
bit PAGE0
bit TEXTGR
lda #0
sta $C00C ; disable 80 column display
sta $C000 ; disable 80 column memory mapping
sta $C05F ; clear annunicator 3 (double hires)
jsr SETNORM
jsr TEXT
jsr HOME
@ -37,6 +42,8 @@ do_list:
sta cti_smc+2
jsr copy_to_input
jsr display_title
jmp run_command
; want to list from 0 to ffff
@ -58,6 +65,52 @@ do_list:
; rts
;=================
;=================
; display title
;=================
;=================
display_title:
lda #' '
ldx #39
top_loop:
sta $6d0,X
dex
bpl top_loop
lda which_file
sec
sbc #1 ; blurgh hack
asl
tay
lda title_list,Y
sta middle_smc+1
lda title_list+1,Y
sta middle_smc+2
ldx #0
middle_loop:
middle_smc:
lda $dede,X
eor #$80
sta $750,X
inx
cpx #40
bne middle_loop
lda #' '
ldx #39
bottom_loop:
sta $7d0,X
dex
bpl bottom_loop
rts
;=============================
;=============================
; run run command

View File

@ -11,16 +11,17 @@
todo_list:
.byte DO_LOAD,1, DO_LIST,4, DO_RUN,10 ; flame
.byte DO_LOAD,1, DO_LIST,4, DO_RUN,10 ; a2
.byte DO_LOAD,1, DO_LIST,4, DO_RUN,5 ; flame
.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,10 ; nyan
.byte DO_LOAD,1, DO_LIST,4, DO_RUN,10 ; autumn
.byte DO_LOAD,1, DO_LIST,4, DO_RUN,10 ; rle
.byte DO_LOAD,1, DO_LIST,4, DO_RUN,10 ; raster
.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 ; qr
.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
@ -29,24 +30,47 @@ file_list:
.word a2,a2_end
.word flyer,flyer_end
.word nyan,nyan_end
.word autumn,autumn_end
.word rle,rle_end
.word raster,raster_end
.word dhgr,dhgr_end
.word qr,qr_end
.word dhgr,dhgr_end
.word circles,circles_end
.word autumn,autumn_end
title_list:
.word flame_title
.word a2_title
.word flyer_title
.word nyan_title
.word rle_title
.word raster_title
.word qr_title
.word dhgr_title
.word circles_title
.word autumn_title
; 0123456789012345678901234567890123456789
flame_title:
.byte " PSX DOOM FIRE "
a2_title:
.byte " LO-RES SELF PORTRAIT "
flyer_title:
.byte 8,10,"HI-RES SHAPETABLE FLYER",0
.byte " HI-RES SHAPETABLE FLYER "
nyan_title:
.byte 8,10,"HI-RES ANIMATED NYAN CAT",0
.byte " HI-RES ANIMATED NYAN CAT "
qr_title:
.byte 0,10,"MYSTERY BAR CODE WILL NEVER LET YOU DOWN",0
.byte " BAR CODE WILL NEVER LET YOU DOWN "
autumn_title:
.byte " HI-RES FRACTAL "
rle_title:
.byte " RLE SHAPES "
circles_title:
.byte " HYPNOTIC CIRCLES "
dhgr_title:
.byte " DHGR PATTERN "
raster_title:
.byte " DHGR COLOR BARS "
flyer:

View File

@ -1,6 +1,6 @@
MEMORY {
ZP: start = $00, size = $1A, type = rw;
RAM: start = $6000, size = $3000, file = %O;
RAM: start = $6000, size = $4000, file = %O;
}
SEGMENTS {