



DEMO_TITLE			PSHS	A,B,X,Y,U,CC

					LEAX	SUBCPU_INITCONSOLE_COMMAND,PCR
					LDB		#SUBCPU_INITCONSOLE_COMMAND_END-SUBCPU_INITCONSOLE_COMMAND+1
					LBSR	SUBCPU_EXEC_COMMAND

					LEAX	SUBCPU_PRINT_TITLE_0,PCR
					LDB		#SUBCPU_PRINT_TITLE_0_END-SUBCPU_PRINT_TITLE_0+1
					LBSR	SUBCPU_EXEC_COMMAND

					LEAX	SUBCPU_PRINT_TITLE_1,PCR
					LDB		#SUBCPU_PRINT_TITLE_1_END-SUBCPU_PRINT_TITLE_1+1
					LBSR	SUBCPU_EXEC_COMMAND

					LEAX	SUBCPU_PRINT_TITLE_2,PCR
					LDB		#SUBCPU_PRINT_TITLE_2_END-SUBCPU_PRINT_TITLE_2+1
					LBSR	SUBCPU_EXEC_COMMAND

					LEAX	SUBCPU_PRINT_TITLE_3,PCR
					LDB		#SUBCPU_PRINT_TITLE_3_END-SUBCPU_PRINT_TITLE_3+1
					LBSR	SUBCPU_EXEC_COMMAND


DEMO_TITLE_WAIT		LDA		$FD04
					BITA	#2
					BEQ		DEMO_TITLE_EXIT

					LBSR	PSGPLAY_GET_COUNTER
					CMPD	#BGM_FIRST_CATCH_END
					BLE		DEMO_TITLE_WAIT

DEMO_TITLE_EXIT		PULS	A,B,X,Y,U,CC,PC


SUBCPU_INITCONSOLE_COMMAND
					FCB		0,0		; Dont care
					FCB		1
					FCB		0		; BG Color
					FCB		40		; Width
					FCB		25		; Height
					FCB		0
					FCB		0
					FCB		0
					FCB		1		; Erase
					FCB		0
SUBCPU_INITCONSOLE_COMMAND_END

SUBCPU_PRINT_TITLE_0
					FCB		0,0
					FCB		7		  ; PUTC
					FCB		9,8	  ; X1,Y1
					FCB		9+22-1,8 ; X2,y2
					FCB		7			; COLOR
					FCB		22		  ; 22 letters
					FCB		"[SONATA FOR TWO 6809s]"
SUBCPU_PRINT_TITLE_0_END

SUBCPU_PRINT_TITLE_1
					FCB		0,0
					FCB		7		  ; PUTC
					FCB		6,10	  ; X1,Y1
					FCB		6+29-1,10 ; X2,y2
					FCB		7			; COLOR
					FCB		29		  ; 29 letters
					FCB		"SUBMITTED TO DEMOSPLASH 2018"
SUBCPU_PRINT_TITLE_1_END

SUBCPU_PRINT_TITLE_2
					FCB		0,0
					FCB		7		  ; PUTC
					FCB		14,12	  ; X1,Y1
					FCB		14+11,12 ; X2,y2
					FCB		7			; COLOR
					FCB		12		  ; 22 letters
					FCB		"By CaptainYS"
SUBCPU_PRINT_TITLE_2_END

SUBCPU_PRINT_TITLE_3
					FCB		0,0
					FCB		7		  ; PUTC
					FCB		9,14	  ; X1,Y1
					FCB		9+22,14 ; X2,y2
					FCB		7			; COLOR
					FCB		23		  ; 22 letters
					FCB		"HTTP://WWW.YSFLIGHT.COM"
SUBCPU_PRINT_TITLE_3_END

SUBCPU_PRINT_END
					FCB		0,0
					FCB		7		  ; PUTC
					FCB		18,16	  ; X1,Y1
					FCB		18+2,16 ; X2,y2
					FCB		7			; COLOR
					FCB		3		  ; 22 letters
					FCB		"END"
SUBCPU_PRINT_END_END



END_TITLE			PSHS	A,B,X,Y,U,CC

					LEAX	SUBCPU_INITCONSOLE_COMMAND,PCR
					LDB		#SUBCPU_INITCONSOLE_COMMAND_END-SUBCPU_INITCONSOLE_COMMAND+1
					LBSR	SUBCPU_EXEC_COMMAND

					LEAX	SUBCPU_PRINT_TITLE_0,PCR
					LDB		#SUBCPU_PRINT_TITLE_0_END-SUBCPU_PRINT_TITLE_0+1
					LBSR	SUBCPU_EXEC_COMMAND

					LEAX	SUBCPU_PRINT_TITLE_1,PCR
					LDB		#SUBCPU_PRINT_TITLE_1_END-SUBCPU_PRINT_TITLE_1+1
					LBSR	SUBCPU_EXEC_COMMAND

					LEAX	SUBCPU_PRINT_TITLE_2,PCR
					LDB		#SUBCPU_PRINT_TITLE_2_END-SUBCPU_PRINT_TITLE_2+1
					LBSR	SUBCPU_EXEC_COMMAND

					LEAX	SUBCPU_PRINT_TITLE_3,PCR
					LDB		#SUBCPU_PRINT_TITLE_3_END-SUBCPU_PRINT_TITLE_3+1
					LBSR	SUBCPU_EXEC_COMMAND

					LEAX	SUBCPU_PRINT_END,PCR
					LDB		#SUBCPU_PRINT_END_END-SUBCPU_PRINT_END+1
					LBSR	SUBCPU_EXEC_COMMAND

END_TITLE_WAIT		LDA		$FD04
					BITA	#2
					BNE		END_TITLE_WAIT

END_TITLE_EXIT		PULS	A,B,X,Y,U,CC,PC


