þþ… X;X; ************X; ** TITLES **(X; ************2X;<!X; This is the game selectionsF!X; processing and title screenP!X; code. It is run on startupZX; and between games.dX;nX; SETUP THE TITLE DISPLAYxX; -----------------------‚X;Œ ‡RESTARTQ>;;Set titles flag–P‡TTLFLAG;; (for VBI) Q>€;;Turn VBI offªP…NMIEN;; & DLI on´$†ACTIVE;;Set all active¾#‡STPLXYL%ƒBOX9;; players to homeÈ †SETBOX;; positionsÒ0;; and show whoÜI‡STPLXYL;; they areæ ‡CLRBORD;;Clear playfieldð$>†MTITLE;;Put up titleú ‡MESSAGE$>‡MAUTHOR;; and author name ‡MESSAGE ‡SHWTEAM;;Hilite active team"X;,X; SETUP TITLE DISK FLIPS6X;@Q>;;No disks flippingJ P‡LASTDSKT$>;;want 14 of each^)‡QTSDLOPQ†TWLOCL9;;Get disk addresshP‡POINTER;; for white diskrQ†TWLOCH9|P‡POINTER†Q>;; make it white ‡ENQUEUE;;Activate itš!Q†TBLOCL9;;Get disk address¤P‡POINTER;; for black disk®Q†TBLOCH9¸P‡POINTERÂQ> ;; make it blackÌ ‡ENQUEUE;;Activate itÖ0à H‡QTSDLOPêX;ôQ>À;;Enable VBIþP…NMIEN;; for titlesX;X; PROCESS USER SELECTIONSX; -----------------------&X;0X; DO KEYBOARD INPUT:X;D%‡CHKKEYS%…KEYIN;;Read the keyboardNQ>ÿ;;Clear it for nextX P…KEYINb Q@‡KEYCODE7;;Get ATASCII codelR>1;;If it is betweenvD†CKSPAC;; 1 and 9€R>;;; (inclusive)ŠE†CKSPAC;; then set the”M>;; default 'puteržP†CMPLVL;; skill level¨$‡LASTCMP;;If there is a²G†GTCNSL;; last 'puter¼P‡CMPLEVL9;; set its levelÆ%ƒBOX9;; and show theÐ ‡SETBOXL;; change on screenÚ !†GTCNSLä†CKSPACR> ;;If the key is aîH†GTCNSL;; space thenø ‡SHWTEAM;; toggle theQ„TEAM;; active team N>;; number P„TEAM  ‡SHWTEAM;; and show it*X;4X; DO CONSOLE KEY INPUT>X;H#†GTCNSLQ†CONSOL;;Get console keyRV?;;If START is\E†CHKSEL;; pressed, startf!…START;; the gamep†CHKSELV?;;Else, if SELECTzD†DOSLCT;; alter # humans„V?;;Else, if OPTIONŽE‡CHKKEYS;; alter # 'puters˜!†DOOPTN;;Else, loop to keys¢X;¬X; CONSOLE KEY PROCESSING¶X; ----------------------ÀX;ÊX; SELECT: NUMBER OF HUMANSÔX;Þ†DOSLCTQ>;;Clear lastèP‡LASTCMP;; 'puter playeròQ>;;If there are 4üR…PLYRS;; humans then tryD‡RMVPLYR;; to take 'em out%R†ACTIVE;;If max active ????????&D‡RMVPLYR;; take 'em out ????????$$%„TEAM;;If teamsiz=max ????????.*R‡TEAMSIZ8;; take 'em out ????????8D‡RMVPLYR; ; ????????BX;L$†ACTIVE;;ADD A HUMANV‡APFTEAMQ„TEAM;;Move players`R†TEAMNO9;; down untiljF‡APFFPLR;; last membertA;; of current~?;; team is foundˆ3’ ‡MOVEDATœ0¦ I‡APFTEAM°"‡APFFPLRQ†PORTNO9;;Move playersºI‡APFDOAD;; down untilÄA;; last humanÎ?;; of currentØ3;; team is foundâ ‡MOVEDATì0ö G‡APFDOAD Q†TEAMNO9  R„TEAM F‡APFFPLR‡APFDOAD2;;Add new(Q>;; human after2P†PORTNO9;; old last< P‡CMPLEVL9F#…PLYRS;;Update #plyrsP!‡STPADAT;;Fix all dataZX;d‡RMVPLYR$>;;REMOVE HUMANSn ‡RMPFPLRQ†TEAMNO9;;Find firstxR„TEAM;; member of‚F‡RMPDORM;; active teamŒ2– H‡RMPFPLR "‡RMPDORMQ†PORTNO9;;If not humanªG…NORMV;; quit´ &…HOLDX¾X;È ‡RMPLOOP%„TEAM;;Get team sizeÒQ‡TEAMSIZ8ÜF‡RMPLDON;;If =min quitæQ†PORTNO9;;Get plyr typeðI‡RMPLNDN;;If comp exitú%‡RMPLDON!‡STPLDAT;; (fix all data)"‡RMPLNDN%…HOLDX;;Move all plyrs2;; after this!‡RMVPLOP ‡MOVEDAT;; one down a" 2;; spot,36 )†ACTIVE@ D‡RMVPLOPJ"†ACTIVE;;Update #plyrsT0^ †ERASPL;;Erase plyrh$„TEAM;;Update teamr"‡TEAMSIZ9;; size|$…HOLDX;;Update #humans† "…PLYRS !‡RMPLOOPšX;¤…NORMV!‡CHKKEYS®X;¸X; OPTION: NUMBER OF 'PUTERSÂX;̆DOOPTNQ>;;If teamsiz=maxÖ%„TEAM;; try to takeàR‡TEAMSIZ8;; out 'putersê D‡RMVCOMPôQ>;;If max activeþR†ACTIVE;; try to takeD‡RMVCOMP;; out 'puters $†ACTIVEX;&‡ACFTEAMQ„TEAM;;ADD A 'PUTER0R†TEAMNO9;;Move players:F‡ACFDOAD;; down until DA;; last memberN?;; of currentX3;; team is foundb ‡MOVEDATl0v I‡ACFTEAM€‡ACFDOAD2;;Add new 'puterŠQ>€;; after old last” P†PORTNO9žQ†CMPLVL;;Set level=¨P‡CMPLEVL9;; cur default²&‡LASTCMP;;This is last comp¼#…COMPS;;Updata # 'putersÆ!‡STPADAT;;Fix all dataÐX;Ú ‡RMVCOMPQ>;;REMOVE 'PUTERSäP‡LASTCMP;;No last 'puterî$>;;Find firstø ‡RMCFTEMQ†TEAMNO9;; member ofR„TEAM;; active team  F‡RMCFCMP2  H‡RMCFTEM* ‡RMCFCMPQ†PORTNO9;;Find first4G‡RMCDORM;; 'puter on>2;; active teamH Q†TEAMNO9RR„TEAM; ;If no 'puters\H…NORMV;; on this teamf(†ACTIVE;; then quitp F‡RMCFCMPz D‡RMCFCMP„ E…NORMVŽ‡RMCDORM&…HOLDX˜X;¢ ‡RMCLOOP%„TEAM;;Get team size¬Q‡TEAMSIZ8;;If=min quit¶F‡STPLDAT;; (fix all data)ÀQ†TEAMNO9;;If not on teamÊR„TEAM;; quitÔH‡STPLDAT;; (fix all data)Þ%…HOLDX;;Move all plyrsè2;; after this oneò"‡RMVCLOP ‡MOVEDAT;; down a spotü2 3 )†ACTIVE D‡RMVCLOP$ "†ACTIVE;;Update #plyrs. 18 0B )†ACTIVEL F†DOERPCV 0` †DOERPC †ERASPL;;Erase plyrj $„TEAM;;Update team sizet "‡TEAMSIZ9~ $…HOLDXˆ "…COMPS;;Update #'puters’ !‡RMCLOOPœ X;¦ X; DATA JUSTIFICATION° X;º ‡STPADAT#†ACTIVE;;FIX FOR ADDÄ Q„TEAM;;Update #plyrs,Î P†TEAMNO9;; & team sizeØ >â #‡TEAMSIZ9ì X;ö "‡STPLDATQ>;;SET BOXES & PORTS P†HOLDIT;;Init team %>;;Init box count '„PORT;;Init port count $>;;FIX ALL PLYRS( %‡STPLDLPQ†TEAMNO9;;If on this team2 R†HOLDIT< F‡STPSBOX;;Go set box/portF %>;;Box=first on 2ndP #†HOLDIT;; side & team = 2Z "‡STPSBOX'ƒBOX9;;Set box of plyrd Q†PORTNO9;;If it's a humann G‡STPLNPL;; player, set portx Q„PORT;; to next avail‚ #„PORT;; joystickŒ P†PORTNO9– ‡STPLNPL3;;Update box  2;;Do next plyrª (†ACTIVE´ D‡STPLDLP¾ F‡STPLDLPÈ X;Ò $>;;SHOW IN BOXESÜ %>æ "‡STBNUML †SETBOX;;Set boxes forð 3;; this playerú 2 !‡STBXECL(†ACTIVE;;If past last F†STBCKY;; then erase E‡STBXEMT;; id's for it" †STBCKYC;;If this box, RƒBOX9;; is active6 F‡STBNUML;; go show it@ ‡STBXEMTQ>;;Erase id'sJ  ‡SETBOXN;; for thisT Q>;; box^ ‡SETBOXLh 3r )>;;(do all 8)| D‡STBXECL† X;  ‡DBCNSOL;;Debounce consoleš !‡CHKKEYS;;Loop for input¤ X;® X; SUBROUTINES FOR TITLES¸ X; ---------------------- X;Ì X; MOVE PLAYER DATA FROM XÖ X; INDEX TO Y INDEXà X;ê !‡MOVEDATQ†PORTNO9;;Move port #ô P†PORTNO8þ Q†TEAMNO9;;Move team # P†TEAMNO8 QƒBOX9;;Move box # PƒBOX8& Q…PLYRX9;;Move x-pos0 P…PLYRX8: Q…PLYRY9;;Move y-posD P…PLYRY8N Q‡CMPLEVL9;;Move levelX P‡CMPLEVL8;;(0 for humans)b :l X;v X;€ X; CONSOLE KEY DEBOUNCEŠ X;” ‡DBCNSOLQ†CONSOL;;Get consolež R>;;If button hit¨ H‡DBCNSOL;; try again² Q>;;Wait for 1/30¼  „WAIT;; of a secondÆ :Ð X;Ú X;ä X; ERASE PMG INDICATORî X; (PMG # in X)ø X; 0 = missile X; 1-4 = player X; †ERASPLA;;Calculate address ,;; of PMG indicator* O>5‡MISSLES4 P‡POINTER;;& set a pointer> Q>H P‡POINTERR ?;;Then, erase the\ $‡ERASPLPP@‡POINTER7;; whole thingf 1p H‡ERASPLPz :„ X;Ž X;˜ X; SET SELECTION BOX ID's¢ X; Box # in Y¬ X; Plyr # in X¶ X;À †SETBOXQ„PENX8;;Set PMG posnÊ P…PLYRX9Ô Q„PENY8Þ P…PLYRY9è Q†PORTNO9;;If it's aò G†STBFCM;; human, hisü ,;; ID = hisO>;; port +17H†STBFPR;; (digit)†STBFCMQ>;;Else, a 'C'$#†STBFPR ‡SETBOXN;;Set the ID box.Q‡CMPLEVL9; ;Set level box8 ‡SETBOXL;; (blank forB:;; humans)LX;VX;`X; SET CONTENTS IDENT BOXjX; Content in AtX; Box # in Y~X;ˆ‡SETBOXN'…HOLDY;;Save box #’5;; and contentœQ†BOXNLO8;;Set pointer to¦P‡POINTER;; ID box° Q†BOXNHI8ºP‡POINTERÄ7;;Get contentÎ%>;;And set itØP@‡POINTER7;; on screenâ%…HOLDY;;Get back box #ì:öX;X; X; SET CONTENTS LEVEL BOXX; Content in AX; Box # in Y(X;2‡SETBOXL'…HOLDY;;Save box #<5;; and contentFQ†BOXLLO8;;Set pointer toPP‡POINTER;; level boxZ Q†BOXLHI8dP‡POINTERn7;;Get contentx%>;;And set it‚P@‡POINTER7;; on screenŒ%…HOLDY;;Get back box #–: X;ªX;´X; HIGHLIGHT ACTIVE TEAM¾X;ȇSHWTEAM%„TEAM;;Get team #Ò Q‡TEAMTXL8;;Set pointer toÜP‡POINTER;; team textæQ‡TEAMTXH8ðP‡POINTERú%>;;Invert all!‡ITNLOOPQ@‡POINTER7;; chars ofN>€;; team textP@‡POINTER7"1, I‡ITNLOOP6: