GFA BASIC TIPS & TRICKS by Richard Karsmakers
This time, the reactions to my call to help people with their GfA
Basic programming problems really led to an overwhelming burst of
reactions. I now offer this service to readers of "ST" of the
Stichting ST, "Atari Magazine" of the SAG, "Clipboard" of the
Computer Club Eindhoven and, of course, ST NEWS. No wonder that
it really started now...
In a previous issue of ST NEWS we published a way to load in
directories using Gemdos functions. Mr. Friedrich Hofmann of
Babenhausen, West Germany, has sent in a way to do it without the
use of operating system calls. This program is Public Domain and
is spread on the same disk as the "Goldrunner" demo through our
PD library. Be careful - it writes on the disks it reads the
directory from!!
Another question that I tackled this time (with not insignificant
help of Robert Heessels from the "Strike-a-Light" software group)
is how to load other character sets. Unfortunately, this way only
works on monochrome monitors - but I don't think there'll be any
doubt that the problem will be solved for colour monitors as well
on short notice. By the way: This solution is for ROM TOS only!
This is the small program that does the job:
Reserve 10000
Pl1%=&H6032 !This is where the 8x16 fontheader is with ROM
Pl%=&H70000 !Here, the font is read into memory
Fileselect "a:\*.fnt","",N$
Bload N$,Pl%
Text 100,100,"Hello"
For I%=0 To 83 Step 2 !Convert and overwrite font header
Poke Pl1%+I%,Peek(Pl%+I%+1)
Poke Pl1%+I%+1,Peek(Pl%+I%)
Next I%
For I%=Pl%+88 To Pl%+346 Step 2
A%=Peek(I%)
Poke I%,Peek(I%+1)
Poke I%+1,A%
Next I%
Lpoke Pl1%+68,Pl%+Peek(Pl%+68)+&H100*Peek(Pl%+69)+
&H10000*Peek(Pl%+70)+&H1000000*Peek(Pl%+71)
Lpoke Pl1%+72,Pl%+Peek(Pl%+72)+&H100*Peek(Pl%+73)+
&H10000*Peek(Pl%+74)+&H1000000*Peek(Pl%+75)
Lpoke Pl1%+76,Pl%+Peek(Pl%+76)+&H100*Peek(Pl%+77)+
&H10000*Peek(Pl%+78)+&H1000000*Peek(Pl%+79)
Text 100,200,"Hello"
This small program is also added on the ST NEWS disk, in the
folder "PROGRAMS".
Another question that I received from someone when I was at ST
Club Tilburg recently (read an interesting story about this in
this time's "Did you know that..."), was the following: How can I
change the 'hertz' in GfA Basic?
Well, this is very simple to do (I also do it when the user
selects the 'Change Hertz' option in the 'Options' pulldown menu.
To 50 Hz:
Spoke &HFF820A,254
To 60 Hz:
Spoke &HFF820A,252
I would like to close this small article with one questions I
still haven't solved:
GfA Basic V2.0 knows the command called VDIBASE. It is actually a
kind of variable that stores an address of a piece of memory that
is used for GEM, clipping, etc. The questions: How large is that
piece of memory? How can it be used? Which locations have which
meanings? Are there any known 'nice' POKEs in that area?
See you next time, in ST NEWS Volume 2 Issue 4.
Disclaimer
The text of the articles is identical to the originals like they appeared
in old ST NEWS issues. Please take into consideration that the author(s)
was (were) a lot younger and less responsible back then. So bad jokes,
bad English, youthful arrogance, insults, bravura, over-crediting and
tastelessness should be taken with at least a grain of salt. Any contact
and/or payment information, as well as deadlines/release dates of any
kind should be regarded as outdated. Due to the fact that these pages are
not actually contained in an Atari executable here, references to scroll
texts, featured demo screens and hidden articles may also be irrelevant.