Jump to content

Photo

TI- BASIC game source code

Source code BASIC Texas instrument TI-99/4a

12 replies to this topic

#1 Little Nero OFFLINE  

Little Nero

    Combat Commando

  • 3 posts

Posted Mon Aug 20, 2018 6:23 AM

I'm new to programming so I was wondering if anyone had the source code for TI-99/4a games written in BASIC?

#2 chue OFFLINE  

chue

    Moonsweeper

  • 305 posts

Posted Mon Aug 20, 2018 11:53 AM

When I was a little younger, one of my favorite sources was "Compute!" magazine.  They also published some books, one of which is here:

 

https://archive.org/...ublications.pdf

 

The above link is for a PDF file, but I actually have it in book form.  Be sure to post any questions you may have on it.



#3 Little Nero OFFLINE  

Little Nero

    Combat Commando

  • Topic Starter
  • 3 posts

Posted Mon Aug 20, 2018 8:40 PM

When I was a little younger, one of my favorite sources was "Compute!" magazine.  They also published some books, one of which is here:
 
https://archive.org/...ublications.pdf
 
The above link is for a PDF file, but I actually have it in book form.  Be sure to post any questions you may have on it.


Thanks, this is way better than all the books I've seen so far.

#4 TheBF OFFLINE  

TheBF

    Dragonstomper

  • 833 posts
  • Location:The Great White North

Posted Sun Sep 9, 2018 7:26 AM

I just woke up my old system from the 1980s and have been sending listings of games to my PC over RS232.

 

I actually typed the listing of Diamond Drop from Compute magazine. 

 

 Here is the listing fresh from a 34 year old floppy disk. :) 

 

I think I did some changes to improve the responsiveness because that's what I did back then.

 

You will have to remove the "RUN DSK1.GAMES.LOAD" in line 620 and change it to STOP

