www.delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/1996/12/30/14:08:51

From: aleksi AT kalliot DOT pp DOT fi (Aleksi Kallio)
Newsgroups: comp.os.msdos.djgpp
Subject: Re: Hello All
Date: Tue, 31 Dec 1996 08:38:53 GMT
Lines: 16
Message-ID: <32c7e0ec.1004797@news.eunet.fi>
References: <9612262139 DOT AA04120 AT ss0 DOT eng DOT wayne DOT edu>
NNTP-Posting-Host: kalliot.pp.fi
To: djgpp AT delorie DOT com
DJ-Gateway: from newsgroup comp.os.msdos.djgpp

>I am new to djgpp and programming.  Can some1 help me write a function to
>dectect a vertical retrace.   

void WaitVSync()
  {
  while ( inp(0x3DA) & 0x08) {}
  while (!inp(0x3DA) & 0x08) {}
  }

This is slow, because it first waits vert. ret. to be on, and start
again. So you can remove second line if you want, but then if vertical
retrace were just about to stop there isn't enough time to copy double
buffer to screen. And it flickers, but not much. 

Aleksi Kallio

- Raw text -


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