Jump to content

Photo

programs


33 replies to this topic

#1 BuckoBrand OFFLINE  

BuckoBrand

    Space Invader

  • 32 posts

Posted Fri Nov 6, 2015 12:57 PM

hi i have been typing in programs from the blue book...  here is one of them

 

 

 

 

10 RANDOMIZE

20 CODE=INT(63*RND)+33

30 CALL CLEAR

40 ROW=INT(24*RND)+1

50 COLUMN=INT(32*RND)+1

60 CALL VCHAR(ROW,COLUMN,CODE)

70 GOTO 40

 

 

this program is called dots.it picks a random dot and shows it alot on screen at random places. sometimes it makes cool mazes.

 

can you send me some short programs to type in?  i will type them in and save to disk3.  thanks!!!!!!!!!!!!!!!!!!!!!:)

 

10 CALL CLEAR

20 CALL SCREEN(4)

30 PRINT "YO GUYS.THANK YOUR FOR YOUR CODE"

40 GOTO 30



#2 RXB OFFLINE  

RXB

    River Patroller

  • 2,266 posts
  • Location:Vancouver, Washington, USA

Posted Fri Nov 6, 2015 6:15 PM

Thanks was fun to watch RXB 2015 E against XB doing this program side by side using Classic99.



#3 Tursi OFFLINE  

Tursi

    River Patroller

  • 4,453 posts
  • Location:BUR

Posted Fri Nov 6, 2015 9:27 PM

I always loved this one, a sort of kaleidoscope, and a slight twist on your dots:

 

100 RANDOMIZE
110 CALL SCREEN(2)
120 CALL CLEAR
130 FOR I=1 TO 16
140 CALL COLOR(I,I,I)
150 NEXT I
160 CODE=INT(RND*16)*8+32
170 ROW=INT(RND*24)+1
180 COL=INT(RND*32)+1
190 CALL HCHAR(ROW,COL,CODE)
200 CALL HCHAR(25-ROW,COL,CODE)
210 CALL HCHAR(ROW,33-COL,CODE)
220 CALL HCHAR(25-ROW,33-COL,CODE)
230 GOTO 160


#4 RXB OFFLINE  

RXB

    River Patroller

  • 2,266 posts
  • Location:Vancouver, Washington, USA

Posted Fri Nov 6, 2015 10:24 PM

Line 130 has to be changed to 

 

130 FOR I=1 to14

 

Or you get a * Bad Value * error in line 130



#5 Opry99er OFFLINE  

Opry99er

    Quadrunner

  • 7,604 posts
  • Location:Cookeville, TN

Posted Fri Nov 6, 2015 11:40 PM

In TI BASIC it should work..... No?

Edited by Opry99er, Fri Nov 6, 2015 11:41 PM.


#6 Opry99er OFFLINE  

Opry99er

    Quadrunner

  • 7,604 posts
  • Location:Cookeville, TN

Posted Sat Nov 7, 2015 12:39 AM

 

I always loved this one, a sort of kaleidoscope, and a slight twist on your dots:

100 RANDOMIZE
110 CALL SCREEN(2)
120 CALL CLEAR
130 FOR I=1 TO 16
140 CALL COLOR(I,I,I)
150 NEXT I
160 CODE=INT(RND*16)*8+32
170 ROW=INT(RND*24)+1
180 COL=INT(RND*32)+1
190 CALL HCHAR(ROW,COL,CODE)
200 CALL HCHAR(25-ROW,COL,CODE)
210 CALL HCHAR(ROW,33-COL,CODE)
220 CALL HCHAR(25-ROW,33-COL,CODE)
230 GOTO 160

Very nice effect!  Buck will love this one.  I'll have him type it in tomorrow.  :)



#7 arcadeshopper OFFLINE  

arcadeshopper

    Stargunner

  • 1,967 posts
  • Location:Portland, Oregon USA

Posted Sat Nov 7, 2015 1:03 AM

have him type in camelot :)

#8 sometimes99er OFFLINE  

sometimes99er

    River Patroller

  • 3,721 posts
  • Location:Denmark

Posted Sat Nov 7, 2015 1:20 AM

THE LOST PROTON

:)
 

