Jump to:
What program is (disk file) for? || Caring for magnetic tapes || Basic: Number correct to N places
Unreadable Display Variable 80 files || Debugging Ed/As file ASSM2
Basic with PRK/Stats- Enhanced Basic Part 2- CALLS: L,P,H,G,S
This web page contains the text of articles for owners of the TI-99/4a from Issue 21 of TI*MES. It is of use to users of the TI-99/4a emulators.
Three members reported to have died during the year were Ian Martin, John Roe and Ron Johnson.
I loaded the LOADER-LOAD program into the computer, then loaded Star Trek. This had to be done in three parts, but was no problem. The game started straight away, no waiting as with Basic programs. Defender loaded the same and worked first time.
Star Trek is an 18k program, Defender is slightly smaller. There are over fifty programs on the list Stephen sent me, all in machine code. If you have Editor-Assembler module you can load even faster without using the LOADER-LOAD program.
Mr K.F.Hughes, Bristol
Historic Note- I had forgotten all about this. I don't think anyone else followed this up, including Mr Hughes. The games referenced were former TI modules, by this time treated as "abandonware" and freely circulating on disk.
The error lies in the DSRLNK routine which the assembler uses - it does not use the same routine that YOUR programs call! The assembler internally uses a modified VSBR routine which returns data to R0 instead of the usual R1, but whoever wrote the internal DSRLNK forgot this!
Consequently, the assembler looks at R1, and the program uses an incorrect name length when scanning for the device name! Adding the period causes the routine to exit, and "catches" the error.
Want to fix it? If you still have the original ASSM2 file, use a sector editor look for the code 04 20 AA BE 00 00 D1 C1. It is usually in the 8th sector of the file.
Change that last C1 into a C0 and the Assembler will work as it is supposed to! No need to add a full stop after PIO now!
Courtesy Danny Michael (Dump and Neatlist author), SHOALS 99ERS
The text from Rambles below has been taken directly from a TI99/4a DV80 file and has not been subject to the problems of OCRing!
RAMBLES July 1988
by Stephen Shaw. STOCKPORT, Cheshire, UK
RESULT=INT(NUMBER+0.5)But if you want to display a number correct to a certain number of digits? A little more difficult but not impossible..
RESULT=INT(NUMBER * P+0.5)/PWhere P=the power of ten of the number of places to be rounded. Thats easy isn't it? To round to two places,
P=100 which is ten squared or ( 10^2 )
RESULT=INT(ABS(NUMBER)*P+0.5
)*SGN(NUMBER)
100 SUB PLACES(NUMBER,PLACE
S,RESULT)
110 P=EXP(PLACES*LOG(10))
120 RESULT=INT(ABS(NUMBER)*P
+0.5)/P*SGN(NUMBER)
130 SUBEND
1 CALL PLACES(2.3456,3,RESULT)
2 PRINT "Result:":RESULT
3 STOP
eg from ..9BD3A87F131F 0001 ..5A47F196F 0002 ..A127F1BFF 0003 shorten to: ..9BD3A8F 0001 ..5A4F 0002 ..A12F 0003-eg remove the 7 tag and the next four characters. Leave the final F.
Just one more capability the TI99/4A has that has not been documented. Now we have the FUNLWEB LOAD program, tape owners can find it much easier to load machine code into their 32k rams using memory image files. Much faster. Editor Assembler module owners can just use the LOAD PROGRAM FILE option and indicate CS1. - it really was clever of TI - the ONLY loader that TI supplied to enable cassette owners to load machine code into expansion ram, and it is sold on a high priced package- module, huge manual, and two disks. Thanks to George Meldrum, TIsHUG. May 1988.
DEF CHECK
.
CHECK MOVB @>8344,@>8344 * >8344 IS 0 IF XB NOT IN RUN MODE
JEQ NORUN
B *R11 * EVERYTHING OK SO RETURN ELSE:
NORUN CLR @>83C4 * TURN THIS ROUTINE OFF (ISR HOOK)
LI R1,>6372 * XB GROM START
* MAY NOT WORK WITH SOME XB VERSIONS
MOVB R1,@>9C02 * WRITES >63 TO GROM WRITE ADDRESS REGISTER
SWPB R1
MOVB R1,@>9C02 * WRITE >72 TO GROM WRITE ADDRESS REGISTER
B @>006A * EXECUTE XB
AORG >83C4
DATA CHECK * PLACE THIS ROUTINES ADDRESS AT >83C4
END
"We do not know what is going on in England. we know the Queen is still kicking and alive (God save Her!), but we are afraid the TI-99/4A is dead there." Huh? Written by Paolo Bagnaresi, Milan, Italy, in August 1986, to Ottawa, Canada. Guess our reputation hasn't got to Italy just yet then!.
INFOCOM adventures are not all FULLY logical- there is a RANDOM element in some
of them which means that sometimes you die and sometimes you live... and an
interesting command to type in to your INFOCOM adventures is $VE try it!
There is a #RAND command in Lurking Horror, which expects a number before/after
it, not sure what it does but I think it may determine the path when you come
to a random choice. HITCHHIKER has a total vocabulary of 969 words- have you
found them all yet? KILL ADAMS? Some odd commands, purpose unknown include
XYXXY and ZZMGCK - the latter may just be an end of file dummy. SUSPENDED has a
vocabulary of 680 words, but you can complete it with just 35, that's real
overkill!.
In order to produce those odd European characters, printers use ASCII codes
outside the usual range of Vn 1 of TI Writer, so Vn 2 was modified to accept
them, and the tab info had to be modified as well. And as their tab data is
outside the capabilities of our version to handle, the result is a console lock
up. Curing the problem was difficult, until our membership secretary dealt with
it....
In the April 88 issue of EAR99'ers newsletter, he presented a program to amend
the tabs on a Vn 1 TI Writer file- largely to demonstrate the way the tabs are
saved. What was interesting was that by appending a new tab set, the original
set is "replaced". If it works for version one, why not try appending a version
one tab set onto the end of a version two file?.
It works! The following routine is a much modified form of his program. If you
cant load any DV80 file, amend it with this trifle and try again!.
100 REM MAKE VN 2 TI WRITER FILE ACCEPTIBLE TO VN 1 based on an idea by Peter Walker. UK. 1988. 110 DISPLAY AT(2,2)ERASE ALL :"INPUT NAME OF FILE TO BE": "MODIFIED:" 120 DISPLAY AT(6,2):"DSK1." 130 ACCEPT AT(6,5)SIZE(-12): FILE$ :: FILE$="DSK"&FILE$ 140 OPEN #1:FILE$,DISPLAY,VA RIABLE 80,APPEND 150 A$=CHR$(128)&CHR$(134)&C HR$(128)&CHR$(212)&RPT$(CHR$ (213),16)&CHR$(128)&CHR$(136 ) 160 PRINT #1:A$ 170 CLOSE #1 :: PRINT "DONE" 180 END
PR BASE HINTS:.
Sorting and so on are based on an ASCII STRING and everything works according
to the ASCII values of the characters. Thus while 4 comes after 2, 22 will come
before 4. Use leading zeroes on numbers you are sorting by- then you will
correctly find the sort as 02,04,22..
Selective Indexing search works on your input UP TO the first space, so that
"good day" will only work on "good". To use the whole thing, you must insert a
question mark, thus "good?day"..
PLEASE will someone write tutorials for us for PRBASE and CFS!.
CLEAN EVERY 10 HOURS PLAYING TIME. .
If you use a head cleaning tape, discard it after ten uses, after that it just
spreads dirt around..
Tape heads become magnetised over a period of time- as the tape passes over
them, the heads gradually build up a magnetic charge from the tape. This could
produce increased background hiss, and might eventually result in tapes
becoming partly (and irrevocably!) erased while being played. Demagnetise your
heads AT LEAST once a year. Special cassette-shaped devices can be bought and
are safest to use. .
(With thanks to Manchester City Council-Cultural Services)
ADDITIONAL: The material used on all magnetic tapes (cassettes and VHS videotapes) is very unhappy with any contact with water. If you keep the tape quite dry throughout its life, it can last for decades. However just half an hour in high humidity (a damp room in a charity shop or a market stall in the rain) and after the tape has dried out, chemical processes will be in process, and sooner (from 6 months to 2 years or so depending on the coating) rather than later the coating will begin to smell of vinegar and become really sticky. Do everything you can to keep your tapes dry at all times.
==========.
ATARISOFT BUG:.
In case you just find one, the early Atarisoft modules for the TI99/4A do not
all work properly in SOME consoles. Atari downloaded the "large character set"
from grom 0, but used a direct address instead of the indexed address, and yep,
some consoles are 4 bits out on the direct address. It means those characters
look kinda Japanese....
=====.
MILTON BRADLEY BUG (and others):.
Some MB games intended to use speech have a bit of a problem when loaded from
disk dumps into the 32k ram. The delay in testing for speech is just not long
enough (see EdAs manual pages 349/350), so sometimes the games will fail to
identify that you have a speech synth, and give no speech. .
====== .
TI FORTH DEBUG.
The following corrections have just surfaced from Ottawa- passed on without
testing. Change a COPY of your Master Disk!.
Screen 58 line 10 to read:.
.
VDPMDE @ 4 < IF SMTN 80 0 VFILL 300 ' SATR ! ENDIF.
Screens 53,54,54 line 1 should end SETVDP2..
Screen 59 line 9 change 00FF to OOFE
Or what You Can Do when you have the Personal Record Keeping or Statistics modules inserted into your console, or, if you have loaded the modules from disk image files, if your console thinks they are inserted...
Last issue we dealt with the really easy bit, the equivalent calls to ACCEPT or DISPLAY data.
This issue we shall dive into the mysteries of CALL L (load), CALL P (partition), CALL H (header), and CALL G (getput).
The best way to introduce these perhaps is with a working program, then in the next issue we can get down to a little more detail!
Program first, then discussion. This program will use an already created PRK data file, and in the TI Basic environment will read that data and display it on the screen. It will demonstrate several of the calls in a fairly simple manner, so you can get used to the idea of using PRK data in a Basic program.
If you have a disk system, first free up memory by typing:
CALL FILES(1) NEWbefore you load and run this program.
As this program occupies some VDP memory, you may find that a few PRK data files will be too long to load. Try deleting some records to make the data fit.
Remarks will be in lower case between the program lines
BEFORE LOADING THE PROGRAM you must allocate an area of VDP memory for the data, by using the partition command, in command mode, thus:
CALL P(10900)
NEW
Now load the following program and run it:
first 1oad the prk file from disk or cassette
100 CALL L("CS1",Y)
or call L("dsk1.fi1ename",y) as you wish
now to check to see if the file is loaded
110 IF Y=0 THEN 500
no there was an error
else carry on as follows
how many fields in each record? lets find out
120 CALL H(1,5,0,F)
where f will return number of fields
130 CALL CLEAR
140 CALL D(1,1,28,"# OF FIELDS:"&STR$(F))
then we need to know how many records there
are in the data file- think of a record as a page.
150 CALL H(1,6,0,R)
160 CALL D(2,1,28,"# OF RECORDS:"&STR$(R))
now let's loop through each record and
display it on the screen
170 FOR RCD=1 TO R
taking each field in turn
180 FOR FLD=1 TO F
but does the field contain a number or a string?
let's find out:
190 CALL H(1,10,FLD,TYPE)
200 IF TYPE=1 then 240
as type is 0, data is a number
get the data from field FLD of record RCD:
210 CALL G(1,RCD,FLD,Z,RD)
and print the result on screen:
220 CALL D(2+FLD,1,28,RD)
and jump over string section
230 GOTO 260
this is the string section:
240 CALL G(1,RCD,FLD,Z,RD$)
250 CALL D(2+FLD,1,28,RD$)
that's one field dealt with, on to the next:
260 NEXT FLD
and now all fields in the record are on screen
let's give the record number and pause
270 CALL D(23,18,10,"RECORD:"&STR$(RCD))
280 CALL D(24,1,28,"PRESS ENTER FOR NEXT")
290 CALL A(24,28,1,RC,RV$)
and on to the next record
300 NEXT RCD
310 PRINT "NO MORE"
320 GOTO 320
500 CALL CLEAR
510 PRINT "LOAD ERROR"
520 GOTO 520
530 END
CALL P sets aside an area of memory for the data to be stored in, and must of course be sufficient to hold the data, but for Basic use, we must also have enough room for our Basic program. After using CALL FILES(1), disk users have a maximum of 12768 bytes of VDP RAM free to split between Basic program and data area, while cassette users have 13820 bytes available (see how much memory a disk system eats up). By using 10900 for our data, we have left even disk users with at least 1868 bytes for our little program!
CALL L just loads the data file into the partitioned area, the return variable following the device/file name is a 0 (zero) if an error occurs, for instance, the file is not on the disk, the data is too large for the partition, or other I/O errors. The device/filename may be a string variable if you wish, e.g. CALL L(A$,A)
CALL H deals with the "header" information- the database specification you create when using PRK/Stats what sort of data is held in each field and what name have we given the field?
Looking more closely at the usages in the listing above - there are many other uses-
CALL H(1,5,0,F)
CALL H(1,6,0,R)
CALL H(1,10,FLD,TYPE)
The first digit (1) is a READ instruction. We would use a 0 to write.
The second digit (above we have used 5, 6 or 10) is the header item number obtained from the header data:
Where 5 is the number of fields per record,
Where 6 is the number of records
Where 10 is the type of field, indicated by a value placed in the final variable (TYPE here) and if it returns a 1 the field is a string, a 2 indicates an integer, 3 a decimal number, and 4 a number in scientific notation.
The fourth digit is a variable placed in or obtained from the Header data.
There are another eleven header items to cover at some point, and also the writing of data.
CALL G deals with the actual data we have stored, and as used in the listing above, (there are other uses...):
CALL G(1,RCD,FLD,Z,RD)
CELL G(1,RCD,FLD,Z,RD$)
The first item (1) is a READ instruction, with 0 used to write.
The second and third items identify the record and field number that we are going to read/write, while the final item is the variable that the contents of that particular record/field will be placed in for us to use.
Note that we must use a string variable for characters.
That fourth item (Z) is a numeric variable, which can be used to indicate blank field. It takes a value of 0 if data is found, and 1 if data is missing (that is, not entered).
When using CALL G to WRITE, the fourth parameter as above is not used, you just go on to the value you are writing, for instance:
CALL G(0,RCD,FLD,"STRING INPUT")
That fully covers CALL G, apart from a sample of how to write.
CALL S will Save the data area to cassette/ disk, very easily indeed: CALL S(DEVICE$,VARIABLE) with the variable again indicating success or failure, as with CALL L.