Difference between revisions of "Triton Super Extended BASIC"
(→Simple Example of Use: add another graphics example - the plotting part)
|Line 179:||Line 179:|
Latest revision as of 00:43, 29 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
- 1 Summary
- 2 List of the NEW CALLS:
- 2.1 CALL ALL
- 2.2 CALL ALOCK, CALL SHIFT, CALL FCTN and CALL CTRL
- 2.3 CALL CHIMES, CALL BEEP and CALL HONK
- 2.4 CALL CLOCK and CALL CLKOFF
- 2.5 CALL CLSALL
- 2.6 CALL COLORS
- 2.7 CALL GOSPRT and CALL STSPRT
- 2.8 CALL GOTO and CALL GOSUB
- 2.9 CALL RESTORE
- 2.10 CALL KEYS
- 2.11 CALL NEW and CALL BYE
- 2.12 CALL CAT
- 2.13 CALL PEEKV and POKEV
- 2.14 CALL QUITON and CALL QUITOFF
- 2.15 CALL SCROFF and CALL SCRON
- 3 The bit map graphics in detail
command returned a value of 120.
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.
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.
from the command line will catalogue a disk drive directly.
You can also skip the XB auto-load by holding down enter.
now enables printer output to be any width you wish, 28 to match screen.
can now be sent to a printer.
List of the NEW CALLS:
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.
will close ALL open files (handy)
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.
also allows numeric variables to be used for the line number
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.
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
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 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
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.