Article View: comp.sys.atari.st
Article #34066Re: Animation Topics
From: Leo de Wit
Date: Wed, 14 Sep 1988 06:56
Date: Wed, 14 Sep 1988 06:56
47 lines
2954 bytes
2954 bytes
In article <8809100453.AA01878@TIS.COM> dmb@TIS.COM (David M. Baggett) writes:
[much good stuff deleted...]
> It is true that you can change the screen pointer "by hand" by changing
>a location in page 4. Unfortunately this doesn't produce very nice
>results (Setscreen works better than any hack I've seen).
> Setscreen doesn't cause any delay at all. The call returns immediately.
Yes, unless it also sets the resolution; then it will wait for a VBL.
>However, if you change the physical screen base with Setscreen, the change
>won't _take effect_ until the next vertical blank. In other words, the
No. The physical screen base *IS* set immediately by Setscreen (by storing
values at 0xff????), as is the logical screen. If you want to have the
phys. screen address changed whilst in the VBL you have to set a long in
the system variables (not the logical base, of course), because the code to
set the physical screen is there (like you said). Or add a VBL routine
that does something similar (not very productive).
I don't know what the official documentation says about the subject, but
both the RAM TOS and the old ROMs behave in the manner I just described.
I quote myself (part of an article, I believe even the same subject).
------------------------------ S t a r t s h e r e -------------------------
I've got a copy of the book '3D Grafik Programmierung' from Data Becker.
It suggests that SETSCREEN swaps at vbl time. ***THIS IS NOT TRUE!!!***
(maybe you got the same impression). SETSCREEN does not wait for vbl
to set the screen(s); only if you also change the resolution it will wait
for vbl.
There's another 'know-it' about vbl:
You *CAN* set the screen at vbl time; this however sets logical and
physical screen to the same value (not suitable for your application).
The way to do this is: enter the new screen base into the system
variable screenpt ($45e). At vbl time the screens will be set then (I
think you have to refill it with 0 to avoid having it set all the
time).
------------------------------ E n d s h e r e -------------------------
If you want to use the vbl screen change, the way to go seems:
1) set screenpt to your new screen value.
2) wait for a vertical blank (either by the XBIOS call or by checking
for instance the logical base pointer against the new screen value).
3) enter 0 into screenpt to avoid having screens set at the next vbl.
4) set the logical base pointer to the correct value (it has been
changed by the vbl).
Leo.
Technical Details
Message-ID:
<802@philmds.UUCP>Path:
arc1-ca.pugleaf.net!utzoo!attcan!uunet!mcvax!hp4nl!philmds!leoReferences:
<8809100453.AA01878@TIS.COM>Show Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!utzoo!attcan!uunet!mcvax!hp4nl!philmds!leo From: leo@philmds.UUCP (Leo de Wit) Newsgroups: comp.sys.atari.st Subject: Re: Animation Topics Keywords: not again! Message-ID: <802@philmds.UUCP> Date: 14 Sep 88 06:56:26 GMT References: <8809100453.AA01878@TIS.COM> Reply-To: leo@philmds.UUCP (Leo de Wit) Organization: Philips I&E DTS Eindhoven Lines: 47