GfA BASIC TIPS & TRICKS by Stefan Posthuma
Time is running out. All the codeing took me a lot of time. I
promised to everyone (especially Richard) that I would publish ST
NEWS issue 3.3 on Monday, may 16 1988. At this moment, it is
Monday, may 16 1988, Willeke's birthday, and this is the last
article to write.
I got some questions which I will answer here:
- Why doesn't a compiled GfA program want to start automatically
when I place it in an AUTO folder?
The answer is quite simple: when you write a program, any program
in any language, and it uses GEM, you cannot start it from an
AUTO folder. This because the programs from an AUTO folder are
run before GEM is properly initialized by TOS. So you can run
only TOS and TTP programs. If you write a GfA program that
doesn't use any GEM things, you will be able to run it from an
AUTO folder. There are programs available - like GEMSTART - which
can start a GEM program from an AUTO folder.
- When I load a DEGAS picture, the screen is built up in rather
an ugly way, block by block. How can I evade this screen-building
and retain my color palette?
Well, here is the routine that will correctly load a DEGAS
picture:
Routine Degload(F$)
Pall$=Space$(34) ! 34 bytes for color palette
Sget Pic$ ! create string of 32000 chars
Open "I",#1,F$ ! open file
Bget #1,Varptr(Pall$),34 ! read color palette
Bget #1,Varptr(Pic$),32000 ! read picure data
Close #1 ! close file
Void Xbios(6,L:Varptr(Pall$)+2) ! set color palette
Sput Pic$ ! transfer picture to screen
Clr Pic$ ! free the 32000 bytes
Return
The last 'Clr Pic$' is not absolutely nessecary, but if you don't
want to keep the picture in Pic$, you can release the 32000 bytes
again by clearing Pic$.
- How can I use music created by Tommy Software's Musix32?
I am not quite sure because I don't have this program, but I
think it is something like this:
Let's say you've loaded the music data at adress X%, start the
playing with:
Void Xbios(32,L:X%)
The ST Intern book says that after command &H82 and argument 0
the music processing stops so I thought this might work:
A$=Space$(2)
X%=Varptr(A$)
Dpoke X%,&H8200
Void Xbios(32,L:X%)
But I didn't try this...(Murpy's law will command it won't work.)
- Finally, sometimes GfA doesn't recognise a change of diskettes.
This have previously been published in ST NEWS issue 2.8, and is
courtesy of STRIKE-a-LIGHT software:
Spoke(&H4DB8),1
Spoke(&h4DB9),1
Slpoke(&H4DCE+28),1
Slpoke(&H4DCE+28+32),1
Void Dfree(1)
Spoke(&H4DB8),2
Spoke(&H4DB9),2
Slpoke(&H4DCE+28),2
Slpoke(&H4DCE+28+32),2
That's it. ST NEWS is finshed!!
�
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.