Re: Fade.obje

 BBS: Inland Empire Archive
Date: 11-22-92 (10:27)             Number: 349
From: RICH GELDREICH               Refer#: NONE
  To: RICK PEDLEY                   Recvd: NO  
Subj: Re: Fade.obje                  Conf: (2) Quik_Bas
>  On 11-19-92 Rich Geldreich wrote to Raymond Keith...
>
>  RG>     After each frame of the fade, wait for the vertical retrace:
>  RG>
>  RG>     WAIT &H3DA, 8
>
> Rich, I posted a little doohickey that used this statement, and
> several people reported even _more_ flicker than when it wasn't
> used at all, though it worked fine on my ATI XL. Any idea why,
> other than what we already know: "not all video cards were created
> equal"?

    A WAIT &H3DA,8 waits for the start of a vertical retrace. A vertical
retrace is when the monitor's scangun rapidly swings from the bottom of
the screen to the very top, for the start of the next frame. If you're
fast enough, you can modify video memory(and DAC registers) in this
"window", without the danger of creating noise or other ill affects on
the screen.

    Since you were using QB's graphics statements in that example, you
probably couldn't get your graphics done in enough time(if you used the
WAIT, and then modified the screen). If you were using it after a page
flip with SCREEN(like I did in the 3-D wireframe program), then it
should of cleared away any flicker.

    Wait a second! There's one more thing. If somebody's using a REALLY
fast machine, the program could possibly do 2, or more, frames during 1
vertical retrace period. This could cause flicker. Instead of a single
WAIT &H3DA,8, try:

    WAIT &H3DA,8,8:WAIT &H3DA,8

    I did the same thing in the ASM fader I reposted. The first WAIT
pauses 'till the _end_ of the vertical retrace, and the second pauses
for the start of the vertical retrace... Since I have a very slow
machine, I didn't realize this until a few days ago when I tried out
one of my progs on a 386/40...

    Rich

--- MsgToss 2.0b
 * Origin: Computer Co-Op - Voorhees, NJ | Ted Hare (1:266/29)
Outer Court
Echo Basic Postings

Books at Amazon:

Back to BASIC: The History, Corruption, and Future of the Language

Hackers: Heroes of the Computer Revolution (including Tiny BASIC)

Go to: The Story of the Math Majors, Bridge Players, Engineers, Chess Wizards, Scientists and Iconoclasts who were the Hero Programmers of the Software Revolution

The Advent of the Algorithm: The Idea that Rules the World

Moths in the Machine: The Power and Perils of Programming

Mastering Visual Basic .NET