www.delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/1997/02/04/00:58:58

From: jlouwere AT galaxy DOT csc DOT calpoly DOT edu (Jan Louwerens)
Newsgroups: comp.os.msdos.djgpp
Subject: Re: 2 graphics questions
Date: 4 Feb 1997 04:09:35 GMT
Organization: Cal Poly Computer Science Dept.
Lines: 21
Message-ID: <5d6cpv$b2o@waldorf.csc.calpoly.edu>
References: <01bc0fa6$3d6be440$5357f8ce AT 698130>
NNTP-Posting-Host: galaxy.csc.calpoly.edu
To: djgpp AT delorie DOT com
DJ-Gateway: from newsgroup comp.os.msdos.djgpp

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

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019