1
0
mirror of https://github.com/rfivet/BCG101.git synced 2024-12-21 01:26:24 -05:00

Add TSS8 port of BASEBL+BASBL1 and ZOOP.

This commit is contained in:
Renaud 2024-05-01 11:06:16 +08:00
parent ab99e3edfe
commit 3db5e32e10
3 changed files with 214 additions and 0 deletions

138
port/BASBL1.BAS Normal file
View File

@ -0,0 +1,138 @@
100 DIMB(6),C(0),F(0),Z(0)
110 LETZ(0)=.5\LETZ=.5
120 LETI=1
130 LETB1=0\LETB2=0\LETB3=0\LETI1=0\LETI2=0\LETI3=0
140 LETC1=0\LETC2=0\PRINT
150 IFC2<>4THEN160\PRINT"THE BATTER WALKS."\GOSUB920\GOTO140
160 IFC1<>3THEN180\PRINT"THE BATTER STRUCK OUT."\LET C3=C3+1\GOTO140
170 IF S1=1THEN180\LETX=X+1
180 IFC3<3THEN270\IFS1=1THEN190\LETS1=1\GOTO200
190 PRINT"AFTER";I;"INNINGS";\LETI=I+1\LETS1=0
200 PRINTI2;"RUNS,";I1;"HITS,";I3;"ERRORS AND";B1+B2+B3;"LEFT ON BASE."
210 IFI=5THEN1420\IFS1=0THEN230\PRINT"I'M";\GOTO240
220 IFS1=0THEN230\PRINT"I'M";\GOTO240
230 PRINT"YOU'RE";
240 PRINT" UP NOW."\PRINT"SCORE: ME";S2;"YOU";S3
250 PRINT\LETC3=0
260 GOTO130
270 PRINT"YOUR PLAY";
280 LINPUT B$\ CHANGE B$ TO B
290 LETD=1*RND(5)\PRINT
300 LETC=100*B(1)+B(2)+12928\IF S1=0THEN420
310 IFC<>19713THEN320\LETD=D+C(X)\GOTO1280 ' CURVE
320 IFC<>19993THEN330\LETD=D+F(X)\GOTO1280 ' FAST
330 IFC=19597THEN1280 ' BEAN
340 IFC=19610THEN1280 ' BRUSH
350 IFC=21304THEN1280 ' SLIDE
360 IFC=20506THEN1280 ' KNUCKLE
370 IFC<>20110THEN380\IFD<.8THEN1280\GOTO1270 ' GREASE
380 IFC<>21308THEN390\IFD<.8THEN1280\GOTO1270 ' SPIT
390 IFC<>19700THEN400\PRINT"RUNNERS ARE STICKING."\GOTO270 ' CHECK
400 IFC<>19593THEN410\PRINT"MY BATTER";\GOSUB570\GOTO140 ' BALL
410 FORA1=1TOB(0)\PRINTCHR$(B(A1));\NEXTA1\PRINT"?"\GOTO270
420 IFC<>19613THEN430\PRINT"YOUR BATTER";\GOSUB570\GOTO140 ' BUNT
430 IFC=21315THEN1280 ' SWING
440 IFC<>19700THEN450\PRINT"CHECK NOT YET IN."\GOTO270 ' CHECK
450 IFC=20201THEN1280 ' HIT
460 IFC<>21312THEN470\PRINT"STEAL NOT YET IN."\GOTO270 ' STEAL
470 IFC=21293THEN1280 ' SACRIFICE
480 IFC=20110THEN1280 ' GROUND
490 IFC=20004THEN1280 ' FLY
500 IFC=20501THEN1280 ' KILL
510 GOTO410
520 LETA=9*RND(6)\IFS1=0THEN530\PRINT"MY BATTER";\GOTO540
530 PRINT"YOUR BATTER";
540 IFA>1THEN550\PRINT" LINED OUT TO THE THIRD BASEMAN."\GOTO840
550 IFA>2THEN560\PRINT" POPPED OUT IN SHALLOW LEFT."\GOTO840
560 IFA>3THEN580
570 PRINT" GROUNDED TO THE PITCHER";\GOTO590
580 IFA>4THEN680\PRINT" GROUNDED TO SHORTSTOP";
590 PRINT" WHO THREW OUT THE MAN";\IFC3=2THEN670
600 IFB1=0THEN670\IFB2=0THEN630\IFB3=0THEN620\PRINT" FORCED HOME."
610 GOTO850
620 PRINT" FORCED TO THIRD."\GOTO850
630 LETA1=INT(3*RND(0))\PRINT" FORCED TO SECOND";\IFA1<>1THEN650
640 PRINT"."\GOTO850
650 PRINT\PRINT"AND THEN TO FIRST FOR A DOUBLE PLAY!"
660 LETC3=C3+1\LETB1=0\GOTO840
670 PRINT" AT FIRST."\GOTO840
680 IFA>5THEN700\PRINT" HIT A FLY INTO DEEP CENTER WHERE IT WAS";
690 PRINT" CAUGHT."\GOTO710
700 IFA>6THEN880\PRINT" HIT TO LEFT FIELD FOR AN OUT."
710 IFC3=2THEN840\IFB1+B2+B3=0THEN840
720 PRINT"THE MAN ON";\IFB3=1THEN730\IFB2=1THEN750\GOTO790
730 PRINT" THIRD MADE IT HOME,";\GOSUB930\LETB3=0
740 IFB2=0THEN780
750 PRINT" SECOND";\IFA1=0THEN760\PRINT" STAYED PUT."\GOTO780
760 IFA1>1THEN770\PRINT" MADE IT TO THIRD."\LETB3=1\LETB2=0\GOTO780
770 PRINT" WAS OUT TRYING TO TAKE THIRD."\LETC3=C3+1\LETB2=2
780 IFB1<>1THEN840
790 IFB2<>1THEN800\PRINT" FIRST STUCK."\GOTO840
800 PRINT" ON FIRST";\IFB2<>2THEN820
810 PRINT" MADE IT TO SECOND."\LETB2=1\LETB1=0\GOTO840
820 LETW=2*RND(0)\IFW>1THEN810\PRINT" WAS OUT GOING."\LETC3=C3+1
830 LETB2=0
840 LETZ(Y)=Z(Y)-(Z(Y)/100)\GOTO860
850 LETZ(Y)=Z(Y)+(Z(Y)/100)
860 LETC3=C3+1\PRINT"THAT WAS OUT NUMBER";C3
870 GOTO1260
880 IFA>7THEN890\PRINT" HIT OVER THE PITCHER'S HEAD FOR A";\GOTO910
890 IFA>8THEN900\PRINT" HIT THROUGH THE HOLE INTO RIGHT FOR A";\GOTO910
900 PRINT" HIT INTO LEFT FIELD FOR A";
910 IFZ>4*DTHEN1210\IFZ>3*DTHEN1130\IFZ>2*DTHEN1040\PRINT" SINGLE."
920 IFB3=0THEN970\GOSUB930\LETB3=0\GOTO960
930 IFS1=1THEN940\LETS3=S3+1\GOTO950
940 LETS2=S2+1
950 LETI2=I2+1\RETURN
960 PRINT"THE MAN ON THIRD SCORED."
970 IFB2=0THEN1000\PRINT"THE MAN ON SECOND";\IFA>8THEN990\PRINT" SCORED."
980 GOSUB930\LETB2=0\GOTO1000
990 PRINT" WENT TO THIRD."\LETB2=0\LETB3=1
1000 IFB1=0THEN1030\PRINT"THE MAN ON FIRST";\IFA>8THEN1020
1010 IFC2=4THEN1020\LETB1=0\GOTO990
1020 PRINT" TO SECOND."\LETB2=1
1030 LETB1=1\GOTO1240
1040 LETW=3*RND(0)\IFW>1THEN1050\PRINT"N OFF THE WALL";
1050 IFA2=1THEN1060\PRINT" STAND UP";
1060 PRINT" DOUBLE."\IFB3=0THEN1080\PRINT"THE MAN ON THIRD SCORED."
1070 GOSUB930\LETB3=0
1080 IFB2=0THEN1090\PRINT"THE MAN ON SECOND SCORED."\GOSUB930\LETB2=0
1090 IFB1=0THEN1120\PRINT"THE MAN ON FIRST";\IFA>8THEN1110\PRINT" SCORED."
1100 GOSUB930\LETB1=0\GOTO1120
1110 PRINT" WENT TO THIRD."\LET B1=0\LETB3=1
1120 LETB2=1\GOTO1240
1130 PRINT" TRIPLE!"\LETA3=B1+B2+B3\IFA3=0THEN1200\PRINT"THE MAN ON";
1140 IFB1=0THEN1150\PRINT" FIRST";\GOSUB930
1150 IFB2=0THEN1170\IFB1=0THEN1160\PRINT", AND";
1160 PRINT" SECOND";\GOSUB930
1170 IFB3=0THEN1190\IFB1+B2=0THEN1180\PRINT", AND";
1180 PRINT" THIRD";\GOSUB930
1190 PRINT" SCORED."\LETB1=0\LETB2=0
1200 LETB3=1\GOTO1240
1210 IFB1+B2+B3<3THEN1220\PRINT" GRAND SLAM";
1220 PRINT" HOME RUN!!"\FORA1=1TO(B1+B2+B3+1)\GOSUB930\NEXTA1
1230 LETB1=0\LETB2=0\LETB3=0
1240 IFC2=4THEN1260\LETZ(Y)=Z(Y)+(Z(Y)/100)
1250 LETI1=I1+1
1260 RETURN
1270 PRINT"PITCHER THROWN OUT FOR THROWING ILLEGAL PITCH."\GOTO270
1280 LETA=5*RND(0)\IFA<3THEN1320
1290 IFA>4THEN1300\PRINT"INSIDE - ";\GOTO1310
1300 PRINT"OUTSIDE - ";
1310 LETC2=C2+1\PRINT"BALL";C2\GOTO150
1320 IFZ(Y)<DTHEN1340\GOSUB520\IFA<6THEN1330\LETC(Y)=C(Y)+1\GOTO140
1330 LETC(Y)=C(Y)-1\GOTO140
1340 LETC(Y)=C(Y)-1\LETB=3*RND(7)
1350 IFB>1THEN1360\PRINT"A SWING & A MISS - ";\GOTO1390
1360 IFB>2THEN1380\PRINT"INSIDE CORNER - CALL ";
1370 GOTO1390
1380 PRINT"FOUL! - ";\IFC1=2THEN1400
1390 LETC1=C1+1\PRINT" STRIKE";C1\GOTO150
1400 PRINT"COUNT STAYS AT";C2;"BALLS AND";C1;
1410 PRINT"STRIKES."\GOTO150
1420 PRINT"FINAL SCORE: ME";S2;"YOU";S3
1430 IFS2>S3THEN1450\IFS3=S2THEN1440\PRINT"YOU WON."\GOTO1460
1440 PRINT"A DRAW!"\GOTO1460
1450 PRINT"I WON!"
1460 CHAIN"DEMON "
1470 END