100 CALL CLEAR
110 CALL SCREEN(2)
120 A$="1"
130 FOR A=1 TO 8
140 CALL CHAR(A*8+25,A$)
150 A$="00"&A$
160 READ C
170 CALL COLOR(A,C,1)
180 NEXT A
190 C=INT(RND*32)+1
200 FOR A=1 TO 24
210 FOR B=0 TO 7
220 CALL HCHAR(A,C,B*8+33)
230 NEXT B
240 CALL HCHAR(A,C,32)
250 NEXT A
260 GOTO 190
270 DATA 5,6,8,16,16,8,6,5
 


#9 am1933 OFFLINE  

am1933

    Stargunner

  • 1,029 posts
  • Location:U.K

Posted Sat Nov 7, 2015 3:33 AM

What about a nice short program for a hi res circle?



#10 sometimes99er OFFLINE  

sometimes99er

    River Patroller

  • 3,721 posts
  • Location:Denmark

Posted Sat Nov 7, 2015 6:48 AM

What about a nice short program for a hi res circle?

 
Well.  ;)
 
100 CALL CLEAR
110 CALL CHAR(33,"1")
120 PI=3.141592654
130 FOR A=0 TO 99 STEP PI/20
140 CALL HCHAR(SIN(A)*11+13,COS(A)*11+16,33)
150 NEXT A
  


#11 Tursi OFFLINE  

Tursi

    River Patroller

  • 4,453 posts
  • Location:BUR

Posted Sat Nov 7, 2015 8:16 AM

Line 130 has to be changed to 

 

130 FOR I=1 to14

 

Or you get a * Bad Value * error in line 130

 

It's TI BASIC, Rich. If you change that, you also need to change the CODE line. Let's keep it simple for the time being. :)



#12 am1933 OFFLINE  

am1933

    Stargunner

  • 1,029 posts
  • Location:U.K

Posted Sat Nov 7, 2015 10:11 AM

 
Well.  ;)
 

100 CALL CLEAR
110 CALL CHAR(33,"1")
120 PI=3.141592654
130 FOR A=0 TO 99 STEP PI/20
140 CALL HCHAR(SIN(A)*11+13,COS(A)*11+16,33)
150 NEXT A
  

I can do the dot thing, you bloody cheat!!!! :-D



#13 gregallenwarner OFFLINE  

gregallenwarner

    Chopper Commander

  • 180 posts

Posted Sat Nov 7, 2015 12:20 PM

Here's a quick TI-BASIC program which I just wrote to implement Langston's Ant, which is a type of cellular automaton, similar to Conway's Game of Life. If you don't know what cellular automata are, they are very simple machines created from very simple rule sets, which display complex emergent behavior.

 

Langston's Ant is played on an infinite grid of black or white cells. The rule is, the "ant" lives on one cell at a time. It checks the color of the cell, if the color is white, it flips the color to black, turns right, and moves forward one step. If the cell was black however, it flips it to white, turns left instead, and walks forward one step. Then the whole sequence repeats indefinitely.

 

My implementation here isn't on an infinite grid, unfortunately, due to the TI's 32x24 cell screen buffer, but nonetheless you can start to see some of the interesting patterns begin to emerge as the program runs. I made the screen loop back on itself horizontally and vertically, but the simulation can run for a good few thousand steps before the ant wraps around and collides with the pattern being generated.

 

You can play with certain aspects of the program, such as changing the rules, changing the playing field so it doesn't wrap around on itself, or perhaps creating an initial starting pattern to have the ant traverse over.

100 CALL CHAR(32,"0000000000000000")
110 CALL CHAR(33,"FFFFFFFFFFFFFFFF")
120 CALL COLOR(1,2,16)
130 CALL SCREEN(16)
140 CALL HCHAR(1,1,32,768)
150 X=16
160 Y=12
170 DX=0
180 DY=-1
190 CALL GCHAR(Y,X,C)
200 IF C=32 THEN 210 ELSE 360
210 CALL HCHAR(Y,X,33)
220 NDX=-DY
230 DY=DX
240 DX=NDX
250 X=X+DX
260 Y=Y+DY
270 IF X>32 THEN 280 ELSE 290
280 X=X-32
290 IF X<1 THEN 300 ELSE 310
300 X=X+32
310 IF Y>24 THEN 320 ELSE 330
320 Y=Y-24
330 IF Y<1 THEN 340 ELSE 190
340 Y=Y+24
350 GOTO 190
360 CALL HCHAR(Y,X,32)
370 NDY=-DX
380 DX=DY
390 DY=NDY
400 GOTO 250

ui05Z4j.png



#14 sometimes99er OFFLINE  

sometimes99er

    River Patroller

  • 3,721 posts
  • Location:Denmark

