[ Go to Stephen's Entry Page ]
[ TI99/4a Articles index   | TI Book front page |    TI Resources Page |   PC99 Programs |   TI*MES 5    |   TI*MES 4 ]
contact - please use subject="pc99 page" to avoid spam trap!

Jump to:
Sound program by Sean O'Brien   ||   Comment by Howard Greenberg   ||   Book reviews: SAMS   ||   Animated sprite program

This web page contains the text of my articles for owners of the TI-99/4a in a series called Rambles, from Issue 7 of TI*MES dated Winter 84/85, published by Clive Scally. It is of use to users of the TI-99/4a emulators and of historic interest regarding home computer use in the UK in 1984.

Pixel drawing [Peter Brooks originated a pixel plotting routine for TI Basic and many people carried on from there. One was Jim Peterson who produced the code below. The first appearance of Peter's routine, in all its primitive glory, can be found in TIDINGS Feb 1982.

The two inputs requested require you to type two numbers with a comma between them. You can make this a bit more user friendly.

Note that line 390 checks to see if a keyboard key has been pressed and then the next line jumps to 670 if one has- the listing has a section at 670-681 which at present does nothing. Up to you what you do with it. sjs 2016]

Boundary checks have been removed for speed, so don't run off the borders.

100 REM ******************
110 REM * single pixel *
120 REM * drawing *
130 REM * by P. Brooks *
140 REM * Adapted for joy-
150 REM * stick, speeded *
151 REM * up a bit, by *
152 REM * Jim Peterson *
160 REM ******************
200 CALL CLEAR
210 INPUT "SCREEN &TRACE COL
ORS ??,?? ":SC,TC
220 INPUT "STARTING ROW & CO
LUMN ??,?? ":R,C
230 R=R*8
240 C=C*8
250 CALL CLEAR
260 CALL SCREEN(SC)
270 FOR I=1 TO 14
280 CALL COLOR(I,TC,1)
290 NEXT I
300 CALL CLEAR
310 CALL HCHAR(1,1,31,768)
320 S=72
330 DIM C$(128)
340 B$="0000.0001.0010.0011.
0100.0101.0110.0111.1000.100
1.1010.1011.1100.1101.1110.1
111"
350 H$="0123456789ABCDEF"
360 Z$="0000000000000000"
370 GOSUB 440
380 CALL JOYST(1,DX,DY)
390 CALL KEY(3,K,ST)
400 IF ST<>0 THEN 670
410 C=C+DX/4
420 R=R-DY/4
430 GOTO 370
440 Y=INT(R/8+.875)
450 P=INT(C/8+.875)
460 CALL GCHAR(Y,P,H)
470 IF H>31 THEN 540
480 IF S=143 THEN 390
490 S=S+1
500 C$(S-31)=Z$
510 CALL CHAR(S,Z$)
520 CALL HCHAR(Y,P,S)
530 H=S
540 H=H-31
550 B=C-P*8+8
560 P=2*R-16*Y+16+(B<5)
570 IF B<5 THEN 590
580 B=B-4
590 I$=SEG$(B$,POS(H$,SEG$(C
$(H),P,1),1)*5-4,4)
600 REM
610 I$=SEG$(I$,1,B-1)&"1"&SE
G$(I$,B+1,4-B)
620 I=POS(B$,I$,1)/5+.8
630 C$(H)=SEG$(C$(H),1,P-1)&
SEG$(H$,I,1)&SEG$(C$(H),P+1,
16-P)
640 CALL CHAR(H+31,C$(H))
650 RETURN
660 REM SUB PROG HERE
670 PRINT "you can put a sub
program":"here if you wish"
680 REM END SUB
681 GOTO 410

Rambles from TI*MES Issue 7, Winter 1984/85 (January 1985)

BY STEPHEN SHAW

On 19th December 1984 I received a letter from Clive asking to have copy for TI*MES 7 in his hands by 20th December. This was before domestic email or domestic faxing. My contribution was therefore rather small.

Rambles by Stephen Shaw
Greetings and Happy New Year !
As forewarned in the last RAMBLES, this edition will be a trifle shorter and less technical, due to shortage of time. (On the evening of Dec 19th I had a letter from Clive asking for copy for the 20th... I'm glad to say the copy date has been 'slipped' for me! Sorry for the delay to your TI*MES gentle reader!).

After making a loss in the last quarter equivalent to turnover, and a profit in November of two pounds(!), December has become a little busier for Stainless Software, and added to the usual business of work and family, time is in short supply! Stainless Software has seen quite a large drain on resources in the last year, and will not survive in its present form past this Summer. I am looking for ways to cut costs, inevitably this will mean dropping the magazine advertising: leaving it to personal recommendation to spread the word!

Now... I suspect everyone is mentioning THE SHOW in this issue ....
On a Saturday in November, some 88% of members attended, with a total attendance of some 1,500. Mr Brooks was taking new memberships. People continued to come in all day, some travelling long distances. Star attraction was Don Bynum (of Parsec fame) who brought along his TI99/8 ..... confused? This was November 10th, and the place was CHICAGO!

The UK SHOW I suspect attracted 1000 or so folk, many of them not members of TI*MES. I was surprised at the rate of membership drop out Clive has indicated: do you know any TI owners who are not members? Have you spoken to them? Of course a number of owners are either upgrading or losing interest in computing : I was certainly not expecting to receive so many letters this year along the lines of 'I am getting a TI for Christmas....'.

Many thanks to Howard Greenberg who made it possible for Stainless Software to attend by sharing his stand (sorry for any confusion folks!) and thereby gained an extra pair of hands to sell his modules! Many thanks too to Edwin P Lees, a Northern chain of electrical shops, who made possible the video demo of my programs, with service above and beyond the usual! Unfortunately we did not have time to produce a colour picture from the TI, which interfaces very badly to video recorders...!

I certainly look forward to further shows, but in a private capacity only... despite the crush, Stainless made a loss on the day.

SPRITE ANIMATION:
Firstly, for all you fans out there with MINI MEMORY, some TI BASIC sprites!
100 A$="1030327FF82"
110 B$="000032FF7070301"
120 FOR T=96 TO 120
130 CALL CHAR(T,A$)
140 NEXT T
150 CALL CLEAR
160 CALL SCREEN(5)
170 CALL POKEV(768,38,154,19
2,15,91,122,193,15,140,84,19
4,15,208)
180 CALL POKEV(1920,0,20,0,2
0,0,20,0,20,0,20,0,20)
190 CALL LOAD(-31878,3)
200 FOR T=96 TO 98
210 CALL CHAR(T,B$)
220 NEXT T
230 FOR T=96 TO 98
240 CALL CHAR(T,A$)
250 NEXT T
260 GOTO 200
270 END

Hows that!

Now in boring old Extended Basic:
100 A$="1030327FF82" :: B$="000032FF7070301"
110 CALL CLEAR :: CALL SCREEN(5)
120 CALL CHAR(96,A$,97,B$)
130 CALL SPRITE(#1,96,1,38,154,0,5)
140 CALL SPRITE(#2,96,1,91,122,0,5)
150 CALL SPRITE(#3,96,1,140,84,0,5)
160 CALL COLOUR(#1,16,#2,16,03,16)
170 CALL PATTERN(#1,97,#2,97,#3,97)
180 CALL PATTERN(#1,96,#2,96,#3,96)
190 GOTO 170

If you find them flapping too quickly! add in:
172 FOR T=1 TO 50 :: NEXT T
182 FOR T=1 TO 40 :: NEXT T

Reviews

SAMS PUBLICATIONS:

I have had time for only a cursory look at two packages so far, but am most impressed. I hope to review more in detail in next issue (provided they haven't sold out!):

TI99/4A BASIC PROGRAMS. Knight and LaBatt. Cassette plus 120pp book. 30 TI Basic programs plus explanations plus suggestions for amendments.
Available to download online from TI Books.
aim: to permit users to see how the programs work so that they can achieve greater knowledge about the TI99/4A and programming
aim: to suggest certain modifications to the programs that users can try on their own. These modifications provide opportunities for further learning since modifying an existing program is excellent experience in program development.
TARGET ACHIEVED! There is also a small section on program development and debugging (the most important part of computing!).
The programs include graphics and music demos, some simple games, and even two "computer tutor" programs! with 30 programs in there, the analysis of each is quite short, and the total novice will need to have his wits about him to sort out what is going on. The programs are (within the limitations of size) well written and I suspect many owners would benefit by studying the listings. The suggested modifications will lead you into quite advanced areas of programming. This package provides raw material and basic guidance: the work is for you to do! Nice package.

TRIVIA DATA BASE. Book and tape. NEEDS EXTENDED BASIC.
Available to download online from TI Books.
Don't let the name put you off. It refers to a tv quiz game. The package deals with the development of a data base: one program creates the data base, the other program is the game which uses the database.
The programs are very advanced indeed, and some knowledge is required to obtain maximum benefit from the package. The intention is to show how a fairly advanced program is developed. By following this through you can not only learn the programming 'tricks' used, but more importantly, you can discover HOW to start tackling difficult programs.
The book discusses the need for user friendliness, error checking, gives an introduction to the use of databases. Sub programs are used, and there are lots of flowcharts. This is not a book for beginners: conversely, most owners will benefit by looking through the listings. The program itself is not useless, and you will probably be able to use quite large chunks of the code in your own programs. If you would like to develop a database, read this first.


Sean O'Brien was an early TI user who spoke to me on the phone many times. We have never met- he did call round once when I was at work! I think this is the only TI article by Sean who went from using the TI99/4a to a job in computing, with a move to Japan to follow. He lived in Japan for fourteen years, then New York, now working for an American financial institution.

SHAPING TI SOUNDS by Sean O'Brien:

wondering how to get your TI to sound better? Well, here is the answer:
when specifying a CALL SOUND on the TI, you must enter:
DURATION
FREQUENCY
VOLUME
e.g. 10 CALL SOUND(1000,239,0)

The duration being a number between 1 and 4250.
The frequency is a number from 110 to 44733, and the volume is a number between 0 and 30: 30 being the quietest.

The TI also offers you the capability of using one of eight noises. These go in place of the frequency:
e.g. 10 CALL SOUND(1000,-3,0)

The noises are very good for explosions and go from -1 to -8.

Single note sounds do not go very well in some programs that play music, TI lets you define a three channel sound (or chord). You can also include a noise:
10 CALL SOUND(-1000,110,0,111,0,112,0)
20 GOTO 10
or
10 CALL SOUND(-1000,110,0,111,0,112,0,-3,0)
20 GOTO 10
The minus value in the duration cuts out the problem of a delay between two sounds, very useful in some short music programs.

You want a short routine that can give interesting results, so try this:
10 FOR V=1 TO 30 STEP 2
20 FOR T=110 TO 230 STEP V*2
30 CALL SOUND(-100,T,V)
40 NEXT T
50 NEXT V

You can replace line 30 with: CALL SOUND(-100,T,V,T+1,V,T+2,V)
or with: CALL SOUND(-100,T,V,T+1,V,T+2,V,-8,0)

This short routine will change the volume from 1 (loud) to 30 (hsssh) and at the same time jump through the frequencies from 110 to 230 stepping through the volume, doubled. As the volume reduces, the stepping is larger and the sound 'gets faster'.

Small routines are great for many things in a program, losing a life for instance:
10 FOR L = 230 to 112 step -10
20 CALL SOUND(100,L,4,L-1,4,L-2,4,-3,6)
30 NEXT L

Notice that to generate interesting sounds it is usually necessary to include loops like this.

The next program will read two numbers from a DATA statement, and will perform the sound loop using them. It will check the final figures to see if they are the same as the final two data values, and if so, it will RESTORE the data statements ready to be re-read. Otherwise it will take the next two data values and use them.

If you change the numbers in the last DATA statement, change also the CHECK value (line 260) or the program will crash! Just add 100 onto the last value used.

This program runs slightly better in Extended Basic due to the faster processing speed:
100 RESTORE 290
110 CALL CLEAR
120 CALL SCREEN(5)
130 READ A,B
140 FOR LOOP=1 TO 10
150 V=30
160 FOR L=0 TO 30 STEP 10
170 FOR K=A TO B STEP 5
180 CALL SOUND(-1000,K,L,B,V,A,V)
190 V=V-1
200 IF V=3 THEN 210 ELSE 220
210 V=30
220 NEXT K
230 NEXT L
240 A=A+10
250 B=B+10
260 IF B=999 THEN 100
270 NEXT LOOP
280 GOTO 130
290 DATA 600,650
300 DATA 110,120
310 DATA 893,899
320 END



Howard Greenberg (Arcade Hardware) wrote:
With bated breath (and stifled yawns) you'll all be wondering what mistake I've made this time. Has the idiot blown up the 99 by trying to control his central heating by dropping it in the boiler ? well no (but the idea did occur to me), I'm simply adding my own four ha'pennyworth to the comments that have been bound to have come in from other readers who attended the first T.I. owners convention in Manchester on November 3rd.

To those of you who were making their first visit to Manchester, I'm sure you'll now appreciate why it's called the Rainy City.

So what was my mistake on the 3rd November ? The answer is that I wasn't prepared enough for the incredible number of people who turned up. Or put another way, the event was too successful. Full credit to Clive and Audrey, for their determination to organise the event. I had a very successful day, I'm a compulsive talker and too many people didn't have enough time to talk with me.

Amongst those were people who'd made the trip from as far north as Aberdeen (and other places in Scotland that I can't pronounce) only to have my hand shaken with 'Hi, I'm so-and-so', 'Great, nice to meet you at last, I'll talk in a minute'. But the minute never materialised, and I think that some went home frustrated. Some went home very happy, if I ever find out who it was who helped themselves to several of my modules, I'll wring your necks and enjoy doing it.

Some folks were very patient and courteous, like the gentleman from Bristol, who queued for around 29 minutes only to prove he was a gentleman when his turn came by letting a lady in ahead.

I missed out too. There were a lot of people whom I was looking forward to meeting, with whom I only had the briefest of introductions, before someone elbowed in. But, thank you all. In particular, Russell who helped me in and out with all the gear, Ivan and John who helped me home (No I wasn't drunk) and Matthew who helped on my stand. And 'we must do this again sometime.'

Clive Scally reported:
In spite of the pressure of new computers, the Nationwide TI users convention held at the RITZ Manchester in November was very well supported indeed. Over a 1000 people came, it was an unprecedented response. TI Users from Scotland to Cornwall made the effort for the one day show.



Read about addfreestats visitor tracker, the data your browser reveals and how you may control it.

[ TI Book front page   |    TI Resources Page    |   TI Articles    |   PC99 and MESS Programs ]