Mail Archives: djgpp/1994/10/14/20:36:53
> and secondly [and a little more technically] does any one know
> how to detect the video frame fly back signal from a VGA card?
>
Here you go (neither of these solutions is my original handiwork):
SOLUTION #1:
Waiting for the vertical retrace period is done as follow
mov dx, 3dah ; general register
_again:
in al, dx ; get raster status
test al, 8 ; test vertical retrace bit
jz _again ; if not in retrace sit in loop
SOLUTION #2:
I think you need to include one or both of pc.h and dos.h to use this
#define DISPIO 0x3DA
#define VRT_bit 8
/* Wait for Vertical Retrace before continuing */
while (inportb(DISPIO) & VRT_bit);
while ((inportb(DISPIO) & VRT_bit) == 0);
Good luck,
David Max
New York University
- Raw text -