botdemo: add fancy wipe

This commit is contained in:
Vince Weaver 2020-11-14 22:45:18 -05:00
parent 362a05cb74
commit 7dafba145c
7 changed files with 181 additions and 38 deletions

View File

@ -7,7 +7,7 @@ all: appleiibot.dsk convert_to convert_back convert_qkumba make_boxes
appleiibot.dsk: E2.BAS FLAME.BAS FLAME2.BAS \
CIRCLES.BAS AUTUMN.BAS QKUMBA.BAS ASTEROID.BAS PERSON.BAS SHIP.BAS \
CONCERT.BAS NYAN.BAS RASTER.BAS RASTER2.BAS RASTER3.BAS LOTS.BAS LOAD \
CONCERT.BAS NYAN.BAS RASTER.BAS DHGR.BAS RASTER3.BAS LOTS.BAS LOAD \
RASTER4.BAS RASTER5.BAS PUMPKIN.BAS PUMPKIN_SMALL.BAS LADY.BAS \
A2.BAS FOURAM.BAS FLOPPY.BAS QR.BAS A2_4EVER.BAS RLE.BAS RLE2.BAS \
RLEASM.BAS HORIZON.BAS FLYER.BAS STAR.BAS HYPER.BAS FASTAR.BAS \
@ -27,7 +27,7 @@ appleiibot.dsk: E2.BAS FLAME.BAS FLAME2.BAS \
$(DOS33) -y appleiibot.dsk SAVE A NYAN.BAS
$(DOS33) -y appleiibot.dsk SAVE A CONCERT.BAS
$(DOS33) -y appleiibot.dsk SAVE A RASTER.BAS
$(DOS33) -y appleiibot.dsk SAVE A RASTER2.BAS
$(DOS33) -y appleiibot.dsk SAVE A DHGR.BAS
$(DOS33) -y appleiibot.dsk SAVE A RASTER3.BAS
$(DOS33) -y appleiibot.dsk SAVE A RASTER4.BAS
$(DOS33) -y appleiibot.dsk SAVE A RASTER5.BAS
@ -177,8 +177,8 @@ RASTER.BAS: raster.bas
####
RASTER2.BAS: raster2.bas
$(TOKENIZE) < raster2.bas > RASTER2.BAS
DHGR.BAS: dhgr.bas
$(TOKENIZE) < dhgr.bas > DHGR.BAS
####

BIN
bot_demo/CIRCLES.BAS Normal file

Binary file not shown.

View File

@ -35,7 +35,8 @@ BOTDEMO: botdemo.o
botdemo.o: botdemo.s \
zp.inc hardware.inc nozp.inc \
load.s bg.inc \
interrupt_handler.s
interrupt_handler.s \
wipe.s
ca65 -o botdemo.o botdemo.s -l botdemo.lst
@ -60,4 +61,4 @@ bg.inc: bg.png
####
clean:
rm -f *~ *.o *.lst RLE BOTDEMO
rm -f *~ *.o *.lst RLE BOTDEMO LOADER BOTDEMO.LZ4

View File

