
*      
* Simple little title screen generator.
*
* Scrolls text up from the bottom of the screen.
*
* SLJ 9/4/97
*

         ORG $6800        ;26624

SCREEN   = $4000
ZP1      = $FA
ZP2      = $FC
COUNT    = $FF

DELAY    = 3

GETIN    = $FFE4

BEGIN    
         LDA $DD00
         AND #$FC
         ORA #2           ;Bank 1, $4000-$7FFF
         STA $DD00

         LDA #$08         ;Characters at $6000
         STA $D018        ;Screen at $4000

         LDA #$06
         STA $D020
         STA $D021

         LDY #00
:LOOP    LDA #13          ;Lt. Green
         STA $D800,Y
         STA $D900,Y
         STA $DA00,Y
         STA $DB00,Y
         LDA #32
         STA SCREEN,Y
         STA SCREEN+256,Y
         STA SCREEN+512,Y
         STA SCREEN+768,Y
         INY
         BNE :LOOP

         LDA #<TEXT
         STA ZP1
         LDA #>TEXT
         STA ZP1+1
         LDA #00
         STA ZP2

         LDA #33          ;a little extra for the quote
         STA COUNT
         LDA $D011
         PHA
         LDA #%00010111
         STA $D011

         SEI

MAIN     
         LDX #DELAY
MAINJMP  
:WAIT    LDA $D012
         CMP #250
         BNE :WAIT

         DEX
         BEQ :CONT
:L2      LDA $D011
         BPL :L2
         BMI :WAIT

:CONT    LDX $D011
         TXA
         AND #$07
         BEQ :UPDATE

         DEX
         STX $D011
         JMP MAIN

         TXT 'slj 9/97'

:UPDATE  
         DEC COUNT
         BNE :PUSH

:ALLDONE CLI
         JSR GETIN
         BEQ :ALLDONE
         PLA
         STA $D011
         JMP $4400        ;Start dat code goin!

         TXT 'Crackers, link your intro!  Do it!!!'

:PUSH    
         LDA #%00010111
         STA $D011


MOVE     MAC
         LDY #39
L1       LDA ]1+40,Y
         STA ]1,Y
         DEY
         BPL L1
         <<<

         >>> MOVE,SCREEN
         >>> MOVE,SCREEN+40
         >>> MOVE,SCREEN+80
         >>> MOVE,SCREEN+120
         >>> MOVE,SCREEN+160
         >>> MOVE,SCREEN+200
         >>> MOVE,SCREEN+240
         >>> MOVE,SCREEN+280
         >>> MOVE,SCREEN+320
         >>> MOVE,SCREEN+360
         >>> MOVE,SCREEN+400
         >>> MOVE,SCREEN+440
         >>> MOVE,SCREEN+480
         >>> MOVE,SCREEN+520
         >>> MOVE,SCREEN+560
         >>> MOVE,SCREEN+600
         >>> MOVE,SCREEN+640
         >>> MOVE,SCREEN+680
         >>> MOVE,SCREEN+720
         >>> MOVE,SCREEN+760
         >>> MOVE,SCREEN+800
         >>> MOVE,SCREEN+840
         >>> MOVE,SCREEN+880
         >>> MOVE,SCREEN+920

NEXT     
         LDY #00
:L1      LDA (ZP1),Y
         BMI :BLANK
         CMP #'_'
         BEQ :DONE
         TAX
         LDA TRANSTAB-32,X ;Convert to screen char
         STA SCREEN+960,Y
         INY
         BNE :L1
:DONE    TYA
         SEC
         ADC ZP1
         STA ZP1
         BCC :BLANK
         INC ZP1+1
:BLANK   LDA #32
:L2      STA SCREEN+960,Y
         INY
         CPY #40
         BCC :L2
         LDX #DELAY
         DEX              ;Lost a frame
         JMP MAINJMP

         TXT 'that boy aint right'

TRANSTAB DFB 32,33,34,35,36,37,38,39,40,41,42,43,44
         DFB 45,46,47,48,49,50,51,52,53,54,55,56,57
         DFB 58,59,60,61,62,63
         DFB 0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16
         DFB 17,18,19,20,21,22,23,24,25,26,27,28,29
         DFB 30,31
         DFB 64,65,66,67,68,69,70,71,72,73,74,75,76
         DFB 77,78,79,80,81,82,83,84,85,86,87,88,89
         DFB 90,91,92,93,94,95

         DO 0
         TXT '0123456789012345678901234567890123456789'
         FIN
TEXT     DFB 34           ;quote
         TXT 'He is intelligent, but inexperienced._'
         TXT 'His pattern suggests... two dimensional_'
         TXT 'thinking.'
         DFB 34
         TXT '_'
         TXT '_'
         TXT '_'
         TXT '_'
         TXT '_'
         TXT '_'
         TXT '               ----------_'
         TXT '              -Cool World-_'
         TXT '               ----------_'
         TXT '       (Polygonamy II: Monogonamy)_'
         TXT '_'
         TXT '_'
         TXT 'Original cod and tuna by_'
         TXT '              Stephen L. Judd_'
         TXT '                     sjudd@nwu.edu_'
         TXT 'http://stratus.esam.nwu.edu/judd/fridge_'
         TXT '_'
         TXT 'Seek ye C=Hacking for more details_'
         TXT '_'
         TXT 'Navigation:_'
         TXT '         / @  pitch_'
         TXT '         :  ;  yaw_'
         TXT '         q w  roll_'
         TXT '         a z  velocitate_'
         TXT '_'
         TXT 'Velocity:_'
         TXT '   0 1 2 3 4  stop/crawl/walk/run/fly_'
         TXT '_'
         TXT '   -Press a key to depart reality-_'
         DFB #$FF
         TXT 'zome zecret text!!!  . o O '

         TXT 'when any mortal, even the most odd/'
         TXT ' can justify the ways of man to God/'
         TXT ' ill think it strange that normal mortals'
         TXT ' can/ not justify the ways of God to man.'
         TXT ' -- e.e. cummings'
