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

This web page contains the text of my article for owners of the TI-99/4a in a series called Rambles, from Issue 6 of TI*MES dated Autumn 1984, 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. Notable content is a major article on advanced programming of sound. I had to do a lot of retyping which may have introduced errors so if anything doesn't work, let me know the dodgy bit and I'll recheck.

Jump to:
Hi res Vertical scroll with Mini Memory
Faster Speech using Call LOADs and minimem or XB plus 32k ram.
Sound tones using Call LOAD
Automatic Music - playing music while the computer does something else at the same time.
Disk System memory use and Call FILES(0)
Alpiner - Game strategy.

Rambles from TI*MES Issue 6, Autumn 1984


August. In a county wide postal strike, which has reduced sales of software to nil, but is giving me the time to write this!

Way back in the Spring issue of TI*MES I concluded by advising that my console had died. Actually it was the power supply. And it took TI two months to replace it! Hence I needed to buy a second hand console to keep me going...! I am not filled with optimism regarding TI's commitment to service our machines.
My console was pretty old, and the power supply was a revamped 99/4 model, which appears to have been rated below the current 4A model. It was just a matter of time before it burnt out. Not more than a few weeks later I heard of another TI*MES member who had the same problem. The model 4 PSU looks like a sewing machine foot control, and gets quite warm! The 4A model is smaller and runs much cooler.

My apologies to anyone who wrote to me in August for not replying promptly - with no postal deliveries or collections, we had problems here!

One discovery which a lot of people need to make relates to EXTENDED BASIC. A US company sent a program to TI*MES and myself...and it would not work. Not for me, not for Clive, although at least some US owners raved over it... why the problem?

Not all consoles are alike! There are MANY operating systems in various consoles, and there are special variations of sprite action. The program in question used a sequence of CALL SPRITEs to set up a screen pattern. The pattern was dependant on the time the console took to move from one CALL SPRITE to the next. Unfortunately, not all consoles work at the same speed .... in fact. it is probably good fortune if any two consoles DO run at the same speed!

