Mail Archives: djgpp/1997/12/02/23:46:34
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 -