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

TI-User was a small magazine published by Galaxy in Maidstone, a small retailer, aimed to support their customers with Texas Instruments TI99/4a Home Computers - with creative input from Lantern Software. The content is valid for users of the TI99/4a emulations including MESS. This is the third issue of their magazine, with a cover date of February 1984.
TI User 1 || TI User 2 .
Dear TI-User,
Welcome to the third edition of TI-User. Once more we have managed to add a few more pages and pack in more programs to type into your trusty TI-99/4A, plus programming hints and ideas and answers to user's letters.

This issue we have concentrated somewhat on the unexpanded machine with special attention to file handling from Basic with a single cassette recorder and also with coverage of the basics of games programming. Now is your chance to discover the mechanics of moving, crashing and blowing up characters on the screen.
Most of what is written applies also to Extended Basic but with that language it is possible to add extra dimensions to each idea. In the next issue of TI-User we shall be concentrating in depth on the Extended Basic language with both games and programming ideas.

Well, by now most people will know that TEXAS have pulled out of the home computer market, distressing news but what will it mean for Texas owners? In the long term, it is eventually going to mean that people will stop buying TI computers (Yes, people are still buying them, after all, at around GBP 80 they represent amazing value), it will also mean that in the long term, TI official software is going to run out, indeed stocks are withering a bit now. This, however, is not the end of the story and there are several points I would make concerning the TI 99/4A.

Firstly, for those who have never used a computer other than the TI, let me assure you that the Basic on most other machines is very much harder to come to grips with and is not as clearly set out. One of the TI's major advantages for both newcomers and youngsters is that the Basic is clear, efficient and almost self- explanatory with a little experience. This has meant that a significantly high proportion of users program their computer for family use. With its excellent, hardwearing keyboard and bright colourful graphics it makesa perfect family machine.

The second point I would make is that there are a lot of these machines in the country - TI themselves decline to comment on their sales figures, but broadly speaking there are probably between 50,000 and 100,000 - this means two things; software companies will continue to support the machine with independent programs and there will always be second hand cartridges and hardware and maybe by the next issue of TI-User we will be able to offer some assistance in this direction.

The TI-User publication will continue to be published on a quarterly basis for so long as it is viable to do so. Ultimately of course this depends on you, the subscriber, because without you we would be talking to ourselves as well as losing money.

Under normal circumstances of course Annual Subscriptions would be taken starting from any issue. However, because of the changed circumstances we would ask for a commitment from subscribers by renewing their subscriptions until the Summer 1985 issue, thereby ensuring continuity from an editorial point of view. We are sure ~ that our readers will appreciate the need for this request and we hope that the content of TI-User will encourage subscribers to fill in the renewal form at the back of this issue.

I hope these comments make sense to some of you and would mention that Lantern Software plans an expansion of its current range for the TI and GALAXY are adding to their range all the time and therefore both companies will continue with their support of this machine for as long as there is a demand for our services.

Remember, back issues of TI-User are still available from Galaxy at 75p per issue. For those wishing to write, the address is:TI-User


LETTERS

Dear TI-User,
I was more than pleased with my first issue of TI-User (your Issue 2)... the magazine is indeed good value for money and helps fill the void in publications for users of the TI 99/4A.
I hope that the recent announcements in 'Electronics Weekly' and 'Computer News' that Texas are to discontinue production of the home computer does not mean that such publications will disappear also.
I.THORPE LANCS
******
Galaxy and Lantern Software do not in any sense plan to 'desert' Texas owners and production of the TI-User magazine will continue for as long as there is a demand for our service. It is therefore up to TI-Owners to make their support apparent. We will continue to supply answers to queries and help with programming problems and to provide news and information on a regular basis. Most importantly, though, we will continue to provide a vehicle for TI Users to communicate. Make use of us.


