Think Fast III (Revision 1) Written by mjhayes@cs.buffalo.edu September 1, 1998 This program does not use graphics, so you can use any cartridge. At the beginning of each level, a row of boxes will appear. Above that row another box will appear. Wait until the box is the same color as the box below it, then press and hold any side button until another box appears. If you hold a side button when the box is not the same color as the box below it, then the game ends. When a new box appears, continue the procedure with the new box. Finish an entire row of boxes and you will advance to the next level. Finish all ten levels and you will win and find a surprise. I see the surprise, the Sound Room, could use a little explanation. You can create a tune using up to 240 notes and 14 unique pitches. First you are asked to define the 14 unique pitches. 36 is middle C, add one for every half-step above, or subtract one for every half-step below for each note. After pre-defining the 14 unique pitches, give a time delay. 0 is advised because the main loop is not optimized. Now there is a user-hostile blank screen where the tune is generated. Use the disc to fill the current block with a certain color, any top action button to back up a block, and any bottom action button to fast-forward a block. Hold the bottom action button when finished until the tune begins. The program will scan the blocks from beginning to end and play notes as follows: a block whose color is 0..13 will produce a note whose pitch is one of the 14 pre-defined unique pitches. If the block is color 14 (light green) then the previous note is held for another "beat" and if the block is color 15 (purple) then the tune will auto-rewind to the beginning. Hold a top action button to generate another tune. 10 SET A$="GAME OVER..." 20 SET B$="YOU WON, SO YOU GET" 30 SET C$="ACCESS TO THE SOUND" ; Pre-define text to save memory. 40 FM(4)=2 ; The text will be displayed in red. 50 E=14 60 V=15 ; The values of E and V are for the noise. RUN 10 CALL HUSH 20 CLR 30 B=0 ; Reset the level counter. 40 FOR F=1 TO 19 ; Fill in the top row of boxes{ 50 BK(F)=RN(0)/6 ; Randomly make a box a certain color. 60 IF(BK(F)=5)GOTO 50 ; Make sure it isn't green. 70 NEXT F ; } 80 L=(9-B)*7281 ; Randomly determine cycle of noise channels. 90 FOR C=0 TO 5 100 P=RN(0)*41 ; Randomly determine pitches of noise channels. 110 CALL ENVT ; Play the hateful droning sound. 120 NEXT C 130 FOR F=21 TO 39 ; Main game loop{ 140 BK(F)=RN(0)/6 ; Randomly make a box in the second row a certain color. 150 FOR G=B TO 9 160 NEXT G ; Time delay, smaller on higher levels. 170 CALL HAND ; Poll the left hand controller. 180 IF(A=0)GOTO 140 ; Wait for an action button to be pressed. 190 G=F-20 200 IF(BK(F)=BK(G))GOTO 220 ; Does the current box and the box above it match in color? 210 GOTO 280 ; Nope. 220 NEXT F ; } 230 IF(B=9)GOTO 330 ; Was that the last level? 240 CLR 250 CALL HUSH 260 B=B+1 ; Increment the level counter. 270 GOTO 40 ; Next level 280 CLR 290 PUT A$ 300 FOR B=-99 TO -2 310 NEXT B ; Time delay and reset level counter. 320 GOTO 250 ; New game 330 CLR ; Endgame{ 340 CALL HUSH 350 PUT B$ ; It wouldn't be me to not include an Easter egg in a game that would otherwise leave a lot of ECS RAM to spare. It surprises me that I didn't even try to hide this one. 360 PUT C$ 370 PRIN "ROOM." 380 PRIN "INPUT PITCHES FOR 14NOTES." 390 INPU A,B,C,E,F,G,H 400 INPU I,J,K,L,P,Q,R 410 XP(0)=A 420 XP(1)=B 430 XP(2)=C 440 XP(3)=E 450 XP(4)=F 460 XP(5)=G 470 XP(6)=H 480 YP(0)=I 490 YP(1)=J 500 YP(2)=K 510 YP(3)=L 520 YP(4)=P 530 YP(5)=Q 540 YP(6)=R ; Get pitches for 14 notes. 550 CLR 560 PRIN "INPUT TIME DELAY FORTEMPO." 570 INPU E 580 CLR 590 FOR B=0 TO 239 600 CALL HAND ; Poll the left hand controller. 610 IF(A>1)GOTO 670 ; Was a bottom action button pressed? 620 IF(A=1)GOTO 660 ; Was a top action button pressed? 630 IF(H>-17)GOTO 600 ; Was the disc pressed and released? 640 BK(B)=-101-H ; Draw a box whose color is determined by the direction pressed on the disc. 650 B=B+1 ; Leave the value of B unchanged. 660 B=B-2 ; A top action button was pressed; back up. 670 NEXT B ; A bottom action button was pressed; advance. 680 C=2 690 FOR B=0 TO 239 700 F=BK(B) 710 G=F-7 720 IF(F<7)N=XP(F) 730 IF(F>6)N=YP(G) ; Play the note in the user-defined pitch. 740 IF(G=8)GOTO 680 ; A purple box signals the end of the tune. 750 IF(G=7)GOTO 820 ; A light green box holds the previous note. 760 CALL NOTE 770 CALL TONE ; Generate the tone. 780 FOR I=0 TO E 790 NEXT I ; User-defined time delay, the fastest of which is slow as it is. 800 CALL HAND 810 IF(A=1)GOTO 840 ; Abort if a top action button was pressed. 820 NEXT B 830 GOTO 680 840 CLR 850 CALL HUSH 860 GOTO 380 ; Start a new tune.