Posted Sat Nov 7, 2015 12:55 PM

Here's a quick TI-BASIC program which I just wrote to implement Langston's Ant, which is ...


Whauh. Had to check if I was running in CPU Overdrive. Very nice.  :thumbsup:

 

 



#15 Opry99er OFFLINE  

Opry99er

    Quadrunner

  • 7,604 posts
  • Location:Cookeville, TN

Posted Sat Nov 7, 2015 1:34 PM

Man, you guys are brilliant.

#16 BuckoBrand OFFLINE  

BuckoBrand

    Space Invader

  • Topic Starter
  • 32 posts

Posted Sat Nov 7, 2015 2:04 PM

20151107_135108_zps6ackjlk9.jpg

 

 

20151107_135119_zpszm90d2az.jpg

 

Thank you for all the AMAZING programs!:jango:

 

i typed in tursis and the circle one from sometimes99er

 

 

here is one from a book we have called smart programming guide for sprites

 

 

 

100 CALL SCREEN(2) :: A=1

110 FOR N=1 TO 28 :: CALL SPRITE(#N,61+A,16,N*6,128+65*A,0,31*A):: CALL SOUND(-250,390+10*A*N,9):: NEXT N :: A=-A :: GOTO 110



#17 RXB OFFLINE  

RXB

    River Patroller

  • 2,266 posts
  • Location:Vancouver, Washington, USA

Posted Sat Nov 7, 2015 5:18 PM

 

It's TI BASIC, Rich. If you change that, you also need to change the CODE line. Let's keep it simple for the time being. :)

Oh was running it in RXB so worked fine. Went to run it in XB and crashed.



#18 sometimes99er OFFLINE  

sometimes99er

    River Patroller

  • 3,721 posts
  • Location:Denmark

Posted Sun Jan 10, 2016 7:28 AM

What about a nice short program for a hi res circle?


Hope you like this one. :)
 

100 f=33::n=f::call clear
110 x=cos(i)*80+90::y=sin(i)*80+90::gosub 120::i=i+0.05::goto 110
120 c=int(x/8)::l=int(y/8)::call gchar(l+1,c+1,g)::if g>=f then 140
130 g=n::n=n+1::call char(g,"")::call hchar(l+1,c+1,g)
140 call charpat(g,p$)::cx=int(x)-8*c::cy=int(y)-8*l::p=int(cx/4)+cy*2::h=cx-int(cx/4)*4
150 p$=seg$(p$,1,p)&seg$("8421",h+1,1)&seg$(p$,p+2,15)::call char(g,p$)::return
 


#19 am1933 OFFLINE  

am1933

    Stargunner

  • 1,029 posts
  • Location:U.K

Posted Sun Jan 10, 2016 10:36 AM

 

Hope you like this one. :)
 

100 f=33::n=f::call clear
110 x=cos(i)*80+90::y=sin(i)*80+90::gosub 120::i=i+0.05::goto 110
120 c=int(x/8)::l=int(y/8)::call gchar(l+1,c+1,g)::if g>=f then 140
130 g=n::n=n+1::call char(g,"")::call hchar(l+1,c+1,g)
140 call charpat(g,p$)::cx=int(x)-8*c::cy=int(y)-8*l::p=int(cx/4)+cy*2::h=cx-int(cx/4)*4
150 p$=seg$(p$,1,p)&seg$("8421",h+1,1)&seg$(p$,p+2,15)::call char(g,p$)::return
 

Meanwhile on the ZX Spectrum,              CIRCLE 128,88,87

 

This would give you a decent sized circle with an execution time of less than a second :?



#20 Ksarul OFFLINE  

Ksarul

    River Patroller

  • 3,849 posts

Posted Sun Jan 10, 2016 11:36 AM

The APESoft routines in Mechatronics Extended BASIC II+ will also do a really fast bitmap circle. You can also use them as a stand-alone set of routines with regular Extended BASIC (They are called APESoft Expanded GRAFIC BASIC in German-language edition (out of Austria), which come in a nice little yellow binder, or as Amerisoft Expanded Graphics BASIC in thhe English-language edition.



#21 Lee Stewart OFFLINE  

Lee Stewart

    River Patroller

  • 3,001 posts
  • Location:Silver Run, Maryland

Posted Sun Jan 10, 2016 2:02 PM

Hope you like this one. :)