Dear TI-User,
I am writing to tell you about the book 'Kids and the TI 99/4A'. I think it is a very good book to help you program your computer. It is excellent that at the end of each chapter there is a test to see if you have understood the work properly. It is easy to follow and well worth the money.
The book is available as a zip file from TI Books I also have the Tunnels of Doom module and would be very pleased if you could tell me if there will be any more games for the module soon.
CHRISTOPHER MILLS COULSDON
*****
Thank you for your comments on 'Kids and the TI 99/AA' which is one of a whole series of newly released or imported books on the TI. Many of these books are very good and we will be reviewing them, a few at a time in our books section.
Alas, I fear that there will not now be any additions to the 'Quest for the King' in spite of the superb potential of the Tunnels module. Unless TI make a dramatic change in their attitude to software supply (which is unlikely) then additions to the range cannot be hoped for.
Dear TI-User,
I have a TI 99/4A and I have tried to put last season's football results on tape with a file number. This I have done but when I try to get them out again all I get from the computer is 'Can't do That'. yet I know they are on the tape.
I know I could keep them and list them if I just used the SAVE CS1 and then OLD CS1 but I would like to file them properly. So could you explain how I can get back to my files.
L. CLARKE IPSWICH
******
Files are a common problem and the cause of many gnawed fingernails, so this issue the Basic Programming section will be giving extensive advice, showing simply how to create a file, save it on tape and then recover it with the minimum of hassle.
Related to this problem, some people have bought TI's Personal Record Keeping Module or a similar file based program, only to find that it does not do exactly what they want.
No program which is written with a wide range of uses in mind can ever hope to deal with serious problems in a way which will suit every user's requirements. This quite simply means that your requirements will have to be tailored to suit the program. Unfortunate though this may seem, the only real alternative is to write the program yourself, which, so long as you don't need much more than a storage and recovery system, should not prove too difficult. Try it - you will probably surprise yourself
Dear TI-User,
After purchasing the Mini-Memory and finding it very useful in speeding up many Basic programs, I find some difficulty in trying to write and understand assembly language programs. I understand that the Editor/Assembler manual is available and could possibly help in understanding the complications of this language, but could you please run a series of articles to make this problem easier ?
The program included with the Line-by-Line Assembler is very impressive and causes me to ask if a program could be written to draw single lines and shapes such as _ triangles, squares, circles etc ? Also can this program be called up with 'CALL LINK' in a Basic program which could ask the user to input various parameters to build a specific shape from single lines.
D.A. WHITAKER LEEDS
********
Firstly, if you have any intention at all of writing assembly language, I would recommend the Editor/Assembler manual. Without this fund of information you are unlikely to get anywhere. Secondly, yes we can run some articles on the Mini- memory, especially now that more people seem to have them.
The program you mention, to draw lines of pixels from Basic is entirely possible, just as you have described it. Indeed, a full listing of an assembly program which will do all you describe is printed in the December 1982 issue of '99 er magazine - available from Galaxy.
Dear TI-User,
I have recently bought the Mini-memory for the purpose of using the assembler but the Editor/Assembler manual is very hard to follow and the MM manual itself does not help much, unlike other TI manuals. It would be a good idea to start up a section on programming in assembler. So far your 'TI TIPS' have been very well written.
I have two questions which may seem elementary but they have caused confusion. A) Can you SAVE Mini-memory programs: if so, how ? B) When you have finished entering a program how do you run it
I recently bought a book from the U.S.A. - the 'Smart Programming Guide for Sprites' from Miller's Graphics. I have found this most informative. It explains how to make sprites pick up objects, eat up dots and lay trails. Also some useful memory locations are revealed. Extended Basic is required, the book itself cost $5.95 + pp $3.50. I consider it to be excellent value for money.
STEPHEN CAYZER BEACONSFIELD
Available as a zip file from TI Books.
************
Thanks for that Stephen, why not let us in on those useful memory locations and if you could dig up the address where the book came from perhaps we could publish it? SAVEing and LOADing to and from the Mini-memory is done via the EASY BUG. (See pages 64 to 70 in the Modules user manual).
To SAVE the whole of the 4K RAM, select Easy Bug, type S 7000 and press enter. The response TO? will appear. Type 7FFF and press enter. The cassette recorder prompts will then appear on the screen.
To LOAD a machine code program, the easiest method is the 'L' option in Easy Bug. Select Easy Bug and push L. The prompts will then appear on the screen.
To RUN a program in the 4K RAM area you must place a name and the start address in the so-called REF/DEF table which starts at 7FFFh (web note: >7FFF or hex 7FFF) and works down. The method is described at the back of the Line-by-Line Assembler manual. You may then use the run option and enter the program name. Alternatively, select Easy Bug, type E and the start address of your program, e.g. E7D00.
Dear TI-User,
Can you help ? My TI 99/AA was purchased on the U.K. market but I am stationed in Holland and the PAL modulator is not compatible with the Dutch T.V. Consequently, I have pictures but no sound.
I have tried, unsuccessfully, to obtain a PAL modulator on the Dutch market. Is there a way to convert my current modulator - or maybe some of your other overseas readers can help.
Thanks in anticipation.
Cpl. I.D.WEBB BFPO 18
(web info- the PAL modulator for the UK was made in France and TI never quite got the sound and picture right. One was properly tuned in or the other. The UK uses a PAL variant, with the sound a different "distance" from the video to the rest of Europe.) ********
Below are instructions for adjusting the sound (this must be done with a non-metallic "screwdriver" device - we recommend a plastic tuning tool or a trimmed matchstick). There are two styles of Pal Adaptor - metal or plastic.
Metal: Inside the box you will find a smaller box. There are four adjustable coils in the top of this box. The one for sound is the coil furthest from the antenna input. Adjust for sound with picture.
Plastic: Inside, again, a small metal box. This time with three diagonal holes. You adjust the centre one of the three. This should do the trick.
BOOKS

