delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/1997/12/02/23:46:34

From: Speed <speed AT remove-this DOT linux DOT dpilink DOT com>
Newsgroups: comp.os.msdos.djgpp
Subject: Re: Vertical retrace
Date: Tue, 02 Dec 1997 19:30:42 -0800
Organization: Erol's Internet Services
Lines: 25
Message-ID: <3484D262.EC190867@remove-this.linux.dpilink.com>
References: <3480FFFC DOT DAEC5D62 AT geocities DOT com>
NNTP-Posting-Host: 207.96.74.133
Mime-Version: 1.0
CC: carrac AT geocities DOT com
To: djgpp AT delorie DOT com
DJ-Gateway: from newsgroup comp.os.msdos.djgpp

I'll make this short... there are other variations (like waiting until
the retrace is in progress).  This waits for the start of the vertical
retrace period:

void Wait_Retrace() {
   while (inportb(0x3DA) & 0x8) {
       // do nothing if retrace is in progress
   }
   while (!(inportb(0x3DA) & 0x8)) {
       // do nothing - wait for start of retrace period
   }
   return;
}

In English: when a vertical retrace is in progress, bit 3 of Input
Status Register 1 (port 3DAh) is set.  Of course you could easily do
this in assembly or as a macro, to avoid the function overhead.

- Mark

Craig Rennie wrote:
> 
> How exactly do i wait for the vertical retrace?
> I cant find anything on it anywhere, except for Borland, which i have
> but it compiles grafix stuff slower than DJGPP.

- Raw text -


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