@ -6,6 +6,8 @@
.include "zp.inc"
.include "hardware.inc"
STROUT = $db3a
DONE = 0
DO_LOAD = 1
DO_LIST = 2
@ -52,43 +54,54 @@ mockingboard_not_found:
; init screen
jsr TEXT
jsr HOME
bit SET_GR
bit TEXTGR
bit KEYRESET
; GR part
; bit PAGE1
; bit LORES ; 4
; bit SET_GR ; 4
; bit FULLGR ; 4
;===================
; init vars
; lda #0
; sta DRAW_PAGE
; lda #4
; sta DISP_PAGE
;=============================
; Load desire 1st
; Load bg
; lda #<desire_rle
; sta GBASL
; lda #>desire_rle
; sta GBASH
; lda #$c
; jsr load_rle_gr
lda #<bg_rle
sta GBASL
lda #>bg_rle
sta GBASH
lda #$c
jsr load_rle_gr
jsr do_wipe
; jsr gr_copy_to_current ; copy to page1
; jsr page_flip
;=============================
; mockingboard where available
; jsr wait_until_keypress
lda #5
sta CH
lda #21
sta CV
jsr VTAB
lda #<mock_string
ldy #>mock_string
jsr STROUT
lda #12
sta CH
lda #22
sta CV
jsr VTAB
lda #<mock2_string
ldy #>mock2_string
jsr STROUT
; jsr do_list
; jsr do_list
done:
@ -123,30 +136,59 @@ not_trigger:
jmp done
mock_string:
.byte ") ) ) MOCKINGBOARD SOUND ( ( (",0
mock2_string:
.byte "WHERE AVAILABLE",0
todo_list:
.byte DO_LOAD,1
.byte DO_LIST,5
.byte DO_RUN,15 ; a2
.byte DO_LOAD,1
.byte DO_LIST,4
.byte DO_RUN,10 ; flyer
.byte DO_LOAD,1
.byte DO_LIST,4
.byte DO_RUN,20 ; nyan
.byte DO_LOAD,1
.byte DO_LIST,5
.byte DO_RUN,15 ; qr
.byte DO_LOAD,1
.byte DO_LIST,5
.byte DO_RUN,15
.byte DO_LOAD,1
.byte DO_LIST,5
.byte DO_RUN,15
.byte DO_LOAD,1
.byte DO_LIST,5
.byte DO_RUN,15
.byte DO_LOAD,1
.byte DO_LIST,5
.byte DO_RUN,15
.byte DONE,$FF
command: .byte $00
which: .byte $00
timeout: .byte $01
timeout: .byte 10
trigger: .byte $00
original_stack: .byte $00
; .include "gr_unrle.s"
; .include "gr_unrle_large.s"
; .include "gr_offsets.s"
.include "gr_unrle.s"
.include "gr_offsets.s"
; .include "gr_copy.s"
; .include "gr_copy_large.s"
; .include "gr_pageflip.s"
.include "bg.inc"
.include "pt3_lib_core.s"
.include "pt3_lib_init.s"
@ -155,6 +197,7 @@ original_stack: .byte $00
; if you're self patching, detect has to be after interrupt_handler.s
.include "pt3_lib_mockingboard_detect.s"
.include "wipe.s"
.include "load.s"
.include "nozp.inc"

View File

@ -1,2 +1,7 @@
5 HOME
10 PRINT " LOADING APPLEBOT DEMO V0.1"
15 PRINT
20 HTAB 15:PRINT " _ "
30 HTAB 15:PRINT " _: :_ _"
40 HTAB 15:PRINT ":_: _: : "
50 PRINT CHR$(4)"BRUN LOADER"

View File

@ -8,17 +8,27 @@ CHRGET = $00B1
SCRTCH = $D64B
RESTART = $D43C
FIX_LINKS = $D4F2
INLIN2 = $D52E
PARSE_INPUT_LINE = $d559
TRACE_ = $D805
load_file:
;=================
;=================
; run list command
;=================
;=================
do_list:
; try to get things back to normal
bit SET_TEXT
bit LORES
bit PAGE0
bit TEXTGR
jsr TEXT
jsr HOME
lda #<list_string
@ -47,9 +57,13 @@ do_list:
;
; rts
;=================
;=============================
;=============================
; run run command
; a do-run-run, a do-run-run
;=============================
;=============================
do_run:
jsr HOME
@ -223,7 +237,8 @@ no_load2_oflo:
stx PRGEND
stx VARTAB
rts
jmp FIX_LINKS ; FIX_LINKS
file_size: .word $dede
@ -231,9 +246,15 @@ file_size: .word $dede
which_file: .byte $0
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 qr,qr_end
.word flame,flame_end ; flame destroys zero page
title_list:
.word flyer_title
@ -260,4 +281,22 @@ qr:
.incbin "QR.BAS"
qr_end:
flame:
.incbin "FLAME2.BAS"
flame_end:
a2:
.incbin "A2.BAS"
a2_end:
autumn:
.incbin "AUTUMN.BAS"
autumn_end:
rle:
.incbin "RLE.BAS"
rle_end:
raster:
.incbin "RASTER4.BAS"
raster_end:

55
bot_demo/wipe.s Normal file
View File

@ -0,0 +1,55 @@
; for x=0 to 39
; then 79 down to 40
; then 80 to 119
do_wipe:
ldx #0
top_line_loop:
lda $c00,X
sta $400,X
lda $c80,X
sta $480,X
lda $d00,X
sta $500,X
lda $d80,X
sta $580,X
lda $e00,X
sta $600,X
lda $e80,X
sta $680,X
lda $f00,X
sta $700,X
lda $f80,X
sta $780,X
lda #80
jsr WAIT
cpx #40
bcc count_up ; blt
cpx #80
bcc count_down ; blt
count_up:
inx
cpx #120
beq done_wipe
cpx #40
bne continue_wipe
; switch direction
ldx #80
count_down:
dex
cpx #39
bne continue_wipe
ldx #80
continue_wipe:
jmp top_line_loop
done_wipe:
rts