Here is a very simple EXTENDED BASIC test program, which simulates what the problem program was doing:
120 CALL CHAR(42."FF000000FF")
130 CALL SPRITE(#1,42,2,50,1
140 FOR T=1 TO 20
150 CALL SPRITE(#2,42,16,50+
160 NEXT T
170 CALL SOUND(200,660,0)
180 GOTO 100

Run this program in YOUR console. Try an initial input of 30. When the tone sounds, and the sprites are moving at the same speed, are they level with each other... exactly?
On my console an input of 30 places the two sprites together -or a value of 47 when using ExBas Vn.100
It indicates very clearly that relying on the speed of program execution to place a sprite is a very risky business!!!

Confirmation from the USA that our consoles do not all work at the same speed...
Another test program, from LAer Bernard Franklin. who some time ago visited Rambles HQ:

100 CALL SPRITE(#1,32,1,100,1,0,60) :: FOR C=1 T0 71 :: NEXT C :: CALL POSITION(#1,C,C) :: CALL DELSPRITE(#1) :: PRINT C :: GOTO 100

Now, when you run this tiny ExBas program, a string of numbers will scroll up the screen. They will fall between two values, with a difference of 5 or 6 between the upper and lower limits.

On my consoles the range is 53 to 59. However, on USA consoles, operating more slowly, the sprite can travel farther, and on 26 USA consoles, the value range ie 64 to 69.

The moral is: never rely on internal timing for your program! On my systems, even though the range is the same, the average differs from system to system. Note also there is a range of numbers, not one number, as some of you may have anticipated!

update Sudden inspiration department- it isn't that our consoles work faster than the US consoles, processing time is identical. What differs is the rate at which the VDP Interrupt operates: on our system it is 50 cycles per second, to tie in with the video output to the tv.

The VDP interrupt controls the speed of the sprites, so a loop working at the same speed linked to sprites moving slower equals a lower number on our consoles when using the second test program.!!! This accounts for the major timing difference! There are however still variations in individual console speeds of operation as well.

As at August 3rd. still waiting for Issue 3 of TIHCUC newsletter. I understand they will give refunds to anyone who asks. If they don't. try complaining to TI

TI WRITER: When you use WORD WRAP MODE. pressing ENTER will 'always' place a carriage return in your text regardless of whether or not you are at the end of your document.
It will not place a CR in the text IF there is already text or a CR on the line after the position you press ENTER at.
If there is already a CR on the line but outside the tabs it is ignored and will be duplicated.

RUN as a program command need not start the program from the beginning! You can use for instance RUN 600, which will run the program from line 600... worth experimenting with???

I have so far seen no sign from the USA that anyone there is aware of the problem with Atari modules, or with differing console operating systems.

Anyone with Vn.2.2 has REAL problems by the way: even if they invest in a device to enable them to use ATARI modules, the relevant graphics are not just 4 bytes out, but nearly 40.

MULTIPLAN...well, some time later I come to the conclusion that TI Multiplan is sloooow. Setting up the spread takes so long, you need to use it often to recoup the time spent.
And entering data takes so long that you need a lot of calculating or a lot of output to wake THAT worthwhile

Vertical scroll MINI MEMORY
A few members have asked me what Minimem can do, and is it worth buying. I'll duck the last question! In previous issues (and in my book...) I mention how you can:
Amend the cursor definition, have a program rewrite itself, and even have a sprite or two in TI BASIC!

Further discoveries, some of which follow include sound envelope shaping, automatic sound generation, speech. Thats enough!

Playing (well. experimenting...) with MiniMemory in TI BASIC can give a good guide to how the system works, of great value when you are ready to try a program in machine code.

To start off with MiniMem programs, here is a short one:
Note: ] is CHR$(93)

80 A$=CHR$(93)
70 B$=CHR$(32)&CHR$(32)&CHR$(32)
110 PRINT B$&B$&A$:B$&A$&A$:B$&
120 CALL PEEKV(1152,A,B,C,D,E,
130 CALL POKEV(1232,A,B,C,D,E,
140 FOR T=1152 TO 1231
160 CALL POKEV(1512,A,B,C,D,E,F,G,H)
170 NEXT T
180 GOTO 140

TRY IT! Lines 120 and 130 are equivalent to:
130 CALL CHAR(58,A$)

THAT should give you a hint of what we are doing .... !

We are dealing with the area of VDP RAM in which character definitions are handled.

The characters are stored sequentially, each one occupying 8 bytes. Thus, character 48 is in bytes 1152,1153,1154,1155,1156,1157,1158, and 1159
Then follows character 49 then 50 then 51 and so on.
The number 0 has been duplicated after 9 as well as before 1 for smooth operation of this demonstration.

Having placed some CHR$(93) (=]) on the screen, defined in memory in VDP 1512 etc, we then read the definitions of the numbers and define character 93 accordingly, but instead of merely reading the definition of the numbers in 8 byte chunks, we move up in memory in mere one byte jumps, having the effect you see.

Note that changing from 1 to 2 involves 8 cycles through the loop, in which we read a total of 64 bytes and pokev a total of 64 bytes. Thats 128 memory operations.

I notice another softwarehouse, specialising in TI programs, has copied, almost word for word the introduction to my catalogue (which is of course copyright). As an indication of the amount of copying, the copied text takes up 3 pages of his catalogue. And he keeps his name secret too. Please be aware if you see it, that he has no connection with me at all, and is using the text without my consent.

I was sorry to have sent to me for possible inclusion in my catalogue a program by another TI supplier. Only the name of the programmer had been altered. otherwise it was byte for byte the same program.

Not just robbery either. The programmer died tragically some time ago. and his widow is trying to keep things going. Very very nasty. I reported the attempted crime to the lady, but you will appreciate she is hardly in a position to defend herself.
The sender (from the South West) is known in the industry for unethical practices.

On to more merry things ....

RETURN TO PIRATES ISLE is a new adventure module. with graphics. NOT for the beginner. quite definitely. I hated the sign which said I had to complete Adventure 2 (Pirates Island, with the original Adventure module) first before proceeding with this module. The manual does give you a hint of what you are expected to know. If you HAVE finished the original PIRATE adventure, try this, at least it has hi res graphics! Module ONLY. no tape required.

Last issue I briefly mentioned HONEY HUNT, which I now have. It is actually quite a bit better than MB make it sound. Like all their educational games, it comes with a manual full of advice on how to use it educationally, and how to relate it to 'normal' play activity. However. forget that, its a nice game! As a bee you have to collect pollen. from flowers which open and close in a pattern, avoiding spiders webs, a dragonfly, a killer bee, and a bear which likes pollen too! Lovely graphics. and a fun idea, especially for younger owners.

Miner 2049er
...It's pretty good. Eight screens. If you can make it that far .... screen 3 is pretty hard. MINER is a sideways module. which plugs into the RIGHT HAND port, not the usual module socket. In each screen you must cover every part of the floor. while avoiding a whole host of nasties and hazards. Very very careful planning is required.

COPYRIGHT again ....
I had a phone call from MCPS (you must have seen those initials on your CD's ! they stand for Mechanical Copyright Protection Society). MCPS have the task of policing copyright as it applies to recorded music, and they consider music used in a computer program as a mechanical recording. So be warned! and do not use any music in your programs which has been written by somebody who has not been dead 50 years yet! This applies to music you program from sheet music just as much as to commercial recordings. Or MCPS could be coming your way ....

Before we move on to the technical stuff! a few more REVIEWS:
STAR TREK is a module I obtained from the USA. It is a TI module, courtesy of SEGA. The program is very simple .... you move your ship around space blasting Klingons. There is a viewscreen with crosshairs, and a small radar display. Very simple. However. each screen has more and more Klingons, making survival that bit more difficult. The graphics are not that good, but the game is very playable.

AMBULANCE is a FUNWARE module, which features you as an ambulance driver racing to collect casualties and then racing them to hospital (or a first aid centre!), while avoiding the other traffic. The time limits become tighter as you go along, and you may only lose so many patients (or crash so many ambulances!). Two street layouts alternate. As usual with Funware modules. a simple idea, which works. and has a slowly increasing level of difficulty.

ESPIAL is another Tigervision sideways module, which requires joystick TWO. On a monochrome tv the display is far from clear, and I am told it is not too hot on British colour tv either! Simple game...flying over the huge alien craft, drop bombs where they hurt while avoiding fire from the defending turret guns. Within that description it's a good game, but one you will love or hate.

From Arcade comes the MOONBEAM programs... all on cassette for Extended Basic... and despite my fears, they are nearly all very playable! Avoid however STRIKEFORCE which seems to be at least partly system dependant...and also has poor sprite collision detection.
GARBAGE BELLY requires a colour tv set! CAVERN QUEST is an unusual combination of games...in screen one you leap over moving sprites to reach a door, and what follows could be anything!
ASTROMANIA seems to be just like so many programs. with your ship in the centre, shooting rocks coming from 4 directions... but it is well programmed, and requires something a little tougher than the TI Joysticks!
ROBOT RUNNER and ZERO ZONE are also very playable...and you may find yourself losing deliberately at ZERO ZONE just to see what happens! Colourful.
Not entirely original perhaps. but lots of original touches with some nice programming. Worth looking at.

I have also been buying some TI Basic games from around ....
Hunchback Havoc, a TI BASIC game which seems to be pleasing everyone, IS a good game. If you don't have it, don't copy it, buy it! Move around the screen putting out fires (or dealing with other hazards), unlocking doors, and collecting keys. Sounds simple, but the graphics are very good indeed. There is also a timer, which you cannot see, so be quick!

Using the colon print separator.
Colons may be placed one after the other: :::::::::
MUST be a space between: : : : : : : :
The reason for this is that a double colon in Extended Basic is a statement separator ::
When using two colons as print separators, you must put a space in between or the computer gets confused - it assumes you are using a statement separator such as:

This is what happens:
when entering in TI Basic, each colon is stored in memory as a single colon.
When entering in Extended Basic, a double colon is entered as a double colon, a statement separator.
Each uses ONE BYTE of memory, regardless of how they are displayed on screen.
If you load a TI BASIC program in EXTENDED BASIC, the colons are stored as separate one colon bytes, with no spaces. When you LIST the program, spaces will be inserted by the computer to avoid confusion to you, when you list!

If you key in a program in EXTENDED BASIC, putting spaces in between the colons, and then load it in TI Basic, the spaces will not show when you list!
THE SPACES DO NOT EXIST! We are dealing only with the way the computer displays the bytes which make up its programs. The extended basic double colon is not really a double colon, It is a separate word.

If you key in, in TI BASIC, you don't need spaces. If keying in in ExBas you do. Leave the rest to the computer, its quite clever!

It seems like a good month for phone calls from strange people .... now I've had one, at work, from the Inland Revenue, in Bristol. They had been in touch with my local (Stockport) tax office, who had been in touch with the tax office which deals with me .... and they were a trifle surprised that I should have heard of THEM ....

For the benefit of anyone who doesn't know. the Inland Revenue have set up a special investigation unit in Bristol which is checking back EVERY advert in the computer magazines, to ensure that proper tax returns are made!

( I'm OK, but there are many who do not even consider the tax angle when they start selling programs... until they get a big bill!!)

On program prices, which vary a lot, and seen to have little to do with quality ....

The COST of a particular program can vary VERY considerably, depending on how many tapes the supplier sells, how he spreads his overheads and how he sells most of his tapes.

If he deals with dealers or distributors, they take a huge cut, but of course a lot of that is offset in larger turnover and lower costs.

He say spend a lot or a little on advertising (often the biggest budget item), and may use the cheapest possible tape, or pay three times as much for premium grade tape.

There are MANY variables. and as each supplier decides on what he considers is most important .... and sells differing numbers of tapes... there WILL be very considerable price variations.

The failure of some suppliers to consider fully the 'hidden' costs of overheads is a frequent reason for some low prices. Sometimes only the direct costs... eg the tape!... are considered.

Based on my sales for the 2nd quarter of 1984, and the relevant costs, here is a breakdown of my AVERAGE costs. Individual program costs can vary widely!

Royalty to programmer 27%, Advertising 14%, VAT 13%, Direct costs 13%, Printing 9%, Production equipment depreciation 8%, Dealer discount 7%, Postages 6% (Total 97%).

Those of you with calculators handy will see I didn t make very much in the quarter... and the 3rd quarter is headed for a good loss, due to low level sales!!

Thought it might interest some of you! (eg my competitors ..... )

TI LOGO... here are a couple of books you might like:
pbk 228pp RESTON (Prentice Hall) About GBP 13.00 to 14.00
Inman may be known to you as the author of INTRODUCTION TO TI BASIC, a book with so many errors even 99er Magazine stopped selling it.
Sadly, proof reading computer books is rather like proof reading Sanskrit. and errors crop up. The first error I found in this Logo book was page 9, where CS was used instead of CB.

However, LOGO is a language in which errors are an important part of the learning process, and there should be nothing in this book to cause undue worry. It is a very readable book, and as TI UK never bothered to bring us the excellent LOGO CURRICULUM GUIDE, you should buy this book as an adjunct to the LOGO manual. I would consider this an essential buy if you want to get to know your LOGO

NB: It deals with the 4A, but with LOGO 1 not LOGO 2. The additions of LOGO 2 aren't there.

The LOGO Curriculum Guide is available on The Cyc, the DVD-Rom from CaDD Electronics, and is legally licensed from Texas Instruments. You must also own or buy the DOS emulator PC-99. Consider the total cost against the mass of data, modules, books and so on you receive on the dvd.

In the UK, the centre of LOGO activity has been Edinburgh. (To be precise, the Department of Artificial Intelligence. University of Edinburgh).
And it is pleasant to see a book come forward:
LOGO PROGRAMMING by Peter Ross. pbk.249pp. About GBP 9.00 from Addison Wesley.
For those members who thought LOGO was for children. a quote, from page 25:
" it is the state-transparent parts that catch the attention. The idea of studying such a subjective hypothesis may surprise you if you are not of a scientific turn of mind."
(I'm surprised). Well .... this is a serious book, looking deeply at LOGO. The text deals with Terrapin (Apple) LOGO. but there is an appendix for TI LOGO, which differs very slightly... you will be able to follow the text. This is not an expensive book, and is worth getting as a 2nd book after the Inman book. Not so readable, but you may get more out of it. Not all of the text is quite as heavy as the quotation above!

My local bookshop still has in stock MINDSTORMS by Seymour Papert, who virtually invented LOGO. The book is a discussion of the learning process and how LOGO fits into Paperts ideas. It is easy and interesting background reading, especially if you are using LOGO with a youngster, but Papert says: LOGO IS NOT A 'TOY' - A LANGUAGE ONLY FOR CHILDREN and thats from its inventor!

Be warned: Logo has a lot to offer.
MINDSTORMS. Harvester Press, pbk 230pp. around GBP 5.00 to 6.00

From one of the largest TI cassette software houses in the USA: "Our business too is slumping badly of late. As a matter of fact we were seriously considering a going out of business sale in late September or early October. We know piracy has had a major effect on our sales, and indeed may be THE factor that will stop us from becoming a long term company. TI's modules are still available over here at lower and lower costs.“

... so if you have an interest in continuing supply of cassette software, resist the temptation to copy, to lend for copying or to accept copies. The alternative is an early end to new programs.

Now onto something really juicy. SPEECH. Old hat huh? Well, this information will give you speech in TI BASIC with the mini memory or if you have EXTENDED BASIC with 32k ram -it will give you speech just a mite faster than using CALL SAY...which slows programs down no end!

For this information I am indebted to Neil Lawson who has been delving.

Faster Speech


Requires either EXTENDED BASIC + 32K RAM or MINI MEMORY - with speech synthesiser.
Program framework (for timing purposes):
30 S=-27648
100 FOR J=1 T0 1000 :: NEXT J
110 PRINT "START.. .... "
120 FOR X=1 TO 20
140 FOR T=1 TO 30
150 PRINT ">"
160 NEXT T
170 NEXT X
180 PRINT "END .... . ...... "

This standard routine sets up a framework to test our new routine in, and Ives a basic time reference.
NB: Times quoted are for MY system: yours may be different, but the ratios should be similar.
Running the above program, with the loop in line 140 running 30 times as shown, takes 18.7 seconds from "START" to "END".
Change line 140 to loop just 20 times and the timing is 12.7 seconds.

Now we can insert our two possibilities:
The first is available only in Extended Basic

RUN the program again: If line 140 is looped 30 times, the time is 50 seconds. If line 140 is looped 20 times, the time is 44 seconds.

The time for the speech is constant, it adds about 31 seconds to the program.

Now for something different. This one also works with Mini Memory!!!:

130 CALL LOAD(S,70,"",S,65,"

If you now run the program, it says the same thing just as many times, but look at the timing:
140 looped 30 times: 26.5 secs. and 20 times: 26.3 secs

We KNOW that looping line 140 an extra 10 times adds 6 seconds... so where have those 6 seconds gone?

The CALL SAY routine holds everything up until it has finished speaking. But using the CALL LOAD equivalent, while the computer is speaking. it gets on with the next chore too... the 'dead time' is used. and soaks up those 6 seconds.

Thus using the CALL LOAD equivalent, the computer starts to speak faster, and also permits your program to run more quickly if there is work for it to do between speech outputs.

Thats the clever demonstration! (impressed!) Now for the theory, now you're interested

References: Editor Assembler Manual: pages 351. 355. 422 to 427 (Errata: The reference in para 1, page 355. should be to Section 22.1.4. not as printed in the manual) Editor Assembler manual is available online as an 87 Meg pdf download from 99er.net- this link takes you to a licence page.

Address -27648 is the SPEECH WRITE address. We keep on feeding it with bytes, and in due course the computer speaks!

The bytes to load to that address ara found out as follows:
First decide what you want to say from The standard vocabulary.
Than look in The table pp422-427 for the address of that word or phrase.
"THAT IS INCORRECT" is given as 6816.
This is a hexadecimal number, not a decimal number!
The four numbers are reversed, and now become 6186.
Now we offset them by Hex 40 and feed than in. As we are dealing with decimal numbers with our Call Load, that means that we ADD decimal 64 to each digit in turns
  (64+6) (64+1) (64+8) (64+6)
  70      65      72      70
(If the numbers were hex A/F these have a decimal value as follows!
A-10   B-11   C=12   D=13   E=14   F=15
Now we just indicate "end of word" by loading a zero, again offset, thus 64+0 = 64.
And finally, instruct The computer to speak by loading hex 50, decimal 80.
Thus we have loaded, in order, 70,65,72,70,64, and 80.
Check back to the listing.

Note the way CALL LOAD has been used in a single command to load the same address with several different values.

To assist your experimentation, here are some HEX addresses from the manual.
Remember to reverse them, translate to decimal and offset!
READY TO START......56B3  YOU WIN.........7DDB      AGAIN...........17A5
ANSWER..............1913  CHECK...........1D82      CHOICE..........1DA2
COMMAND.............1F1A  ELSE............27B6      GOODBYE.........3148
HELP................3571  HURRY...........3757      INSTRUCTIONS....39BD
I...................3793  I WIN...........37CF      JOYSTICK........3AED
NAME................47CO  NICE TRY........49A5      PLEASE..........5093
This is not only a useful programming aid in its own right, but by demonstrating a part of The Editor Assembler Manual‘s sometimes complex instructions, it should assist you when you are ready to move on to Forth or Assembly Language proper.

The next topic for discussion is a faster CALL SOUND .... but first:

A little light relief....

A TI SPRITE - requires Extended Basic

20 CALL CHAR(104,"060E0E0E0F
30 CALL SPRITE(#1,104,5,92,114,-3,0)
50 GOTO 50

Thanks Maurice.

OK, more serious things....SOUND...

Faster Sound


Theory first this time. As you saw with the previous article on speech, we make our computer do some interesting things by loading a sequence of bytes into one memory location.

For sound we use decimal -31744

To use a tone, two bytes are passed.
To use a noise or to set volume, one byte is passed.
Each byte has to be looked at as 8 bits, as follows:

The 8 bits are as follows

Bit: 1
2 3 4
7 8
always 1
always 0
shift rate

Bit: 1
2 3 4
5 6 7 8
always 1
Frequency- 4 LSB

3 4 5 6 7 8
always 0
always 0
Frequency- 6 MSB

Bit: 1
2 3 4
5 6 7 8
always 1
Attenuation 4 MSB


This will become much clearer when we do a worked example.

M S B means Most Significant Bits
L S B means Least Significant Bits
The example will help!

Remember in Basic, sound is used with CALL SOUND in the format CALL SOUND(time,freq1,vol1,freq2,vol2,freq3,vol3,noise type,value)

Operation is used for Noise, Tone first byte, and volume.
The values placed in these three bits determine what you are doing and to which of the three tone generators:
Value of the three bits defining Operation:
000 Frequency of tone 1 ; 001 Volume of tone one ; 110 Noise generator ; 010 Frequency of tone 2 ; 011 Volume of tone two ; 111 Noise volume ; 100 Frequency of  tone 3 ; 101 Volume of tone three

FREQUENCY: The actual frequency is held in ten bits, which is split between the two tone bytes, and is determined as follows:
what frequency do you want? Say 110 Hz (or 110 cycles per second!):
We find out how many times the frequency will go into 111860.8
(Strange number, but thats how the computer works!)
Thus: 111860.8 / 110 = 1017 (use the closest integer)
Now, turn this into a binary number: 1111111001 (ten values)
and split it into the 6 left most bits and the four right most bits:
6 MSB = 111111 and 4 LSB = 1001
And these values go into the tone bytes as shown on previous page.

NOISE: Noise Type: O = periodic noise, 1 = white noise
Shift Rate: If set at 11, sound varies with frequency of tone 3.

VOLUME: SIXTEEN levels are available from full volume (0000) to silence (1111)
The sound varies by 2db between levels.

TIME: Notice: no time input! To switch off a tone, load the relevant generator with a zero volume. Actual timing is external: you have to do it!

TONE ONE SET AT 110 Hz. 2db volume. with white noise. shift rate 00. vol 20db:
Tone one: Byte 1:
1..0..0..0..1..0..0..1 (1001=4LSB as shown above)
Tone One. byte 2:
0..0..1..1..1..1..1..1 1111111=6 MSB as above)
Tone One. volume: —
NOISE type:
Noise volume:

To use CALL LOAD we have to transfer these 8 bit bytes into a decimal value:
the right most bit has a value of one if set. the 2nd from the right has a value of 2. then 4.8.16,32.64 and 128.
From which we can work out: 10001001=137   00111111=63   10010001=145   11100100=228   11111010=250
20 S=-31744
30 CALL LOAD(S,137,"",S,63,"
40 GOTO 40

To end the sound, set Tone 1 and Noise volume to zero... or use a negative call sound...CALL SOUND(-1,110,0)

1. You can change the frequency while the tone is still sounding. It takes two bytes so it is not as smooth as it could be...
2. You can change the volume while the sound is still present... and it is faster than using several negative CALL SOUNDS, making it possible to do some envelope shaping .... as we shall see in the first of our example programs
: SAMPLE ONE: A sort of bell sound:
110 S=-31744
120 CALL LOAD(S,137,"",S,63,
130 FOR A=0 TO 15
140 CALL LOAD(S,144+A,"",S,176+A)
150 NEXT A
160 CALL LOAD(S,159,"",S,191)
170 GOTO 120

Line 160 turns the sound off. What happens if you omit it?
Let the program run for a long time. What happens when 'garbage collection' takes place?

Try an experiment:
Change line 130 to:
130 FOR A=1 to 14 STEP 2
Notice the change?

Working out all those numbers from binary can be pretty hard work... why not let the computer do it? Neil Lawson, who passed this information on to me, has written an Extended Basic program to do just that. Here is the program....its use should be fairly self evident as you run it.

Tell the computer what you want, and it will give you the value to use AND LOAD IT...thus you can hear the effect of your inputs to -31744 as you go along.

Remember: there are two bytes for frequency
and there is no sound until you give a volume!

100 ON ERROR 590
130 CALL SCREEN(5):: FOR N=1 TO 14 :: CALL COLOR(N,16,1):: NEXT N
150 REM
160 PRINT "PS will run in minimemory if program changes to TI Basic": :
180 CALL KEY(3,K,S):: IF S=0 THEN 18O
190 REM
210 DISPLAY AT(12,1):"PRESS","FOR": :" N","NOISE": :" T","TONES"
220 BS$="" :: HZ=0
221 rem did you notice CALL D in line 200...see subprogram at end
230 CALL KEY(3,K,S) :: IF K=78 THEN 240 ELSE IF K=84 THEN 430 ELSE 230
250 HZ=0 :: BS$=""
270 CALL KEY(0,K,S):: IF K=84 THEN 340 ELSE IF K<>65 THEN 270
280 BY=240 :: CALL BIN((BY),B$):: CALL D(B$,BS$,BY,HZ)
320 CALL LOAD(-31744,BY):: GOTO 190
340 BY=224 :: CALL BIN((BY),B$) :: CALL D(B$,BS$,BY,HZ)
360 CALL KEY(3,K,S) :: IF K=80 THEN 380 ELSE IF K<>87 THEN 360
370 BY=BY+4 :: CALL BIN((BY),B$):: CALL D(B$,BS$.BY,HZ)
380 DISPLAY AT(12,1)::"SHIFT RATE.": :"PRESS","FOR": :" 1";TAB(12):"SHIFT RATE—6691": :" 2";TAB(12):"SHIFT RATE-3496": :" 3";TAB(12):"SHIFT RATE—1738"
390 DISPLAY AT(22,1):" 4";TAB(12):"DETERMINED BY": :TAB(12);"TONE GEN. 3"
400 CALL KEY(0,K,S) :: IF K<49 OR K>52 THEN 400 ELSE BY=BY+(VAL(CHR$(K))-1):: CALL BIN((BY),B$):: CALL D(B$,BS$,BY,HZ)
410 CALL LOAD(-31744,BY):: CALL HCHAR(12,1,32,13*32) :: GOTO 190
430 DISPLAY AT(12,1):"WHICH TONE GENERATOR 1 2 3 ?" :: CALL HCHAR(13,1,32,200)
440 CALL KEY(0,K,S) :: IF K<49 OR K>51 THEN 440 ELSE TG=VAL(CHR$(K))
450 BY=128+((TB—1)*32):: CALL BIN((BY),B$):: CALL D(B$,BS$,BY,HZ)
470 CALL KEY(3,K,S) :: IF K=70 THEN 530 ELSE IF K<>65 THEN 470
480 BS$="":: HZ=0 :: BY=BY+16 :: CALL BIN((BY),B$) :: CALL D(B$,BS$,BY,HZ)
510 BY=BY+ATT :: CALL BIN((BY),B$) :: CALL D(B$,BS$,BY,HZ)
520 CALL LOAD(—31744,BY) :: GOTO 190
550 ACCEPT AT(14,1)VALIDATE(DIGIT):HZ :: IF HZ<110 OR HZ>55938 THEN 550 ELSE HZ=111860.8/HZ :: HZ=INT(HZ+.5) :: CALL BIN((HZ),B$)
560 B1$=SEG$(B$,7,6) :: B2$=SEG$(B$,13,4) ::CALL DEC(H,(B2$)) :: BY=BY+H :: CALL BIN((BY),B$)
570 B8$="00"&B1$ :: CALL DEC(HZ,(BS$)) ::CALL D(B$,B8$,BY,HZ) :: CALL LOAD(-31744,BY,"",-31744,HZ) :: GOTO 190
600 RETURN 610
610 END
630 SUB DEC(DEC,BIN$) :: DEC=0
640 FOR I=1 TO LEN(BIN$):: DEC=DEC-2^(I-1)*(SEG$(BIN$,(LEN(BIN$)+1-I),1)="1")::NEXT I :: SUBEND
660 SUB BIN(D,B$)
670 B$="":: D=D/16*4 :: FOR I=O TO 15 :: D=2*(D-INT(D)):: B$=B$&STR$((-(D>=1))):: NEXT I :: SUBEND
680 SUB D(B$,BS$,BY,HZ)
690 IF B$="" THEN B$=RPT$("00",8)
700 DISPLAY AT(5,8):SEG$(B$,9,8);" BYTE 1 ";BY
710 IF BS$="" THEN BS$=RPT$("0",8)

How did you enjoy that program? Even if you do not like to experiment with sound, look at the listing .... try to follow what is going on, there is some neat programming here!

Stainless Software has two of Neil's game progress on sale (The Wall: 5 star review) and Robin Hood, but they are protected. The above program is your chance to see how Neil programs! Thanks to Neil for permission to use that program.

A little rest here...

The long hot DRY spell say be contributing to a number of unexplainable system lock outs: due to STATIC zaps. Here I deal with this by using a powered humidifier, an earthing strip along the front of the computer desk (to earth body static) and also when computing I wear cotton clothing: no man made fibres!

As some people now have Extended Basic, reports of faulty modules are coming in... the bad news is the modules are in perfect condition, it is the consoles which are wearing out. The module socket is perhaps the weakest part of the console, and with extended games use, can show signs of wear well inside the guarantee period! There is also contamination by dirt to contend with... my first solution was to rip the console apart and replace the badly worn socket (also removing the clipped on foam cleaning strip).

Then (and something some of you can do perhaps!) to extend that job, the purchase of a cartridge extension port (the Navarone Widget!) which plugs into the console socket AND STAYS THERE. It gives you three sockets for your modules, which can be cleaned easily, and (although made by TI!) are made to last longer than the console socket. I think Arcade Hardware are bringing some in if you are interested. NB: If using a new games module, the other two expander sockets cannot be used! Only one game module may be inserted at a time. Utility modules may however be plugged in 3 at a time and you can switch between them.

The problem shows itself with ExBas as this is the 'biggest' module and uses all the contacts!

ANOTHER problem now appearing has to do with users attaching disk systems for the first time: they use up memory! Using CALL FILES(1) followed by NEW will increase the amount of memory available, but there is still a little less! If you have a lot of programs on tape, some of these will not run, and some will not load.

If there is insufficient VDP ram for the program to load (attaching the 32k ram does not affect this!) the tape load will fail almost immediately the pilot tone ends. You must switch off everything, and then switch the console back on but NOT the disk controller, before you can load! (If you did not use CALL FILES(1) however, try using it, it may just allow you to load)

There may be insufficient memory for the program to run in ExBas, the 32k ram will avoid this chance, but has no effect on TI Basic programs.

And remember to use CALL FlLES(1)!

If you have MiniMem plus 32k ram, you have the means of implementing CALL FILES(0).
Your program on disk?
CALL LOAD(-31888,63,255) [ENTER]
NB: DO NOT then try to access the disk system!!!!!
Your program on tape?
CALL LOAD(-31888,63,255) [ENTER]

Automatic Music OK. Now the difficult one .... Call Sound alternative

Before I bought my console, so many years ago, I thought of writing a program which would enable me to shape a sound, controlling attack sustain decay and release... after all, CALL SOUND worked to the millisecond!

Then came the bad news. Each call sound took around 40 milllseconds and envelope shaping was not too good.

Using Neil Lawsons 'direct sound' given earlier, a degree of control on the sound envelope could be found... but better is possible.

Remember SPRITES- magic things: you tell the computer to start one moving, and off it travels, and your programs can do anything... the sprite keeps moving.

Wouldn't it be nice to have music do that? Give the computer the music score, tell it to start playing, and then ignore it?

Are you sitting down? Our lowly TI99/4A can do three things at once: follow a program, keep a sprite moving, and play a piece of music after you tell it to 'start'.

The catch is, you need to place the music score somewhere... and that somewhere is VDP RAM. Normally, there is not a great deal of unused space in the VDP RAM. Any spare space tends to be pushed into by the variable garbage ....

Fortunately it is possible to reserve VDP RAM, and the following program will amaze you. It comes from Neil Lawson again, who was using a machine code program printed in THE SMART PROGRAMMER to give him access to VDP using Extended Basic.

I can’t reprint that program so I have amended it to work with MINI MEMORY.

NB: The Smart Programmer magazine is now available to read online at whtech.com.

First the program set up:
Turn your console on and select TI BASIC.
Now to reserve some VDP RAM to store the music in:
---- If you have a disk controller, you can use:
---- CALL FILES(1) ---- then NEW. ----then key the program in and RUN it.

OR - If you do not have a disk controller, you can still reserve memory. The CALL FILES reserves space at the top of VDP ram, and this is controlled by a couple of bytes in CPU RAM... we can use CALL LOAD to do the same thing...
Type in CALL LOAD(-31888,50,0)
then enter NEW.
then key in the program and RUN it!

That NEW above is important. It tells the computer to remap VDP. This it does after reference to location -31888.
Loading -31888 with 50 and 0 tells the computer the TI BASIC program can commence not at its normal 16383, but instead at 256*50+0= 12800.

This gives us about 3.5k for the music, far more than this program needs!
The program now, then the enlightenment.
The CALL SOUND in line 100 is essential : don't miss it out!

100 CALL SOUND(-2,30000,0)
120 REM DURATION IN 1/60th
140 REM 1/2 BECOND=30
150 REM ••••••••••••••••••••
160 REM
180 CALL POKEV(14096,3,142,15,144,30)
190 CALL POKEV(14101,3,133,13,144,60)
200 CALL POKEV(14106,3,128,15,146,30)
210 CALL POKEV(14111,3.142,15,144,15)
220 CALL POKEV(14116,3,141,17,145,15)
230 CALL POKEV(14121,3,142,15,146,30)
240 CALL POKEV(14126,3,129,20,146,30)
250 CALL POKEV(14131,3,141,17,144,15)
260 CALL POKEV(14136,3,129,20,146,15)
270 CALL POKEV(14141,3,131,21,146,30)
280 CALL POKEV(14146,3,140,23,146,30)
290 CALL POKEV114151,3,139,26,144,60)
300 CALL POKEV(14156,3,141,17,146,30)
310 CALL POKEV(14161,3,141,17,144,60)
320 CALL POKEV(14166,3,142,15,146,30)
330 CALL POKEV(14171,3,133,13,144,60)
340 CALL POKEV(14176,3,12B,15,146,30)
350 CALL POKEV(14181,3,142,15,144,15)
360 CALL POKEV(14186,3.141,17,145,15)
370 CALL POKEV(14191,3,142,15,146,30)
380 CALL POKEVI14196,3,129,20,146,30)
390 CALL POKEV(14201.3,141.17,144,15)
400 CALL POKEV(14206,3,129,20,145,15)
410 CALL POKEV(14211,3,131.21,146,30)
420 CALL POKEV(14216,3,140,23,146,30)
430 CALL POKEV(14221,3,129,20,144,60)
440 CALL POKEV(14226,3,134,00,159,30)
450 CALL LOAD(-31796,55,16)
460 CALL LOAD(-31794,1)
470 REM
480 REM
540 REM —--------
560 PRINT " ]":" ]]":" ]]]"::::
570 CALL PEEKV(1152,A,B,C.D,E,F,G,H)
580 CALL POKEV(1232,A,B,C,D,E,F,G,H)
600 REM
610 FOR T=1152 TO 1231
630 CALL POKEV(1512,A,B,C,D,E,F,G,H)
640 CALL PEEK(-31796,A,B)
650 IF A<55 THEN 690
660 IF B<150 THEN 670 ELSE 690
670 NEXT T
680 GOTO 610
690 REM
710 CALL SOUND(-20,30000,0)
720 REM
750 J=J+1
760 IF J<40 THEN 750
770 J=0
780 CALL LOAD(-31796,55,16)
790 CALL LOAD(-31794,1)
800 GOTO 610

LINE 100 is required for the MINIMEM.
For the EXTENDED BASIC version Neil had to use:
455 CALL PEEK(-31747,A) :: CALL LOAD(-31747,1 OR A)
[thats a logical OR]

Neil's program used CALL LINK("POKEV"'...) to access VDP via a machine code utility.

The music is loaded next, and you will see the area of VDP memory used is within the reserved area.

The first item of the POKEV is the address the first byte is going to be loaded at. The sound table has to be sequential!

Than we load that and successive memory locations as follows:

1. Length of sound information, excluding duration, normally 3.
2 and 3. The tone generator data, exactly as in the previous direct sound program, is yielded by Neil's Utility program earlier.
4. Attenuation (or volume) value, again as in direct sound.
5. The time the note is to sound, in 60th's of a second.

Therefore the minimum note is 1/60th of a second!

Line 550 tells the computer where the SOUND TABLE can be found:
55*256+16 = 14096. (Check line 280)
Line 580 is an instruction to the computer: START PLAYING
Then we go into a loop which demonstrates that the computer carries on playing without further instruction.

Problem: How do we know the music has ended? The computer only does as it is told, and will carry on through memory until you tall it to stop... corrupting the program as it goes along...

My attempt at this was to wait til the end of the tune, BREAK and find out the values at -31796 and -31795. Then I test for those values, as above in line 640.
Line 710 restores sound to normal, and lines 750 to 770 put in a small delay before we start again by loading the start of the sound table and tell the computer to PLAY!

Neil had a different idea.... place a silent note (eg 30db attenuation) at the end of the sound table. Than test another location

To do this amend the listing above:
Add: 545 CALL POKEV(-14231,3,159,191,223,0)
THEN instead of 640 to 660 (which delete) , use:
650 CALL PEEK(-31747,A)
660 IF A=0 THEN 780

I hit a problem translating this for mini memory - it did not work. The solution was to reintroduce that dropped location. -31747, . by adding to the above program, in place of 750 to 770:
750 CALL LOAD(-31747,1)

Now some more experimenting
Get the sound table going and before it has finished try:

using CALL SOUND with a positive time value...
with a negative time value
using direct sound access

OK? Thats your work for today (sorry if you don't have minimemory. Try Arcade Hardware or Parco Electric).

My work was cutting the sound length down to 1/60th of a second for better envelope shaping... and note you can change the frequency as fast as the volume, for interesting glides...

And all this on a 99/A

Uh .... if you have a disk system and wish to load the program from disk, a tiny problem you have to move the VDP floor before loading from disk, and depending on the value you load it could lock up the disk system. Save the program to EXPMEM2 as shown earlier, then move the VDP floor!

Neil has a short snippet for you too:

100 INPUT D :: D=D/16^4 :: FOR X=0 T0 15 :: D=2*(D-INT(D)) :: PRINT (D>=1) :: NEXT X

When D is a decimal number, output is its binary equivalent... the decimal number must he capable of expression in 16 bits (max 65536)!!

Best wishes,
Stephen Shaw

This from Howard Greenberg:
Stephen wrote about Atari's modules and the attitude taken by Atari U.K. He's not joking. If I set up a subsidiary in the U.S.A. and discovered that the people I was employing were as obstructive as they are at the U.K. end, then an awful lot of heads would be rolling.
By comparison, Atari in Europe have proved themselves more than efficient and courteous. Thank goodness they all speak English !
Another American company who have a U.K. distributor who pretends the Texas doesn’t exist is Tiger Electronics. Their U.K. agents gave me the runaround for three days before I lost patience with them and went direct to Tiger. As a result, I now have the brilliant Miner 2049'er for sale. I hope someone else is going to review this game because my opinion is biased since I sell the thing. Mind you, the game is that good that whoever reviews it is going to look as though I'd paid for a round-the-world cruise for him/her and family. If Indiana Jones is taking over in James Bond territory, then Buck Rogers had better watch out - Bounty Bob is hot on your tail How's that for impartial writing.

A couple of very competent programmers are coming to light. Alastair McMath has written a very cute golf game and has now added a second version, (Not an update, but a new game.) Neil Lawson, with whom I've had numerous conversations, has written a very original bow and arrow game called Robin Hood.

What really knocked me out about Robin Hood wasn't the game itself, but the character set. I'm a fan of multifont printing, but I'd never seen Olde English characters done on a computer. when I think of the hours of work that must have taken, I shudder. Nice one Neil, keep on at lt. (Both these programmers have their wares and others marketed by Stainless Software.)

Stephen mentloned that he'd had 'problem mail' concerning some of his programs. Unfortunately, I'm preaching to the wrong audience here, but it makes sense to tell as many people as possible I DO NOT EXPECT BASIC (OR EVEN EXTENDED BASIC PROGRAMS TO CATCH THE SPEED OF ARCADE GAMES.
It seems a lot of newcomers to the TI expect our computer to match the nature of the games machines masquerading as computers. Ever tried computing on a Spectrum ? Or a QL ? (Ever tried finding a QL). If you want a machine code program for the TI on tape, then try the 'SPY'S DEMISE' from Stainless Software. (Please remember you need the Mini Memory).

Quick review: Diablo from Timeless Software. Quite the most remarkable piece of programming in Extended Basic I've seen. This has to be the ultimate in brain teasers. The screen is composed of a grid of tiles on which are two tracks leading to the next tile and set of tracks. In the center of the screen is a ball, which once set in motion won't stop moving. As it rolls over a piece of track, that piece is erased, leaving less and less track. The object of the game is to keep the ball moving over every piece of track until all the tracks are removed.
The tracks are moved by means of the keyboard/joystick so that you can manipulate sections of track ahead of the ball. It sounds easy and looks it. At first the game appears too slow, but you soon find out that it's not slow enough Whoever wrote this one must be distantly related to Machiavelli. It really is fiendish to play. I spent three days wondering if it could be done. It can, but like most good games, a route doesn't exist so it's impossible to remember where to go next. I recommend this to everyone with Extended Basic. For the money, (GBP 8.95 at last knowledge), it's the best game for the money there is.

This from Clive Scally:


Britain's first ever TI Users nationwide convention.

RITZ, Whitworth Street West, MANCHESTER,(Close to Main Railway/Bus Stations and car parks)


Doors open 11am to 5pm Bar and Catering available.
Admission on production of membership cards. NON MEMBERS GBP 1.00
The first major event exclusively for the TI99/4a Home Computer. This is being held on Saturday Zrd November in the centre of Manchester. Well known people will be there and it will be your chance to come and meet them.
During the day we hope to arrange a series of informative talks and demonstrations. Just in time for the Christmas shopping you can come and see for yourself whats news for the TI99/4a. There will be many of your fellow supporters of the TI99/4a in attendance.
On show will be Hardware software and books. If any of you still have doubts about future software for your TI then we have some reassurances. Make a date and come along you will be welcome to stay all day.

There will be Refreshments available. See many of the cartridges coming from the States, both from remaining TI stocks and new 3rd party sources. The new expansion systems and revolutionary voice recognition units. A lightpen, printers, accessories, Cassette and disk based games and utilities from the States.
The very latest here in Britain are the book and software combinations which really show up your TI99/Aa capabilities even if you only have a cassette recorder.
It is very exciting that a high standard is being maintained. Bring along your membership card for preferential treatment. As a member you ~ will not be charged for admission. Non members however have to pay GBP 1.00.
To get into Manchester is easy by many intercity trains or fast coach. If you bring the car then no problem as there are two car parks. The RITZ is near Oxford Road Railway station. lf you arrive at Piccadilly railway station then its only 7 mins walk down to Whitworth Street West. Please come WE NEED YOUR SUPPORT.

Alpiner Strategy How to make it to the top - Techniques for winning at Alpiner - by Edwin Strong

In Alpiner you have to climb six mountains. There are different animals and hazards to avoid.

The first two mountains are quite easy. On Mountain 3 (Kenya) and from then on try and keep half your Alpiner on the left of the screen and half on the right (your Alpiner will be split in half) so that if a rockslide comes you can dodge it easily, unless there is an animal or tree stopping you. Even if there is an animal there it is better to take a few penalty steps than to lose a life and fall down the mountain.

On Mountains 2 or 3 you encounter vulture nests which are not very dangerous and easy to pass unless you stay still for a long time. If you want to see a vulture fly over with a rotten egg without losing points, then bump into the nest 3 times with your Alpiner's head or arms (making sure there are no objects below you) and a vulture will appear.

From Mountain 5 (6 or so) onwards try and get to the right side of the screen as soon as possible because a rockslide can start falling as soon as you have passed the first object. At the top of Garmo you sometimes encounter mountain rams and bat holes. Only go for the bonuses if you can see the top of the mountain as there will be no more rock slides. If you want to see the bats then use the same technique as with the vulture nests, only hit the bat hole 7 times. If you see bonuses on mountains 1, 2, or 3, always have a go at getting them.

Mountain 6 (Everest) is the most difficult. Play exactly the same as Garmo except when your elevation gets to 7,000 ft, move to the right side of the screen as the abominable snowman always appears on the left side of the screen. Do not split in half as he will knock you down without you seeing him. After he has skied into you(knocking you back) he will come back again and again until you fall to about 7,000ft. 80% of the time you will hit an object and fall to the bottom of the mountain. Do not try to duck him a s he will come back again and drive you into the trees. The only way to get past is to keep on the right side of the screen and keep on going upwards.

On all the mountains wait until a rockslide has gone then make a run for it — don't hang about.

Level 2. On Level 2 you go back to Hood but on Mountain 7. There are different hazards, avalanches which are curved, blue and go very fast. They will send you down the mountain if they hit you. The rock slides go faster.

Level 3. I have never reached Level 3. The furthest I have managed is Everest on Leve1 2, Mountain 12, where I achieved a score of 91,104. I've seen it on a test game. (To get a test game you press SHIFT 8 then 3 then 8 and let go of SHIFT. Do this when the title screen appears.) Level 3 has another hazard, the ice fall, which is dark blue and extremely fast. Any hazard may come on any mountain which makes it impossible to get anywhere .

I always use the joystick as the keyboard is fiddly and you need eight fingers to play. I hope these tips will help you Alpinists out there.

read about addfreestats visitor tracker

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