100 f=33::n=f::call clear
110 x=cos(i)*80+90::y=sin(i)*80+90::gosub 120::i=i+0.05::goto 110
120 c=int(x/8)::l=int(y/8)::call gchar(l+1,c+1,g)::if g>=f then 140
130 g=n::n=n+1::call char(g,"")::call hchar(l+1,c+1,g)
140 call charpat(g,p$)::cx=int(x)-8*c::cy=int(y)-8*l::p=int(cx/4)+cy*2::h=cx-int(cx/4)*4
150 p$=seg$(p$,1,p)&seg$("8421",h+1,1)&seg$(p$,p+2,15)::call char(g,p$)::return 

 

I thought I would try the above in TI Basic, which has no CHARPAT or multi-line statements:

 

100 F=33
110 N=F
120 CALL CLEAR
130 X=COS(I)*80+90
140 Y=SIN(I)*80+90
150 GOSUB 200
160 I=I+0.05
170 IF (G=33)*(N>34)THEN 190
180 GOTO 130
190 GOTO 190
200 C=INT(X/8)
210 L=INT(Y/8)
220 CALL GCHAR(L+1,C+1,G)
230 IF G>=F THEN 290
240 G=N
250 N=N+1
260 P$="0000000000000000"
270 CALL CHAR(G,P$)
280 CALL HCHAR(L+1,C+1,G)
290 CX=INT(X)-8*C
300 CY=INT(Y)-8*L
310 P=INT(CX/4)+CY*2
320 H=CX-INT(CX/4)*4
330 P$=SEG$(P$,1,P)&SEG$("8421",H+1,1)&SEG$(P$,P+2,15)
340 CALL CHAR(G,P$)
350 RETURN
 

It only makes one pass around the circle; but, it works the same, otherwise.

 

...lee



#22 Retrospect OFFLINE  

Retrospect

    Dragonstomper

  • 779 posts
  • Location:Wakefield, England

Posted Sun Jan 10, 2016 11:22 PM

1 REM     ELECTRON
2 REM     © 2016 RETROSPECT
3 REM
4 REM     TI BASIC
5 REM
7 CALL COLOR(10,5,16)
8 CALL COLOR(11,16,5)
9 CALL COLOR(12,16,5)
10 CALL COLOR(13,4,5)
12 CALL SCREEN(4)
15 HISCORE=0
20 CALL CLEAR
21 PRINT "      ~~~~ ELECTRON ~~~~": : : : :"       © 2016 RETROSPECT": : : : :
22 FOR V=30 TO 0 STEP-2
23 CALL SOUND(256,-6,V)
24 NEXT V
25 CALL CLEAR
26 SCORE=0
30 CALL CHAR(104,"007E7E7E7E7E7E00")
40 CALL CHAR(112,"E7E7C3A566DBDB99")
50 CALL CHAR(120,"003C5A66665A3C00")
55 CALL CHAR(128,"00183C7E7E3C1800")
60 RANDOMIZE
110 CALL HCHAR(1,1,104,768)
111 FOR L=1 TO 20
112 C1=INT(24*RND)+1
113 C2=INT(32*RND)+1
114 CALL GCHAR(C1,C2,CH)
115 IF CH=104 THEN 116 ELSE 112
116 CALL HCHAR(C1,C2,128)
117 NEXT L
120 X=INT(24*RND)+1
130 Y=INT(32*RND)+1
131 CALL GCHAR(X,Y,CH)
132 IF CH=104 THEN 133 ELSE 120
133 FOR L=1 TO 8
134 CALL HCHAR(X,Y,104)
135 CALL HCHAR(X,Y,112)
136 CALL SOUND(16,220,0)
137 NEXT L
140 CALL HCHAR(X,Y,112)
145 CALL KEY(0,K,ST)
150 A=INT(24*RND)+1
160 B=INT(32*RND)+1
170 CALL GCHAR(A,B,CH)
180 IF CH=120 THEN 150
185 IF CH=128 THEN 150
190 IF CH=112 THEN 1000
200 CALL HCHAR(A,B,120)
210 CALL SOUND(64,-5,1)
220 IF ST=0 THEN 145
230 IF K=ASC("E")THEN 510
240 IF K=ASC("X")THEN 520
245 IF K=ASC("S")THEN 530
250 IF K=ASC("D")THEN 540
260 GOTO 145
510 CH=X-1
511 IF CH<1 THEN 145
512 CALL GCHAR(CH,Y,Z)
513 IF Z=120 THEN 2000
514 IF Z=128 THEN 3000
515 CALL HCHAR(X,Y,104)
517 X=CH
518 GOTO 140
520 CH=X+1
521 IF CH>24 THEN 145
522 GOTO 512
530 CH=Y-1
531 IF CH<1 THEN 145
532 CALL GCHAR(X,CH,Z)
533 IF Z=120 THEN 2000
534 IF Z=128 THEN 3000
535 CALL HCHAR(X,Y,104)
536 Y=CH
537 GOTO 140
540 CH=Y+1
541 IF CH>32 THEN 145
542 GOTO 532
1000 CALL HCHAR(A,B,120)
1005 CALL SCREEN(16)
1010 CALL SOUND(500,-7,0)
1015 CALL SCREEN(4)
1020 PRINT : : : : :"YOU GOT ELECTROCUTED!": :
1025 PRINT "YOU SCORED ";SCORE
1026 IF SCORE>HISCORE THEN 1027 ELSE 1030
1027 HISCORE=SCORE
1030 PRINT : :"HISCORE ";HISCORE
1040 PRINT : :
1045 INPUT "ANOTHER GO? Y OR N>>>":YN$
1046 IF YN$="Y" THEN 20
1050 STOP
2000 CALL HCHAR(X,Y,104)
2010 GOTO 1005
3000 CALL HCHAR(X,Y,104)
3010 CALL SOUND(150,1324,0)
3020 SCORE=SCORE+1
3030 IF SCORE=20 THEN 4000
3040 IF K=ASC("E")THEN 3100
3050 IF K=ASC("X")THEN 3200
3060 IF K=ASC("S")THEN 3300
3070 IF K=ASC("D")THEN 3400
3100 X=X-1
3105 GOTO 140
3200 X=X+1
3205 GOTO 140
3300 Y=Y-1
3305 GOTO 140
3400 Y=Y+1
3405 GOTO 140
4000 SND=110
4010 Z=1
4020 CALL HCHAR(Z,1,32,32)
4030 CALL SOUND(Z,SND,0,SND+24,0,SND+48,0)
4040 Z=Z+1
4050 SND=SND+24
4060 IF Z=25 THEN 4100
4070 GOTO 4020
4100 CALL CLEAR
4110 GOTO 110



