diff --git a/bot_demo/Makefile b/bot_demo/Makefile index bf0e2bc4..92ada0db 100644 --- a/bot_demo/Makefile +++ b/bot_demo/Makefile @@ -36,7 +36,7 @@ botdemo.o: botdemo.s \ zp.inc hardware.inc nozp.inc timeline.inc \ commands.s bg.inc \ interrupt_handler.s \ - wipe.s + wipe.s mock_anim.s ca65 -o botdemo.o botdemo.s -l botdemo.lst diff --git a/bot_demo/botdemo.s b/bot_demo/botdemo.s index ceb637b1..105ffbe1 100644 --- a/bot_demo/botdemo.s +++ b/bot_demo/botdemo.s @@ -13,20 +13,19 @@ DO_LOAD = 1 DO_LIST = 2 DO_RUN = 3 + ;========================================== + ; we are loaded at $6000 + ; + ; since we are now decompressed here after load + ; we don't have to worry about running into DOS3.3 at $9600 + ; + ; we shouldn't need to set HIMEM as we don't use many vars + ; and variable memory starts right after the program bot_demo: - ;=================== - ; init some stuff - - ; we have from $6000 to $9600 (DOS 3.3) - ; which is $3600 = 12 + 1.5 = 13.5k - - ; we don't need to set HIMEM as we don't use many vars - ; and variable memory starts right after the program it seems - ;=================== - ; PT3 Setup + ; PT3 player Setup lda #0 sta DONE_PLAYING @@ -52,17 +51,22 @@ mockingboard_not_found: ;=================== ; init screen + ;=================== + jsr TEXT - jsr HOME - bit SET_GR - bit TEXTGR + jsr SETGR +; jsr HOME +; bit SET_GR +; bit TEXTGR bit KEYRESET ;=================== ; init vars + ;=================== ;============================= - ; Load bg + ; Load title screen + ;============================= lda #mock_string - - jsr STROUT - - lda #12 - sta CH - lda #22 - sta CV - jsr VTAB - - lda #mock2_string - - jsr STROUT - - - - - -done: +command_loop: lda trigger beq not_trigger @@ -113,7 +96,7 @@ done: lda command cmp #DONE - beq done + beq command_loop cmp #DO_LIST bne not_do_list @@ -133,14 +116,7 @@ not_do_load: not_trigger: - jmp done - - -mock_string: - .byte ") ) ) MOCKINGBOARD SOUND ( ( (",0 -mock2_string: - .byte "WHERE AVAILABLE",0 - + jmp command_loop command: .byte $00 which: .byte $00 @@ -163,6 +139,7 @@ original_stack: .byte $00 .include "timeline.inc" .include "wipe.s" +.include "mock_anim.s" .include "nozp.inc" diff --git a/bot_demo/hardware.inc b/bot_demo/hardware.inc index 8d203e23..2eb9901e 100644 --- a/bot_demo/hardware.inc +++ b/bot_demo/hardware.inc @@ -33,6 +33,7 @@ HLINE = $F819 ;; HLINE Y,$2C at A VLINE = $F828 ;; VLINE A,$2D at Y CLRSCR = $F832 ;; Clear low-res screen CLRTOP = $F836 ;; clear only top of low-res screen +SETGR = $FB40 ;; GR SETCOL = $F864 ;; COLOR=A TEXT = $FB36 TABV = $FB5B ;; VTAB to A diff --git a/bot_demo/hello.bas b/bot_demo/hello.bas index f8d8785f..efcd0dda 100644 --- a/bot_demo/hello.bas +++ b/bot_demo/hello.bas @@ -3,9 +3,10 @@ 20 PRINT 30 PRINT " A COLLECTION OF BASIC DEMOS" 40 PRINT " THAT EACH FIT IN A 280 CHARACTER TWEET" -42 PRINT " FIRST TESTED ON THE @APPLEIIBOT" -45 PRINT -50 HTAB 15:PRINT " _ " -60 HTAB 15:PRINT " _: :_ _" -70 HTAB 15:PRINT ":_: _: : " -80 PRINT CHR$(4)"BRUN LOADER" +42 PRINT +45 PRINT " FIRST TESTED ON THE @APPLEIIBOT" +50 PRINT +60 HTAB 15:PRINT " _ " +70 HTAB 15:PRINT " _: :_ _" +80 HTAB 15:PRINT ":_: _: : " +90 PRINT CHR$(4)"BRUN LOADER" diff --git a/bot_demo/interrupt_handler.s b/bot_demo/interrupt_handler.s index 0f4a5568..52b97116 100644 --- a/bot_demo/interrupt_handler.s +++ b/bot_demo/interrupt_handler.s @@ -92,9 +92,9 @@ no_tick_oflo: ldx original_stack txs - lda #>done + lda #>command_loop pha - lda #mock_string + + jsr STROUT + + lda #9 + sta paren_limit_smc+1 + jsr paren_move + + lda #7 + sta paren_limit_smc+1 + jsr paren_move + + lda #5 + sta paren_limit_smc+1 + jsr paren_move + + ; flip the parens + + lda #9 + sta paren_flip1_smc+1 + lda #30 + sta paren_flip2_smc+1 + jsr paren_flip + + lda #7 + sta paren_flip1_smc+1 + lda #32 + sta paren_flip2_smc+1 + jsr paren_flip + + lda #5 + sta paren_flip1_smc+1 + lda #34 + sta paren_flip2_smc+1 + jsr paren_flip + + + + ; where available + + lda #12 + sta CH + lda #22 + sta CV + jsr VTAB + + lda #mock2_string + + jsr STROUT + + + rts + + + ; animate the parenthesis +paren_move: + ldx #0 + ldy #39 +parenthesis_loop: + + lda #' '|$80 + sta $6d0,X + sta $6d0,Y + + inx + dey + + lda #'('|$80 + sta $6d0,X + lda #')'|$80 + sta $6d0,Y + + lda #128 + jsr WAIT + +paren_limit_smc: + cpx #9 + bne parenthesis_loop + + rts + + + ; flip the parenthesis +paren_flip: + +paren_flip1_smc: + ldx #9 + lda #')'|$80 + sta $6d0,X + +paren_flip2_smc: + ldy #30 + lda #'('|$80 + sta $6d0,Y + + lda #200 + jsr WAIT + + rts + + + +mock_string: + .byte "MOCKINGBOARD SOUND",0 +; .byte ") ) ) MOCKINGBOARD SOUND ( ( (",0 +mock2_string: + .byte "WHERE AVAILABLE",0