Public Demo Thread
15-Nov-94 15:08:12
Sb: #877-Public Demo Thread
Fm: Jim Bucher 71543,2330
To: Fred Trafton 73132,2456
<You mean writing a second page while waiting for the vertical retrace so you
don't have to just sit and wait for the next one if it takes 2% too much time
for a single screen draw?>
Yes
<Would you do this on another X-Page and then flip between 3 pages instead
of 2?>
Right again.
<Also, what do you mean by "tearing"? You mean that (sometimes moving)
horizontal line across the screen where you see one frame on top and the next
frame on the bottom?>
Three for three.
<If what I said about triple buffering is right, how do you know when to jump
out of your 2nd-page-draw and flip pages? Can you set up an interrupt that
calls the page flipper during retrace? If so, how?>
You wait until you finish drawing to the page, and then flip pages. You
don't have to worry about when you flip pages, because the page flip will
not take effect until verticle retrace.
<And another thing – can't uou still do this in Mode 13?>
You can do this in mode 13h. As you know, in mode 13h you are using system
ram, that you copy to vram, instead of a true page flip. So you never know
if you are blitting the screen during retrace. To solve this problem you
have to sync the retrace with the timer so that you know approximately when
a retrace will happen.