This issue I want to review two books which are both excellent value and which cover in different ways both the applications of the TI 99/4A and the practicalities of using it to the full.

The first of these books is called 'How to Feel at Home with a Home Computer' with the claim 'This book answers the question: What are home computers for?' inscribed hotly on the front cover. The title is somewhat misleading since the book actually covers in some considerable detail our hero the 99/4A. The book opens with a discussion on what a computer can do and how it does it, with direct reference to the TI 99/4A and with the help of diagrams and flowcharts. It discusses in uncomplicated language what goes on behind the keyboard and how certain types of computer program can be used in certain applications. This is all very enlightening and the sections covering software are interesting since they deal with many of the TI Solid State modules.

The main bulk of the 250+ page book, however, takes the reader right through the TI Basic language, covering everything from dimensioning arrays to colouring graphics, and it is here that the book excels. Detailed flow diagrams, drawings and example programs help the reader from the simplest to the most complex ideas.

In general, I would recommend this book to anyone wanting to take their Basic programming a little further than the scope of the user manual and develop programs which are both fun and full of practical possibilities. The books detailed coverage of how to write anything from games to educational software will delight many TI owners. Price GBP 12.95 from GALAXY.

The second book is called 'Getting Started with the Texas TI 99/4A' and is written by Stephen Shaw. Mr. Shaw is someone who has been around Texas computers for some time and has much experience dealing with the particular problems of TI owners. He is also a supplier of cassette software under the name Stainless Software, a name which I am sure many readers will recognise. Having said this, it will come as no surprise to find that from the opening pages of the book to its end each subject is discussed with user's problems in mind and this has lead to a delightfully clear style which leaves no room for confusion.

Whereas the first book discussed could be thought of in much the same way as a user manual, this book takes the reader through the Basic language, Extended Basic, peripherals, modules as well as highlighting certain sticky areas such as File handling and using cassette recorders with the TI, and does it in such a way that you come away having discovered at least one or two new things every time you pick the book up.

I would recommend this book to anyone with a TI simply for the insights it provides into your machine, on top of this it makes an excellent reference book and will stimulate many ideas. To my mind this is probably one of the most useful books for the TI 99/4A, Price GBP 5.95 from GALAXY.


Russell Packer (aged 10) writes to tell us about the book 'Tantalising Games for your TI 99/4A' written by Hal Renko and Sam Edwards.

[Those names appear to be fictitious, used for books published by Addison Wesley actually written by a number of authors. They gave the appearance of a series. The original authors had no option to "assert their moral right" to be associated with their work! Zombies in the Swamp is the first listing in a book called "Terrific Games for your TI99/4a" by Renko and Edwards...]

Half of the games in this book are in Extended Basic and fairly short but good. The first game (Zombies in the swamp) took a bit to work out and when I did, it was very easy and not too good for Ext-Basic. The main object was to place rafts along a swamp, get out the other side and avoid the zombies.

'Parrot' (in TI-Basic) is a letter copy game where the computer prints a letter on the screen and you have to press that key. A very simple game but good for young users.

'Kentucky Derby' is a horse racing game which is very funny to watch and makes you want to see it again to have a good laugh.

'Treasure Hunt' is a maze game in TI Basic where your're a man going round and collecting dollars. Sometimes a 'bird' comes to get you and you press the space bar to get rid of it. The game is all right for TI-Basic.

'Highway' is an excellent short Ext-Basic game. This game is a lot like frogger except there is no river, only a road. You start at the bottom of the screen and make your way across, avoiding the cars.

'Ship Attack' is a stupid, almost nothing, game. You are a blob in the middle of the screen and you just dodge blocks coming towards you. For Ext-Basic it has a low level of play.

On the whole, the book is good value for money. Price GBP 3.95 from Galaxy.

**** *************************-*

BOOK STOP PRESS

