On Sat, 30 Jun 2018 ,David McMackins wrote : > Anyway, I'm figuring out VGA and VESA graphics programming, but one > thing I can't find is how to wait for an interrupt to tell me when the > vblank period starts so that I can vsync. The vertical interrupt was indeed part of IBM's original video systems for the PC (MDA,CGA, EGA), up to and including the original VGA for the PS/2, but don't count on it on any modern VGA,SVGA, etc (in-)compatibles ! The main use for monitoring that interrupt (where available) was in order to avoid so-called "snow" effects, but that would be before fast, dual-ported "VRAM" were introduced. There is no need to coordinate video memory accesses to/from CPU and the video adapter any more; the only remaining use for hooking vertical retrace I can think of is in order to measure vertical retrace frequencies, and that doesn't require the interrupt - simply poll the V-retrace bit = bit 3 at input port 3DAh (or 3BA in B/W mono).
Anyway... if your, presumably very old, VGA card did support the Vertical interrupt, it should be routed as IRQ 9, interrupt #71h, on an AT-compatible (IRQ 2 on an original PC or PC/XT). On the EGA/VGA, you'd have to ENABLE that V-retrace interrupt explicitly, by REsetting bit 5 of the CRTC register #11h, and then hook the HW interrupt in your programme, of course. In any case you are welcome to try your HW for generating that interrupt, using the preceding indications, there are no risks in testing IMHO : but there is also very little chance of success on any PC video system less than 25 yrs old :=) HTH anyway, and happy hackings -- Czerno ------------------------------------------------------------------------------ Check out the vibrant tech community on one of the world's most engaging tech sites, Slashdot.org! http://sdm.link/slashdot _______________________________________________ Freedos-devel mailing list Freedos-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/freedos-devel