10 REM *** diamond drop ***
20 REM * compute magazine *
30 REM *  september 1983  *
40 REM ********************
100 DIM KOLOR(6)
101 RIGHT=37 :: LEFT=-37 :: NOGO=0
110 RANDOMIZE
120 GOSUB 630
130 REM 108-DEFINE DIAMOND SPRITE CHAR,128-136 ARE THE PADDLES
140 CALL CHAR(108,"10387CFE7C38100000000000000000000000000000000000000000000000000000")
150 CALL CHAR(128,"FFFFFFFF0000FFFFFFFF0000FFFFFFFFFFFFFFFF0000FFFFFFFF0000FFFFFFFF")
160 CALL CHAR(132,"000000000000FFFFFFFF0000FFFFFFFF000000000000FFFFFFFF0000FFFFFFFF")
170 SCR=0 :: SK=0 :: CH=20 :: S=0 :: CALL CLEAR :: CALL SCREEN(15):: DISPLAY AT(4,8):"D I A M O N D"
180 FOR ROW=3 TO 6
190 CALL HCHAR(ROW+2,6,32,20)
200 DISPLAY AT(ROW+3,6):"```  ```   ``  ```" :: DISPLAY AT(ROW+4,6):"h  h h  h h   h h  h"
210 DISPLAY AT(ROW+5,6):"p  p ppp  p  p ppp" :: DISPLAY AT(ROW+4,6):"x  x x  x x   x x  x"
220 DISPLAY AT(ROW+7,6):"h  h h  h h  h h" :: DISPLAY AT(ROW+8,6):"```  `  `  ``   `"
230 NEXT ROW
240 DISPLAY AT(18,4):"SKILL LEVEL (1,2) ?" :: ACCEPT AT(18,24)BEEP VALIDATE(DIGIT)SIZE(1):SK :: IF SK>2 THEN 240
250 DROP=5 :: IF SK=2 THEN DROP=15 :: REM ** change drop    rate to change difficulty *
260 DISPLAY AT(21,2):"DROP WITH ANGLE (Y/N) ?" :: ACCEPT AT(21,26)BEEP VALIDATE("YN")SIZE(1):ANG$
270 IF ANG$="N" THEN ANG=0 :: GOTO 290
280 ANG=1
290 CALL CLEAR :: SCR=SCR+1
300 DISPLAY AT(1,2):"CHANCES:";CH :: DISPLAY AT(1,15):"SCORE:";S
310 ROW=3 :: FOR I=96 TO 120 STEP 8
320 CALL HCHAR(ROW,3,I,28):: ROW=ROW+1 :: NEXT I
330 CALL HCHAR(24,1,30,32)
340 CALL MAGNIFY(3):: CALL SPRITE(#1,128,5,170,115)
350 KHAR=108 :: ROW=41 :: FOR J=6 TO 3 STEP -1
360 A$="" :: FOR I=3 TO 30 :: A$=A$&CHR$(I):: NEXT I :: N=28
370 IF N=0 THEN 530
380 R=INT(LEN(A$)*RND+1):: P$=SEG$(A$,R,1):: X=ASC(P$):: N=N-1 :: IF N=0 THEN 40
0
390 A$=SEG$(A$,1,R-1)&SEG$(A$,R+1,LEN(A$)-R)
400 B=INT(RND*61*ANG)-30*ANG
410 CALL HCHAR(J,X,32):: CALL SPRITE(#2,KHAR,KOLOR(J),ROW,8*(X-1)-2,DROP,B)
420 CALL KEY(3,K,ST):: IF K=68 THEN H=RIGHT ELSE H=0 :: IF K=83 THEN H=LEFT
440 IF H=NOG0 THEN CALL MOTION(#1,0,0)ELSE CALL MOTION(#1,0,H):: CALL SOUND(50,-1,12)
450 CALL COINC(ALL,C):: IF C THEN 510
460 CALL POSITION(#2,DROW,DCOL):: IF DROW<155 THEN 420
470 CALL POSITION(#1,PROW,PCOL):: IF (DCOL-PCOL<16)*(DCOL-PCOL>-8)THEN 510
480 CALL DELSPRITE(#2):: CALL MOTION(#1,0,0):: CH=CH-1 :: CALL SCREEN(11)
485 FOR F=1 TO 30 STEP 6
490 CALL SOUND(-100,110,F,110*F,F,150*F,F,-6,F/2):: CALL SCREEN(INT(F/2)+.5)
492 NEXT F 
494 CALL SCREEN(15):: IF CH=0 THEN GOTO 570
500 GOTO 520
510 CALL DELSPRITE(#2):: CALL MOTION(#1,0,0)
512 CALL SOUND(-9,4000,9,6479,9,5567,9,-5,0):: S=S+(60/J)*SK*SCR+(60/J)*SCR*INT(ABS(B)/15)
520 DISPLAY AT(1,2):"CHANCES:";CH :: DISPLAY AT(1,15):"SCORE:";S :: GOTO 370
530 K=K+4 :: ROW=ROW-8 :: M=128 :: IF J<6 THEN M=132
540 FOR F=0 TO 30 STEP -6 :: CALL SOUND(-300,150,F):: NEXT F
550 CALL SPRITE(#1,M,5,150,115,0,H)
560 NEXT J :: FOR G=600 TO 1400 STEP 100 :: CALL SOUND(100,G,1)
562 NEXT G
564 DROP=DROP+5 :: GOTO 290
570 CALL SCREEN(14):: IF S>HS THEN HS=S
580 CALL DELSPRITE(ALL):: CALL CLEAR :: DISPLAY AT(8,5):"YOUR SCORE: ";S :: DISPLAY AT(11,5):"HIGH SCORE: ";HS
590 DISPLAY AT(16,5):"PLAY AGAIN (Y/N)? "
592 IF S<HS THEN CALL SAY("UHOH NOT+SO+GOOD.WANT+TO+PLAY+AGAIN")ELSE CALL SAY("#NICE TRY#+#TRY AGAIN#")
594 ACCEPT AT(16,24)BEEP VALIDATE("NY")SIZE(1):REPLY$
600 IF REPLY$="N" THEN 620
610 GOTO 170
620 CALL SAY("O+K GOODBYE+FOR+NOW"):: CALL CLEAR :: RUN "DSK.GAMES.LOAD"
630 REM *****************
631 REM * define small  *           
632 REM * diamonds and  *
633 REM *    colors     *
634 REM *****************
640 FOR I=96 TO 120 STEP 8
650 CALL CHAR(I,"10387CFE7C381000"):: NEXT I
660 CALL COLOR(11,11,1)
670 CALL COLOR(9,3,1)
680 CALL COLOR(10,10,1)
690 CALL COLOR(12,14,1)
700 FOR J=3 TO 6 :: READ KOLOR(J):: NEXT J
710 DATA 3,10,11,14
720 RETURN
730 END


Edited by TheBF, Sun Sep 9, 2018 7:28 AM.


#5 TheBF OFFLINE  

TheBF

    Dragonstomper

  • 833 posts
  • Location:The Great White North

Posted Sun Sep 9, 2018 7:36 AM

Here is a strange game that I converted to TI-BASIC from a magazine.

I have never got to the end of the journey. Probably needs some tweaking with the random number windows to make it possible.

 

Spoiler


#6 OLD CS1 OFFLINE  

OLD CS1

    Technomancer

  • 5,786 posts
  • Technology Samurai
  • Location:Tallahassee, FL

Posted Sun Sep 9, 2018 10:38 AM

In the vein of TheBF, I spent a few years after COMPUTE! dropped the TI-99/4A converting programs from the magazine, usually the feature program.  Recently (starting eight years ago, recently indeed) I started re-working them.  I completed one of the reworks this year and it includes TIdBit, TI BASIC, and TI Extended BASIC sources.  You can find Tiles here, or https://locu.li/tiles99 (look at the last post for the second release which includes more stuff.)

 

I am expecting to have several more done over the next year, but I have two projects to finish beforehand.



#7 TheBF OFFLINE  

TheBF

    Dragonstomper

  • 833 posts
  • Location:The Great White North

Posted Tue Sep 11, 2018 7:23 PM

Here is an oldie that I found on a floppy disk.

 

ELIZA in TI BASIC.

 

It uses an external text file for the responses, so you will have make the second spoiler into a DV80 file.

 

It's not too speedy taking about 3 seconds to generate a response, but it's still fun.

 

BASIC code

Spoiler

 

 

DATA file with responses

Spoiler


#8 HOME AUTOMATION OFFLINE  

HOME AUTOMATION

    Chopper Commander

  • 192 posts

Posted Tue Sep 11, 2018 8:03 PM

It uses an external text file for the responses, so you will have make the second spoiler into a DV80 file.

 

Hmm, DV80 you say...

OK NOW LET'S SEE IF WE CAN  KEEP OUR CONVERSATION WITHINTHE REALM OF PSYCHOLOGY... (89 CHARS!)

Vat shoold I doo Darling... :? :? :?



#9 TheBF OFFLINE  

TheBF

    Dragonstomper

  • 833 posts
  • Location:The Great White North

Posted Wed Sep 12, 2018 7:16 AM

 

Hmm, DV80 you say...

OK NOW LET'S SEE IF WE CAN  KEEP OUR CONVERSATION WITHINTHE REALM OF PSYCHOLOGY... (89 CHARS!)

Vat shoold I doo Darling... :? :? :?

 

Oops.  So sorry dawling

 

The original was an internal format file.  I thought that was awkward to pass around so I "fixed" it.  :(

I am opening a new store called "Bugs Are Us" 

 

So the simple answer is make the phrase shorter:

 

CAN  WE KEEP OUR CONVERSATION WITHIN THE REALM OF PSYCHOLOGY?

 

How that's for customer service. :-)



#10 TheBF OFFLINE  

TheBF

    Dragonstomper

  • 833 posts
  • Location:The Great White North

Posted Wed Sep 12, 2018 9:12 AM

Here is a simple game that I wrote in 1985.  TUCHTYPE was never published until now.

The world may never be the same.

 

*EDIT*   GOTO 620 in line 610 is clearly not needed.  So much clearer on the big screen 

 

 

Spoiler

Edited by TheBF, Wed Sep 12, 2018 9:20 AM.


#11 HOME AUTOMATION OFFLINE  

HOME AUTOMATION

    Chopper Commander

  • 192 posts

Posted Wed Sep 12, 2018 10:05 AM

 

Oops.  So sorry dawling

 

The original was an internal format file.  I thought that was awkward to pass around so I "fixed" it.  :(

I am opening a new store called "Bugs Are Us" 

 

So the simple answer is make the phrase shorter:

 

CAN  WE KEEP OUR CONVERSATION WITHIN THE REALM OF PSYCHOLOGY?

 

How that's for customer service. :-)

Just curious,

I figured as much...

I'm happy I got what I paid for though!

I've been trying to explain the ELIZA program to my mother
for some time now but all I keep getting are basic responses.

      P.S. You look marvelous!!! (...your work)



#12 TheBF OFFLINE  

TheBF

    Dragonstomper

  • 833 posts
  • Location:The Great White North

Posted Mon Sep 17, 2018 11:06 PM

SMPTE Color Bars (well Almost)

 

(Used to work in TV Engineering)

 

Spoiler

 

 

Attached Files



#13 TheBF OFFLINE  

TheBF

    Dragonstomper

  • 833 posts
  • Location:The Great White North

Posted Thu Sep 20, 2018 10:44 AM

Another Gem from an Ancient Floppy disk

 

Space Junket was typed from a magazine by me and my (then) teenage sister in-law. It's in the "Asteroids" tradition.

 

I changed the original line numbers in this listing to try and see the code more clearly.

 

I changed for/next delays for a CALL SOUND sub-routine.

 

I also add a COINC(ALL,HIT) line to avoid scanning all the sprites all the time. It seemed to speed up the keyboard response.

 

It's a beautiful example of spaghetti in the tradition of the era.  I know it could greatly improved.

100 !**********************
110 !    SPACE JUNKET
120 !**********************
130 !    by Tarik Isani
140 !    99'er version
150 !    keyed by B.fox              & K.Tielemans
160 !    Feb-26-1984        ***************************
170 CALL CLEAR :: CALL SCREEN(2):: RANDOMIZE
180 CALL MAGNIFY(3):: P,R=1 :: S=3
190 DIM M(8,2),DM(9)

200 DATA -20,0,-20,20,0,20,20,20,20,0,20,-20,0,-20,-20,-20
210 FOR I=1 TO 8
212    FOR J=1 TO 2
213      READ M(I,J)
215    NEXT J
216 NEXT I

220 FOR SET=1 TO 12
222    CALL COLOR(SET,16,2)
224 NEXT SET

230 DISPLAY AT(1,5):"** SPACE JUNKET **": :"           BY":"       TARIK ISANI"
240 DISPLAY AT(6,1):"MANEUVER YOUR SPACECRAFT,":"CLEARING YOUR FLIGHT OF"
250 DISPLAY AT(8,1):"METEOROIDS,WITHOUT CRASHING":"INTO THEM"
260 DISPLAY AT(11,1):"ROTATE YOUR SHIP BY PRESSING'S'OR'D',OR MOVE THE ":"JOYSTICK LEFT AND RIGHT"
270 DISPLAY AT(15,1):"ACTIVATE YOUR ENGINES BY":"PRESSING'E',OR MOVING THE   JOYSTICK FORWARD"
280 DISPLAY AT(19,1):"TO LAUNCH YOUR MINES PRESS  'Q',OR PRESS THE FIRE BUTTON ON THE JOYSTICK"
290 DISPLAY AT(24,1):"(PRESS ANY KEY TO BEGIN)"

300 CALL KEY(0,S1,S2)
301 IF S2=0 THEN 300

310 DISPLAY AT(12,4)ERASE ALL:"METHOD OF INPUT:": :"     1.JOYSTICK": :"     2.ARROW KEYS"
320 CALL KEY(0,Z1,Z2)
322 IF (Z1<49) OR (Z1>50) THEN 320

330 CALL CLEAR
340 CALL COLOR(1,2,1,3,16,1,4,16,1,5,2,16,6,2,16,7,2,14,8,9,1)
350 CALL CHAR(48,"007E42424242427E"):: CALL CHAR(49,"0008080808080808")
360 CALL CHAR(50,"007E02027E40407E"):: CALL CHAR(51,"007E02027E02027E")
370 CALL CHAR(52,"004242427E020202"):: CALL CHAR(53,"007E40407E02027E")
380 CALL CHAR(54,"007E40407E42427E"):: CALL CHAR(55,"007E020202020202")
390 CALL CHAR(56,"007E42427E42427E"):: CALL CHAR(57,"007E42427E02027E")
400 CALL CHAR(74,"00FFFFFFFFFFFFFFFFFFFF")
410 CALL CHAR(80,"003C40405C444438003844447C44444400446C5454444444007C40407840407C")
420 CALL CHAR(84,"0000000000000000007C44444444447C00444444282810100078444478504844")
430 GO$=CHR$(80)&CHR$(81)&CHR$(82)&CHR$(83)&CHR$(84)&CHR$(85)&CHR$(86)&CHR$(83)&CHR$(87)
440 CALL CHAR(88,"181818183C3C7E7E")
450 CALL CHAR(92,"F8F8C0C0C0000303030300C0C0C0F8F81F1F03030300C0C0C0C0000303031F1F")
460 CALL CHAR(96,"0045104022000881002400411002200010004800842002008924400802884")
470 CALL CHAR(100,"80400822080114050B01220842204080011004580008C01040308024008C0201")
480 CALL CHAR(104,"00000303030303070707071F1F1F1F000000C0C0C0C0C0E0E0E0E0F8F8F8F8")
490 CALL CHAR(108,"000000000103277FFF7F37170F07030100081C3E7CF8F0E0F0E0C08080C08")
500 CALL CHAR(112,"00000038383F3F3F3F3F3F3838000000000000000080FCFCFCFC8")
510 CALL CHAR(116,"0103070F1F3F7FFF7F270301000000000080C08080C0E0F0E0F0FA7C3E1C08")
520 CALL CHAR(120,"00001F1F1F07070707030303030300000000F8F8F8E0E0E0E0C0C0C0C0C")
530 CALL CHAR(124,"08000103010103070F070F1F3E7C38100080C0E0F0F8FCFEFFFEE4C08")
540 CALL CHAR(128,"0000000000013F3F3F3F0100000000000000001C1CFCFCFCFCFCFC1C1C")
550 CALL CHAR(132,"0010387C3E1F0F070F070301010301000000000080C034FEFFFEFCF8F0E0C08")
560 CALL CHAR(136,"061D2E3D6E75A6FCCDAF793B3D161F07A0D85CF476AB5FCA6B2D2AF62E4AB08")
570 CALL CHAR(140,"0000000002040A01010A04020000000000000004020508080502040")

580 CALL SOUND(100,900,0)
582 CALL SOUND(100,700,0)
584 CALL SOUND(100,800,0)
586 CALL SOUND(100,1000,0)

590 CALL HCHAR(1,3,48,6)
591 DISPLAY AT(1,10):"HIGH:"&RPT$("0",6-LEN(STR$(HS)))&STR$(HS):: CALL HCHAR(2,12,74,4)
600 CALL HCHAR(1,25,88,S-1)

610 FOR I=2 TO 9 
611    CALL SPRITE(#I,136,RND*12+3,1,RND*255+1,RND*9+1,RND*2+1)
612 NEXT I

620 FOR I=2 TO 9 
621   DM(I)=0
622 NEXT I

630 DISPLAY AT(1,23):RPT$(CHR$(88),S-1)
632 CALL SPRITE(#1,104,7,95,125,0,0)
634 CALL SOUND(-50,900,0)
636 X,Y=0
640 CALL PATTERN(#1,92)
650 CALL COLOR(#1,9):: CALL KEY(1,S1,S2):: CALL COLOR(#1,5)
660 IF S1<>18 THEN 650 ELSE CALL SPRITE(#1,104,11,95,125,0,0)
670 CALL COLOR(#1,11)

680 IF Z1=49 THEN CALL JOYST(1,A,B):: GOTO 710
690 CALL KEY(1,S1,S2)
700 IF S1=2 THEN A=-4 :: B=0 ELSE IF S1=3 THEN A=4 :: B=0 ELSE IF S1=5 THEN A=0:: B=4 ELSE A,B=0
710 IF X<>0 OR Y<>0 THEN V=30-MAX(ABS(X),ABS(Y)):: CALL SOUND(-1000,-6,V,110,V,110,V)
720 IF A<>0 OR B<>4 THEN 750 ELSE X1=X+M(P,1)/10 :: X=MIN(ABS(X1),20)*SGN(X1)
730 Y1=Y+M(P,2)/10 :: Y=MIN(ABS(Y1),20)*SGN(Y1)
740 CALL MOTION(#1,X1,Y1):: GOTO 760
750 P=P+SGN(A):: IF P=0 THEN P=8 ELSE IF P=9 THEN P=1

760 CALL PATTERN(#1,(4*P)+100)
761 CALL COINC(ALL,HIT):: IF HIT=0 THEN 771
762 FOR J=2 TO 9
763   IF DM(J)=1 THEN 770
764   CALL COINC(#J,#1,16,H):: IF H THEN 900
770 NEXT J
771 CALL KEY(1,C,D)
772 IF C<>18 THEN 680

780 CALL POSITION(#1,PO1,PO2)
790 CALL SPRITE(#10,140,16,PO1,PO2,M(P,1),M(P,2))
791 CALL COLOR(#1,8)
792 CALL PATTERN(#1,92)
800 CALL SOUND(-500,110,3,440,0)

810 FOR J=2 TO 9
812    IF DM(J)=1 THEN 820
814    CALL COINC(#J,#10,16,H)
816    IF H THEN 860
820 NEXT J

822 VP=VP+1 :: IF VP=3 THEN 840
824 GOTO 810

830 REM      Delete Missile ***************************
840 CALL DELSPRITE(#10):: VP=0 :: GOTO 670

850 REM      Asteroid Hit   ***************************
860 CALL DELSPRITE(#10)
870 CALL PATTERN(#J,96):: CALL SOUND(-500,6000,15,5345,20,999,30,-8,0):: CALL DELSPRITE(#J):: DM(J)=1 :: SC=SC+40+R*5

880 VP=0 :: DISPLAY AT(1,1)SIZE(6):RPT$("O",6-LEN(STR$(SC)))&STR$(SC):: HI=HI+1
881 IF HI=8 THEN 1080 ELSE 670

890 REM *** CRASH ***
900 CALL COLOR(#1,9):: CALL PATTERN(#1,100,#J,96):: DM(J)=1
910 CALL SCREEN(12)
920 CALL SCREEN(2)
921 FOR I=0 TO 30 STEP 3 
922   CALL SOUND(-500,110+I,I,115+I,I,800,30,-8,I/1.5)
923   CALL SOUND(-500,111,I,-5,I)
924 NEXT I

930 FOR I=1 TO 3 
931   CALL SCREEN(12):: CALL SCREEN(2)
932 NEXT I 
933 LET S=S-1

940 DLY=100
941 GOSUB 2000

942 CALL DELSPRITE(#J,#10)

943 DLY=100
944 GOSUB 2000

950 LET HI=HI+1 :: IF HI=8 THEN 1080
960 IF S<>0 THEN P=1 :: GOTO 630
970 CALL DELSPRITE(#1)

971 FOR I=30 TO 0 STEP -1
972   CALL SOUND(-200,-5,I)
973 NEXT I

980 FOR I=1 TO 3
981   CALL SCREEN(12):: CALL SOUND(-200,-5,0):: CALL SCREEN(2):: CALL SOUND(-200,-6,0)
982 NEXT I

990 CALL SOUND(-400,-7,0)
1000 IF SC<=HS THEN 1040 ELSE HS=SC

1010 DLY=200
1011 GOSUB 2000

1012 DISPLAY AT(1,15)SIZE(6):RPT$("O",6-LEN(STR$(HS)))&STR$(HS)

1020 FOR I=1 TO 10
1021   CALL COLOR(5,2,7,6,2,7):: CALL SOUND(-200,900,0)
1030   CALL COLOR(5,2,16,6,2,16):: CALL SOUND(-200,800,0)
1031 NEXT I

1040 X,Y,SC,HI=0 :: R,P=1 :: S=3 :: DISPLAY AT(12,10):GO$
1050 CALL COLOR(7,14,2):: CALL KEY(1,A,B):: CALL COLOR(7,2,14):: IF B=0 THEN 1050 ELSE CALL HCHAR(12,1,32,32)
1060 GOTO 580

1070 REM ALL DESTROYED
1080 CALL DELSPRITE(ALL)
1090 CALL SOUND(200,9999,30):: CALL SOUND(20,1100,0):: CALL SOUND(60,9999,30)::CALL SOUND(300,1100,0)
1100 P=1 :: R=MIN(R+1,4):: HI=0
1101 IF S=0 THEN 970 ELSE 610
1110 REM

1999 REM delay
2000 CALL SOUND(DLY, 20000,30)
2010 RETURN
9999 END SPACEJUNKET






Also tagged with one or more of these keywords: Source code, BASIC, Texas instrument, TI-99/4a

0 user(s) are browsing this forum

0 members, 0 guests, 0 anonymous users