50
port/BASEBL.BAS Normal file
View File

@ -0,0 +1,50 @@
100 DIMT$(3),C(19),F(19),Z(19)
110 FORX=1TO19\READC(X),Z(X),F(X)\NEXTX\LETX=1
120 PRINT"WELCOME TO HUISMAN STADIUM FOR TODAY'S GREAT GAME BETWEEN"
130 PRINT"THE PDP-8 PANTHERS AND (YOUR NAME PLEASE) THE ";
140 LINPUT T$(0),T$(1),T$(2),T$(3)
150 PRINT\PRINT"A HIGHLY PARTISAN CROWD OF";
160 RANDOMIZE
170 LET A=INT(70000*RND(1))\PRINTA;
180 PRINT"FANS IS ANXIOUSLY AWAITING THE"\PRINT"START OF THE GAME."
190 PRINT"HERE IS MY TEAM:","AND HERE IS YOURS:"
200 PRINT"NAME","AVERAGE","NAME","AVERAGE"
210 PRINT"----","-------","----","-------"
220 GOSUB 400
230 PRINT\PRINT
240 PRINT"THE PANTHERS ARE TAKING THE FIELD NOW AS ANDREWS OF THE"
250 PRINT T$(0);T$(1);T$(2);T$(3);
260 PRINT" ADVANCES TO THE PLATE. PLEASE WAIT AS THE COMPUTER SINGS"
270 PRINT"OUR NATIONAL ANTHEM TO ITSELF - 2 OR 3 TIMES! JUST SING"
280 PRINT"ALONG UNTIL ASKED FOR YOUR PLAY."\PRINT
290 GOTO580
300 DATA.05,.412001,.05,.02,.263001,.03
310 DATA-.02,.236001,.02,.03,.316001,-.01
320 DATA.01,.241001,.03,.02,.321001,.02
330 DATA-.02,.367001,.02,-.02,.386001,-.01
340 DATA.01,.295001,.03,-.01,.296001,.02
350 DATA-.02,.319001,.02,-.02,.285001,.02
360 DATA-.03,.295001,.01,.02,.295001,.03
370 DATA.02,.218001,.02,.02,.139001,-.02
380 DATA.03,.238001,.01,.03,.231001,-.02
390 DATA 0,0,0
400 PRINT"HUISMAN",Z(1),"KLOOS",Z(2)
410 PRINT"HOEREN",Z(3),"ANDREWS",Z(4)
420 PRINT"BACCUS",Z(5),"MAYER",Z(8)
430 PRINT"SMITH",Z(7),"HANSEN",Z(6)
440 PRINT"SCHNEIDER",Z(9),"MICHEL",Z(10)
450 PRINT"ROSENBAUM",Z(11),"P. D. PEATE",Z(12)
460 PRINT"POULSEN",Z(13),"WILLIAMS",Z(14)
470 PRINT"KILGOUR",Z(15),"NELSON",Z(16)
480 PRINT "JOHNSON",Z(17),"ANKCORN",Z(18)
490 PRINT"WHITNEY"," MANAGER","IVEY"," MANAGER"\PRINT
500 PRINT"PITCHER'S OPTIONS ARE:"\PRINT"FASTBALL"
510 PRINT"BEANBALL"\PRINT"BRUSHBACK"\PRINT"BALL"\PRINT"CURVE"
520 PRINT"SLIDER"\PRINT"KNUCKLE"\PRINT"GREASEBALL (ILLEGAL)"
530 PRINT"SPITBALL (ILLEGAL)"\PRINT"CHECK"\PRINT
540 PRINT"BATTER'S OPTIONS ARE:"\PRINT"BUNT"\PRINT"SWING"
550 PRINT"HIT-AWAY"\PRINT"SACRIFICE"\PRINT"GROUNDER"\PRINT"FLY"
560 PRINT"KILL"\PRINT
570 RETURN
580 CHAIN"BASBL1"
590 END