Just prior to going to press with this issue we have received news of two new books which are now available. Titles are :

THE TI 99/4A CONSOLE AND PERIPHERAL EXPANSION SYSTEM TECHNICAL DATA PRICE gbp 8.99 (Contains wiring diagrams etc)

INITIATION INTO THE TEXAS INSTRUMENTS 99/4A ASSEMBLY LANGUAGE PRICE gbp 19.95


COMPETITIONS

The junior competition in the second edition of TI-User was to describe what is meant by the statement :
Let A=100
as used in a program. The competition has been won by Julian Bannor of York (aged 9) with the following explanation:
Let A=100 means that when you print A it will show 100. It makes A into a variable. You don't have to use Let, you can just put A=100. Say you wanted to remember the score in your game, you could go Let A=A+100 every time you shoot the aliens. It means you can store it all up to print it at the end

*******************************

The second competition, which was to write a short program using joysticks, has been won by Paul Carpenter of Bristol (aged 9) who sent an excellent little program that allows you to draw in low resolution on the screen. First choose a colour for the cursor and then move the joystick with the Alpha Lock up. To eraseyou just press the fire button as you move.

(Program listings, using really low resolution dot matrix printers and copied not very well just can't be OCRd, sorry)


MODULES
Well, here we are in January with no sign of the EMI modules, a sign no doubt that they, like many other TI supportive companies, have developed a severe case of cold feet due to the withdrawal of TI. Whether or not they do finally release their games may well be influenced by the attitude of TI owners and to this end I have listed EMI's UK address for anyone who wishes to prod them a bit. The support of a company like EMI would be extremely important at a time like this and a few enquiries from TI owners may revive their interest. I would mention that the EMI modules represent probably the highest quality games software I have seen for the TI ... with the exception of one new cartridge.

Donkey Kong Yes, that is right, there is now a cartridge based version of Donkey Kong available for the TI. It is produced by Atarisoft a division of Atari (the computer and games manufacturers) and is one of NINE new releases I The graphics are excellent, rivalling those of any machine and the game itself is possibly the best for the TI yet. There are four different screens, barrels, fireballs, lifts and conveyor belts and these are well represented although the wizard on the lift screen of the original has been left out.

For those who have never heard of Donkey Kong (is there anyone?), the game involves moving a little stubby man called Mario up four flights of scaffolding to where Kong is holding his girlfriend. Getting in your way are barrels which roll down the scaffolding towards you and which you must either smash with a hammer or jump over, fireballs which pursue you as you remove rivets from the scaffolding, lifts onto which you must jump with great dexterity and finally conveyor belts which hamper your progress. The price is around GBP 24.95 but for a game of this standard I consider that to be not unreasonable.

So far I have only seen four of these modules, the others due to be released at the end of the month, but the standard is fairly high. Pacman is a good version of the game originally produced by Atari and copied by just about everyone. After Munchman, some people will find this game a little slow.

Protector II involves flying a ship over a horizontally scrolling landscape and transporting survivors from a city threatened by an erupting volcano tothe safety of a fortress. This made all the more difficult by alien ships which continually harass you and a flying saucer which dumps the survivors into the volcano ! There is a good musical introduction but the movement of the ship takes some getting used to.

The fourth game, called Picnic Paranoia, finds you guarding four tables of food from an attack of ants, intent on dragging away the picnic goodies. You must race about, swat the ants away, drag the food back onto the tables and at the same time avoid a potentially painful attack by a wasp. As your score increases you earn 'sprays', this is a giant spray can which clears all the ants from the screen. This is a fairly original game and fun.

On their packaging Atarisoft list eleven games, not all of which are due to be released shortly although they do add that 'there's much more to come'. Games listed are : Donkey Kong, Pacman, Centipede, Defender, Dig Dug, Stargate and Robotron 2084, Shamus, Protector II, Picnic Paranoia and Super Storm.

If all promises are kept and Atarisoft continue as indicated perhaps TI owners will discover a new source of software to replace ailing Texas stocks. There is yet hope
EMI UK, Thorn FMI House, per St. i ne, London C22 9[ Tel: (01) 8'56 nlm


BASIC PROGRAMMING

File handling with a single cassette recorder from Basic.

[web note- in this article the word draw has been used many times, the author means drawer but I have left the original spellings for historical interest]

Since the storage of information is one of the things that computers are specifically good at most people will find that they will at some point wish to store substantial amounts of data in a structuredmanner. Without access to a disk drive the data will have to be stored on cassette tape, just as you would save a program. The only difference is that you now wish to store your data in a structured way so that you will be able to locate it later and search it as quickly as possible. Imagine an office filing cabinet; the first thing you must do to store a file is to open it. The cabinet has several draws so you must number each draw. So you must decide which draw you want - let's say draw one - and open it. Similarly, in basic we must first open a file.

OPEN #1

The # symbol simply stands for the word 'number'.

Having chosen the draw, we must now inform the computer of the type of 'cabinet' we intend to use. In other words we must tell it whether we are using a disk or a cassette recorder. We are using 'CS1' so :

OPEN #1:"CS1"

Now that the file is open, the rest of the statement must inform the computer of how the data is to be structured. The possible variations are as follows :

INTERNAL or DISPLAY : SEQUENTIAL or RELATIVE : INPUT or OUTPUT

These are simply different methods by which the computer will encode your data onto the tape. Display will store the data in printable ASCII code but this method is inefficient and impractical when using cassettes. For this reason we will select internal.

OPEN #1: "CS1", INTERNAL

Sequential or Relative refer to the method by which the data will be sorted and this will affect the method by which you will later come to search your data. If you select Relative, the computer will allow you to skip say, the first ten files on the tape and read the eleventh, which is useful. With sequential processing, the computer expects you to read the files in the order they were printed into it. This option is simpler. Page 119 of the User's Reference Guide explains that the sequential option is assumed by the computer making it unnecessary to include it in the open statement, if you wish to use relative files you must say so.
Input or Output tells the computer that you wish to OUTPUT data from the memory to the cassette recorder, or INPUT data from the cassette to the computer's memory.

When you first create a file you need to OUTPUT to the cassette.
OPEN #1: "CS1", INTERNAL,OUTPUT

There is one more set of parameters which should be taken into consideration named FIXED or VARIABLE. This parameter defines the length of file in bytes (one byte is enough memory to store one letter) and should be followed by the number of bytes you wish to allow. If you use RELATIVE filing you must use FIXED.

If you don't put a number after the parameter, the computer assumes 64 as the default.

OPEN #1: "CS1", INTERNAL, OUTPUT, FIXED 128

So now the draw of the filing cabinet is open. It is draw number one, in a 'cabinet' called "CS1" and your files will be stored by the computer SEQUENTIALLY, i.e. in a strict order, using INTERNAL - a memory efficient format - we intend to OUTPUT data to the draw from the computer and the length of each entry will be up to 128 bytes (remember a byte of memory is enough to store one letter). With FIXED format, the computer will 'pad out' any entries shorter than the length stated with spaces so that each entry constitutes an entry of the maximum length.

With the draw open, we now want to store our data. This is done with the PRINT statement, Simply tell the computer to print your data into draw number one. PRINT #1:"HELLO" This statement will store the string "HELLO". You can use the same line to store numbers or you can even store both strings and numbers e.g.
PRINT #1:"HELLO", 45,65,23,200,A$,F1

This line stores the string "HELLO", the numbers 45,65,23,200, the string A$ (which you have previously defined in your program e.g. LET A$="MYNAME") and finally it will store the numeric variable F1 which has also been set up previously e.g. LET F1=778.

It is usually best to string all these different types of data together in one statement and enter them all at once in the interests of saving time and memory. Don't forget, however, the maximum length of any one entry.

Having placed all the data you require in the file, you must now close the draw.

CLOSE #1

and now your data is securely stored away on tape. How then do we get it back ?

First we must remember which draw we stored our data in and then re-open it. We must also re-inform the computer of all the parameters we used to structure our data in that file (i.e. whether it was Sequential, Internal etc.). It is probably a good idea to keep written notes at first, especially if you intend to open more than one file in a program. If you do wish to do this, it is important to note that only one file may be opened at a time, so close the last before opening the next one. Anyway lets re-open our file i.e. draw one.

OPEN #1: "CS1",INTERNAL,INPUT,FIXED 128

One important difference - where we had OUTPUT before, we now have INPUT, telling the computer that we are going to read data from the file to the computer. Having opened the 'draw' again, to read our data we must use the INPUT statement.

INPUT # 1: A$

Presuming that the first value we read into the file was the string "HELLO" then this string will be read into the variable A$. If, when you were entering data to the file, you entered first a string, then a number, then a number, then another string, you will have to read from the file into corresponding variable i.e. first a string variable such as A$, then a numeric variable such as ST, then a second numeric variable such as PP, and finally a string variable like TT$. So, if we used

PRINT #1: "HELLO",45,65,23,200,A$,F1

to print our data into the file, we will have to use a line like this

INPUT #1: P$,A,B,C,D,XX$,C

to read the values from the file. As you can see, the names of the variables don't have to be the same, you just have to match up strings in the file with string variables and numbers in the file with numeric variables.

Having read the data from the file it only remains to close the 'draw' again. CLOSE #1

There is one last important fact to consider when using files in a program and it is this. When you OPEN a file, you will get the cassette recorder prompts on the screen so never open a file in the middle of a graphic display

I hope there is enough here for most people to be able to make a start.


SPEECH AND THE 99/4A

Article written by Stephen Shaw

Texas Instruments were among the first to bring synthesised speech into the home, and the Speech Synthesiser peripheral enables you to own a talking computer. The speech synthesiser will not work with the console on its own, but requires an appropriate module.

It can operate in many ways, and different modules make different uses of it. SPEECH EDITOR and EXTENDED BASIC modules make the same uses, and can be considered together. With Speech Ehitor, your TI BASIC program can talk, with Extended Basic your ExBas program can talk.

Both modules use a common vocabulary of about 400 words, but these can be shortened to produce additional words: for instance, you can reduce diskette to disk. Extended Basic is sold without the information you need to use the speech capabilities, so we will cover the missing points here fairly fully. CALL SAY is the subprogram you are most likely to use, and it is used in the format: CALL SAY("HELLO")

Words can be placed together, such as CALL SAY("HELLO, HOW ARE YOU"). Notice the comma ? Punctuation provides different lengths of silence between words. + is no pause, space is a short pause, then comma, on up to a full stop which is worth nearly a one second break. Punctuation can also be strung together: CALL SAY("HELLO+HELLO+HELLO;,,HELLO")

The vocabulary list includes some phrases, such as TEXAS INSTRUMENTS. If you use CALL SAY ("TEXAS INSTRUMENTS") the computer will spell those two words as though they were not in the vocabulary... because, TEXAS is not in the vocab, and neither is INSTRUMENTS.

The two words have to be linked as a unit, and this is done with # You need to use: CALL SAY("#TEXAS INSTRUMENTS#")
# is also used for instance for ("#.#") or ("#-#") ... try it

The default if you use a character the computer cannot say is UHOH.
You may notice CALL SAY takes a while to execute, as the l..o..n..g string of instructions is fetched from the synthesiser each time.
It is possible to shorten these delays by using CALL SPGET, which is used to load the instructions into a string which is then used with CALL SAY.
e.g. CALL SPGET("HELLO",A$) places the code for HELLO into A$.
To use CALL SAY, the computer is instructed that a decoded string is going to be used by placing a comma before the A$:
CALL SAY(,A$)
If using more than one string, use: CALL SAY(,A$,,A$,,A$) etc.
You can also use a mixed format: CALL SAY("HELLO",A$,"HELLO")... notice, two commas between each decoded string, and one comma separating a decoded string from a word string.

I mentioned above that you could chop the ends off words to form new words or sounds... this is done by obtaining a decoded string with SPGET and then using SEG$ to chop off its tail.
You cannot use SEG$ to chop off the beginning, as the first few bytes detail synthesiser operation rather than actual sound, and some strange results may be obtained ...

Example: To make DISK from DISKETTE:
10 CALL SPGET("DISKETTE",A$)
15 B$=SEG$(A$,1,45)
20 CALL SAY(,B$,,B$,,A$)
Try it

As mentioned earlier, words not in the vocabulary are spelt. If you deliberately want to spell a word you may vary the speed by using punctuation. Compare the time taken to spell each of the following:
CALL SAY("ELEPHANT")
CALL SAY("E L E P H A N T")
CALL SAY("E+L+E+P+H+A+N+T")
Try other punctuation: - , ; :
Extended Basic even allows you to find out if the synthesiser is attached, as SPGET will always return the code for UHOH if it isn't.
10 CALL SPGET("P",A$)
15 IF LEN(A$)=60 THEN PRINT "SYNTH ATTACHED"
20 IF LEN(A$)=84 THEN PRINT "FORGOT THE SYNTH"
TRY IT

Having unpacked your speech synthesiser, you could perhaps notice a hinged lid at the top... no, it is not an ash tray. It was intended to allow miniature modules to be inserted to extend the vocabu1ary... but that became obsolete before they were marketed, as on to the scene came:
TERMINAL EMULATOR 2 MODULE

But more of this module in the next issue (this article by Stephen Shaw)


REVIEW - DEFENDER

A game cartridge from ATARISOFT for the TI-99/A
. During the course of writing this magazine I have received a copy of DEFENDER, one of the family of games cartridges recently released for our machine by Atarisoft.

This, of course, like Donkey Kong, is one of the arcade classics and possibly one of the most challenging games ever to have been released on the arcade circuit. The idea is that you are in a space ship flying back and forth above the surface of your planet. On the planet are several 'humanoids' representing your own people. It is your task to defend these humanoids from the attack of a myriad of different assailants from outer space.

This is not, however, just another 'space invaders' rip-off, each of the different types of alien has a specific purpose and an intelligence of its own - in fact its hard to believe that so many things can be happening in one game at the same time

Here is a short rundown of the different alien types: The Landers will kidnap humanoids and take them up to the top of the screen where they become Mutants (which attack you), they also fire at you. The Bombers lay mines across the screen which you must avoid. Baiters are vicious creatures which appear if you take too long to finish a sheet, they move faster than you, home in on your ship and fire at you. Mutants are desperate creatures who spare no effort to throw themselves at your ship. Pods are dangerous because they release hordes of Swarmers when hit. Swarmers pose a problem because there are so many of them.

The surface of the planet is actually longer than the screen so only a part of it (the part you are flying over) is displayed on screen whilst the whole of its length can be seen on a scanner. This scanner shows your position above the planet, the planet surface itself and the positions of the various aliens. As you move from side to side the entire screen scrolls so that aliens that were off screen before come into view. The whole game is well represented and is close to the original.

The main advantage of this home computer version is that you are not presented with the bewildering number of keys to push that you are in the arcade version. Joystick control allows you to concentrate on the game and not worry about how many fingers you are supposed to have. The lack of keyboard control does, however, mean that you must have joysticks to operate the game. Pressing P will pause the game, the space bar allows you to use 'Smart Bombs' which will destroy everything on the screen at the time you use them and pushing any other key will 'hyperspace'you to another part of the planet (a dangerous operation often ending in the loss of a ship).

In all, this is an excellent rendering of an excellent game which, if you enjoy a challenge, is well worth owning.


MINI-MEMORY

We have now had sufficient enquiries concerning this module to warrant maintaining a section covering its uses, the fact that most retailers have now run short of stocks would also seem to support the idea that many people have recently bought the module.

The main difficulty is that the manuals are aimed at those who already have certain specific knowledge about the machine e.g. about the assembly language. What I shall attempt to do with this section of TI-User is to try and open up some of the modules locked doors and display some of the treasures which lie beyond. Indeed, with this module, the whole machine is at your disposal.

First, then, it is important to distinguish between the two main types of memory (Random Access Memory). The first is called VDP RAM and the second is called CPU RAM. VDP RAM controls the display and stores your Basic program whilst CPU RAM can be used to store data or machine-code programs. Machine code programs cannot be run or stored in VDP RAM. If you look at pages 71, 75 and 76 of the manual which comes with the module you will find charts which are known as memory maps.

To begin with we will concern ourselves simply with the VDP maps.
The 16K memory block has been arranged on the map into tables and each table is set aside for a specific purpose. Along the left and right of the maps are numbers which represent the start and end addresses of each table, on the left the numbers are represented in hexadecimal (to the base of 16) and on the right the numbers are in the normal decimal notation.

What is the meaning of the addresses? Just as a postman will use the address of your house to locate you, so you must know the address of specific bytes of a memory. For example, looking at the VDP map, we can see that the table marked screen starts at address 0 and ends at address 767 giving us the addresses of 768 bytes - exactly the same number of printable locations on the screen (32 by 24).

Each of the bytes in this table represents one of the characters on the screen, with the byte at address 0 representing what is displayed at the top left corner of the screen and the byte at address 767 representing what is currently displayed at the bottom right of the screen - interesting.

Now supposing there were some way we could directly alter what was stored at these memory addresses then we would have a new way of printing things on the screen. Well there is a way provided by the Mini-memory and the command is called CALL POKEV. With this command we can place a byte of information directly into any memory location in VDP RAM. For example the following lines will result in an 'A' being printed in the centre of the screen.

100 CALL CLEAR
110 CALL POKEV(367,161)
120 GOTO 120

Line 110 is the only line doing anything important. The first number is the address in VDP RAM we are going to alter and 161 is the value we are going to place here. Due to a peculiarity of the TI, when poking values to the screen we must add an offset of 96 to the ASCII code of the character you wish to display. Which in this example gives us 65+96 = 161.

What, I hear you ask, is the advantage of doing things this way? The short answer is that it is much faster than the normal method of writing to the screen.
There is though another more important aspect and that is that the screen is not the only table we can directly alter, there is the whole memory mapped out for us.
Before going much farther it is worth mentioning at this point that the complementing instruction to the POKEV statement is another statement called CALL PEEKV. This will read whatever is stored at a specific memory location into a variable for example.
100 CALL PEEKV(0,V1)
110 PRINT V1
This reads the value at VDP address 0 (top left corner of the screen) and assigns it to the numeric variable V1, the value is then printed by the program line 110.
If there is nothing at this location when it is peeked a value of 128 will be returned which, if you subtract the VDP offset of 96, gives you 32, the ASCII code for a space.

Let us now consider one of the other tables which it might be interesting to alter - the sprite table for instance. First we must locate it in the VDP memory map.
Because we are operating from Basic the correct map to look at is the one on page 76 of the manual, if we were operating from machine code then the other map would be important.
The information given in the map isn't exact - it just says that the colour and sprite table starts at memory address 768 and ends at 799 so a bit of experimenting found the correct area for the sprite table. Try PEEKing and POKEing in this area for yourself and see what you can discover.

The colour table starts at 785 whilst the sprite table runs from 768 up to it. Since each sprite requires four bytes to define it and a tail value of 208 must be added, we discover that we have only enough room for three sprites. This is because the TI-Basic interpreter does not recognise the existence of sprites.
However, three is better than none, so let's see how it is done.

For each sprite there are four bytes to define its capabilities or attributes, the first two are its vertical position and its horizontal position, the third is the ASCII code of the character you wish the sprite to be defined as (remember to add the offset of 96) and the fourth byte is the colour you wish the sprite to have minus one (e.g. Dark red is 7-1=6). The last entry MUST be the number 208. The following program will place three sprites on the screen.

100 CALL CLEAR
110 CALL SCREEN(2)
120 CALL POKEV(768,80,20,161,6)
130 CALL POKEV(772,80,60,162,15)
140 CALL POKEV(776,80,120,163,12,208)
150 GOT0 150

Notice how you can poke successive bytes in a single POKEV statement with the first byte always being the address into which the first byte of data will be poked.

The automatic motion feature of sprites can be implemented but this would require a lengthier article than this. To move your sprites simply poke a new value into either the vertical or the horizontal byte for the relevant sprite. For instance the following program sets up and moves a sprite. Remember, that sprites move pixel so their positions can range from 0 to 255 columns and 0 to 192 rows. (Row may be from 0 to 255 but rows 193 to 255 are not visible!)

100 CALL CLEAR
110 CALL SCREEN(2)
120 A=100
130 B=l00
140 CALL POKEV(768,A,B,160,15,208)
150 A=A-1
160 B=B+1
170 CALL POKEV(768,A,B)
180 GOTO 150

So there they are, sprites in TI Basic. If you have any specific requests about either this subject or concerning material you would like to see discussed then write in and let us know.

For those disappointed that we have not jumped straight in and given you some machine code to fiddle around with, here is a short program for you to enter by the line-by-line assembler and run via the Easy Bug. It doesn't do much I'm afraid but hopefully it will give some food for thought. Whenever the letters 'sp' appear you are required to press the space bar.

( R E Jones wrote in with the comment: Enter using the Mini Memory RUN option with the program name "NEW")

    sp AORG sp >7D00
T1  sp TEXT sp 'PRINT THIS LINE'
    sp LI   sp R0,>0126
    sp LI   sp R1,T1
    sp LI   sp R2,15
    sp BLWP sp @6028
L1  sp LIMI sp 2
    sp LIMI sp 0
    sp JMP  sp L1
    sp END
 
Having pressed enter and returned to the selection screen, push function and QUIT (the program will not be lost) and then select Easy Bug.
Press any key to clear the screen then push:
E7D10 and press Enter
The program will then execute. You will have to QUIT to leave the program.
If you wish to try and discover how the program works study page 35 of the Mini-memory manual


FOOTNOTE

Here endeth the third edition of TI-User. I hope it has proved useful and interesting. If not, write and tell us, and we will be only too happy to cover any subjects in relation to the TI 99/4A. We will also print user's programs and programming ideas wherever possible so why not set pen to paper now ? Any program sent on tape will be returned. Many thanks to those who contributed to this issue.

Some content has been omitted due to poor quality original copy causing scanning problems.

end of article
[ TI Book front page | TI Resources Page | PC99 Review | PC99 Programs ]