Difference between revisions of "Triton Super Extended BASIC"
Stephen Shaw (talk | contribs) (add note re expansion ram being needed for graphics routines.) |
(Category) |
||
(2 intermediate revisions by one other user not shown) | |||
Line 96: | Line 96: | ||
Set up is a little awkuard as you must use CALL FILES(2) rather than the default (3), but otherwise quite easy. | Set up is a little awkuard as you must use CALL FILES(2) rather than the default (3), but otherwise quite easy. | ||
CALL DRAWNPLOT sets it up, and CALL LINK(" | CALL DRAWNPLOT sets it up, and CALL LINK("GCLEAR") sets up memory for you. | ||
===Drawing an image=== | ===Drawing an image=== | ||
Line 108: | Line 108: | ||
Pictures can also be saved and loaded to disk (in TI Artist format) | Pictures can also be saved and loaded to disk (in TI Artist format) | ||
===Simple | ===Simple Examples of Use=== | ||
====Plot a Bifurcation Plot on screen==== | |||
The program below is a routine for a chaotic graphics plot, and really does take a very long time to finish! The end result is interesting as total order, represented by a single line, becomes total chaos after repeated bifurcation.Super Extended Basic requires that you have the 32k ram attached, and you enter the graphics mode by typing the command sequence: | |||
CALL FILES(2) | |||
NEW | |||
CALL INIT | |||
CALL DRAWNPLOT | |||
Now you can input or load your program as follows: | |||
10 ! high resolution graphics using | |||
20 ! triton super extended basic and 32k ram | |||
30 ! after brooks, harding etc | |||
40 ! | |||
100 CALL LINK("GCLEAR") | |||
110 ! ORBITDGM PROGRAM | |||
111 ! or your own plotting routine here | |||
120 ! OR insert your program here: | |||
130 FOR C=-2 TO 0.25 STEP .00625 | |||
140 X=0 :: M=160*(C+2) :: FOR I=0 TO 200 | |||
150 X=X*X+C :: IF I<50 THEN 170 | |||
160 N=(180/4)*(2-X) :: CALL PSET(M,N) | |||
170 NEXT I | |||
180 CALL LINK("MOVE",80,160) | |||
190 CALL LINK("LABEL","Press E to Exit") | |||
200 CALL LINK("SHOW") | |||
210 STOP | |||
999 ! this is the actual drawing bit | |||
10000 SUB PSET(X,Y) | |||
10010 CALL LINK("MOVE",X,Y) :: CALL LINK("DRAW",X,Y) | |||
10020 SUBEND | |||
====Load and print a TI Artist picture==== | |||
Using the graphics: | Using the graphics: | ||
a. Set up in command mode | a. Set up in command mode | ||
Line 135: | Line 167: | ||
500 CALL LINK ( "GCLEAR") | 500 CALL LINK ( "GCLEAR") | ||
510 GOTO 100 | 510 GOTO 100 | ||
520 END | 520 END | ||
===Technical=== | ===Technical=== | ||
Line 147: | Line 179: | ||
[[Category:Programming language]] | [[Category:Programming language]] | ||
[[Category:Module]] |
Latest revision as of 22:43, 28 April 2018
TRITON SUPER EXTENDED BASIC amalgamated a number of TI XB mods prepared for Gram device owners. It was supplied on a standard module and required expansion memory to use the graphics routines.
Authors: D.C.Warren. Danny Michael, Mike Dodd, and the graphics routines by H. Shillingburg
Summary
CALL VERSION(A)
command returned a value of 120.
New commands
included CALL CHIMES, CALL ALOCK, CALL ALL, a very useful CALL CAT, CALL CLOCK (runs slow in the UK), GOSUB and GOTO with variables.
Enhanced editing features
which allow you to move, copy, delete or resequence PORTIONS of an XB program quite rapidly. RESEQUENCE has been deleted but you can still use RES.
Graphics
Also it has included on ROM a commercial machine code bit map graphics program called DRAW N PLOT. This allows you to plot bit map graphics, but only off screen- only when completed can you SHOW them, although there is a cursor on screen when you SHOW which allows direct editing. Graphics can be saved and printed and the format is compatible with TI ARTIST.
There is a major conflict in use of VDP between the bit map graphics feature and an XB program, and hang ups may be frequent, especially if you PRINT the picture.
Triton XB requires 32k ram for the graphics feature. There is a graphics program available (CLASS) for Triton XB.
CALL CAT
from the command line will catalogue a disk drive directly.
Auto Load
You can also skip the XB auto-load by holding down enter.
LIST
now enables printer output to be any width you wish, 28 to match screen.
TRACE
can now be sent to a printer.
List of the NEW CALLS:
CALL ALL
quickly fills the screen with a designated character.
CALL ALOCK, CALL SHIFT, CALL FCTN and CALL CTRL
all return a 0 or l depending on whether the relevant key is pressed- CAUTION there is a "bug" whereby pressing the FCTN key causes the other CALLS to SOMETIMES give false return values!
CALL CHIMES, CALL BEEP and CALL HONK
may impress you
CALL CLOCK and CALL CLKOFF
give you the usual interupt driven clock, in the top right hand corner, which assumes 60 interrupts per second and so runs slow outside the USA. The clock can be set/reset with a CALL LINK.
CALL CLSALL
will close ALL open files (handy)
CALL COLORS
will quickly change the colours of ALL character sets
CALL GOSPRT and CALL STSPRT
will stop and start sprite motion, allowing you to set up a multiple-sprite image which does not tear apart as it starts moving.
CALL GOTO and CALL GOSUB
allow you to use numeric variables for the line numbers.
CALL RESTORE
also allows numeric variables to be used for the line number
CALL KEYS
is a really nice one. Let's look at an example:
OLD TI XB: 100 CALL KEY(0,A,B) 110 IF B<'>1 THEN 100 120 B=POS("ESDX",CHR$(A),1) 130 IF B<1 THEN 100
TRITON SXB: 100 CALL KEYS("ESDX",B)
CALL NEW and CALL BYE
are fairly obvious! CALL RUNPROG allows the use of a string variable.
CALL CAT
to obtain a disk directory FROM COMMAND MODE ONLY is very useful
CALL PEEKV and POKEV
read and write VDP ram, while CALL PEEKG reads GROM. There is also a POKEG should you have a module with GRAM (know of any???)
CALL QUITON and CALL QUITOFF
fairly understandable
CALL SCROFF and CALL SCRON
turn the screen display on and off
The bit map graphics in detail
In addition, IF you have 32k ram, you can access a bit-map graphic utility, which is Quality Software's DRAW N PLOT, actually built into the Module.
Set Up
Set up is a little awkuard as you must use CALL FILES(2) rather than the default (3), but otherwise quite easy.
CALL DRAWNPLOT sets it up, and CALL LINK("GCLEAR") sets up memory for you.
Drawing an image
You can then construct a picture in a pad area, using CALL LINK's to MOVE, DRAW, CIRCLE, SQUARE, LABEL. and then move the picture from pad to screen with SHOW
OR you can use your joystick to draw a picture by linking to EDIT, which gives a number of single-key press commands for clearing the screen, inputting text, drawing lines, squares and circles, filling shapes with black, toggle write/erase. From both SHOW and EDIT exit is by pressing key E
Edit / Save
Pictures can be dumped to printer in two sizes. Manual error here. Don't use PIO as suggested, but the more normal graphics "PIO.CR".
Pictures can also be saved and loaded to disk (in TI Artist format)
Simple Examples of Use
Plot a Bifurcation Plot on screen
The program below is a routine for a chaotic graphics plot, and really does take a very long time to finish! The end result is interesting as total order, represented by a single line, becomes total chaos after repeated bifurcation.Super Extended Basic requires that you have the 32k ram attached, and you enter the graphics mode by typing the command sequence:
CALL FILES(2) NEW CALL INIT CALL DRAWNPLOT
Now you can input or load your program as follows:
10 ! high resolution graphics using 20 ! triton super extended basic and 32k ram 30 ! after brooks, harding etc 40 ! 100 CALL LINK("GCLEAR") 110 ! ORBITDGM PROGRAM 111 ! or your own plotting routine here 120 ! OR insert your program here: 130 FOR C=-2 TO 0.25 STEP .00625 140 X=0 :: M=160*(C+2) :: FOR I=0 TO 200 150 X=X*X+C :: IF I<50 THEN 170 160 N=(180/4)*(2-X) :: CALL PSET(M,N) 170 NEXT I 180 CALL LINK("MOVE",80,160) 190 CALL LINK("LABEL","Press E to Exit") 200 CALL LINK("SHOW") 210 STOP 999 ! this is the actual drawing bit 10000 SUB PSET(X,Y) 10010 CALL LINK("MOVE",X,Y) :: CALL LINK("DRAW",X,Y) 10020 SUBEND
Load and print a TI Artist picture
Using the graphics:
a. Set up in command mode CALL FILES(2) NEW CALL INIT CALL DRAWNPLOT CALL LINK("GCLEAR")
b. Now run this program which will load a TI Artist image from disk and allow you to print it in two sizes:
100 DISPLAY AT(4,2)ERASE ALL:"TI ARTIST FILE NAME?" 110 DISPLAY AT(6,6):"DSK1. _P" 120 ACCEPT AT(6,9)SIZE(-10) :A$ 130 A$="DSK"&A$&"_P" 140 CALL LINK("GLOAD",A$) 150 REM PRESS E TO EXIT 160 CALL LINK("SHOW") 170 CALL COLORS(2,15) 180 PRINT "PRESS S TO PRINT SMALL PIC" 190 PRINT "PRESS L TO PRINT LARGE PIC" 200 PRINT 'PRESS C TO CONTINUE" 210 CALL KEYS("SLC",A) 220 ON A GOTO 300,400,500 300 CALL LINK("GDUMP","PIO.CR"):: GOTO 500 400 CALL LINK("LDUMP","PIO.CR") 500 CALL LINK ( "GCLEAR") 510 GOTO 100 520 END
Technical
NOTE: The DRAWNPLOT machine code is transferred from the module to low mem - the 8k area of the 32k ram- so there is little room for other machine code routines to co-reside. The actual plotting takes place in hi-mem (the 24k area used by your XB program) so there is only some 17k available for your XB program.
In practice, I have found that when using a SMALL XB program to do some heavy plotting, there has been interference with VDP RAM, which is not supposed to be used until you transfer the image with SHOW. At the lowest level this interference took the form of odd recolouring or character redefinitions, but at the extreme, frame hold was lost and the console locked up.
I encountered no problem using EDIT or GLOAD, only in producing hi res graphics from a running XB program using the LINKS provided, and then only after heavy repetitive use.
Provided you are not using GSAVE, it appears to be an adequate solution to insert a CALL DRAWNPLOT (not documented but you CAN use it in a running program), in between each plot in order to clear this problem, but if you use GSAVE, I have not yet found a solution, and would welcome suggestions! As it stands, if you use an XB program to plot a picture then GSAVE it, you really need to restart the program for a further plot, otherwise the XB screen will corrupt and you may lock-out.