#23 sometimes99er OFFLINE  

sometimes99er

    River Patroller

  • 3,721 posts
  • Location:Denmark

Posted Mon Jan 11, 2016 2:23 AM

Meanwhile on the ZX Spectrum,              CIRCLE 128,88,87

 

This would give you a decent sized circle with an execution time of less than a second :?

 

;) Yep.

 

Comparing machines often leads to different opinions about what's more important than whatever.

 

Out-of-the-box the ZX Basic seems to have very limited sound capabilities compared with TI Basic. 1 channel compared with 3 channels and noise. On the other hand, out-of-the-box and back-in-the-day, I did make a small machine code program on the ZX that sampled my speech and reproduced it - at low quality but recognizable. I could not do that out-of-the-box with the TI.

 

Next we could compare floating-point accuracy, or the speed of a simple FOR NEXT.

 

These days, with emulation, add-ons and mods, - all readily available, and perhaps especially with unforgiving (besserwisser) knowledge-of-today, it's an endless, confusing and dead-end discussion. We'll never agree on which is the better machine.

 

;)



#24 mizapf ONLINE  

mizapf

    River Patroller

  • 2,158 posts
  • Location:Germany

Posted Mon Jan 11, 2016 3:28 AM

We'll never agree on which is the better machine.

I think we can already agree that we never exploited the TI-99/4A's capabilities to their full extent.



#25 sometimes99er OFFLINE  

sometimes99er

    River Patroller

  • 3,721 posts
  • Location:Denmark

Posted Mon Jan 11, 2016 4:22 AM

I think we can already agree that we never exploited the TI-99/4A's capabilities to their full extent.

 

Yep. :)

 

TI made sure that if you wanted to exploit the capabilities *), you'd have to put money on the table (one way or another, and have a very limited market). You could go a long way with most other home computers without looking deep into your pockets. If it was good or bad all depends on how you look at it.

 

These days it's another ballgame - and no markets to exploit. Yes, especially the TI seems/seemed unexploited, complicated and/or restricted, which it kind of was - at least to the masses (average Joe). Whatever, it is and gets you what you perceive. Different experiences. Unique.

 

;)

 

*) Besides TI Basic which was perhaps the only or most lucrative small business option (cassette based games).






0 user(s) are browsing this forum

0 members, 0 guests, 0 anonymous users