Mail Archives: djgpp/1997/02/11/18:48:31
On 4 Feb 1997 04:09:35 GMT, jlouwere AT galaxy DOT csc DOT calpoly DOT edu (Jan
Louwerens) wrote:
>Ian Mausolus (mausolus AT ican DOT net) wrote:
>: What is that vertical retrace stuff all about? Do you actaully have to
>: check to see if the video card or monitor is finished drawing to the screen
>: before displaying another picture? and how do you do that?
>
>You don't have to wait for vertical retrace, but it could make your
>animations look smoother by avoiding shearing.Her is how it's done:
>
>#include <pc.h>
>
>#define RetracePort 0x03DA
>
>void WaitVertRetrace(void)
>{
> while(inportb(RetracePort) & 0x08); // wait for end if already in VR
> while(!(inportb(RetracePort) & 0x08)); // wait for VR to start...
> // this way you get the entire VR
>}
>
>JL
>
Is there any way to have the vertical retrace generate a hardware
interrupt, so that you do not burn CPU cycles away waiting for it ?
- Raw text -