26
port/ZOOP.BAS Normal file
View File

@ -0,0 +1,26 @@
90 DIM A(6)
100PRINT\PRINT"READY"\PRINT
110 LINPUT A$\ IF A$="BYE" THEN 300
115 CHANGE A$ TO A\ A=A(1)\ B=A(2)\ PRINT CHR$(A);CHR$(B);
120LETK=10*A+B+1408
130IFK<>2313THEN140\PRINT"N NO FILE YOU BOOB"\GOTO100
140IFK<>2143THEN150\PRINT"TALOG TRY MONTGOMERY WARD'S"\GOTO100
150IFK<>2241THEN160\PRINT"STNH I DON'T FEEL LIKE IT"\GOTO100
160IFK<>2257THEN170\PRINT"W YES I'M QUITE NEW"\GOTO100
170IFK<>2274THEN190\PRINT"D I'M NOT THAT OLD, BUT I'M OLD ENOUGH!!!"
180GOTO100
190IFK<>2297THEN210\PRINT"NAME WHY? I LIKE MY NAME"\GOTO100
200IFK<>207THEN210\PRINT"NAME WHY? I LIKE MY NAME"\GOTO100
210IFK<>2157THEN220\PRINT"BUG GET A CAN OF RAID"\GOTO100
220IFK<>2322THEN230\PRINT"OP THE FUN IS JUST STARTING"\GOTO100
230IFK<>2303THEN240\PRINT"VE I DON'T LIKE BANKS"\GOTO100
240IFK<>2336THEN250\PRINT"SAVE O.K., THE WHOLE DEC TAPE"\CHAIN "ZOOP "
250IFK<>2305THEN260\PRINT"RATCH GOT AN ITCH?"\GOTO100
260IFK<>2166THEN270\PRINT"IT THIS IS NO NEWSPAPER"\GOTO100
270 FOR I=3 TO A(0)
275 PRINT CHR$(A(I));
280 NEXT I
290PRINT\PRINT"WHAT??"\GOTO100
300 PRINT " WIPED OUT COMPLETELY!!!"
310 CHAIN "DEMON "
320END