[This page at OSDev](https://wiki.osdev.org/VGA_Hardware) has lots of details
on the VGA system. I believe you can poll the registers to determine the
blanking period; I don't recall VGA supporting interrupts for this. But I could
be wrong.
Sent with [ProtonMail](https://protonmail.com) Secure Email.
‐‐‐ Original Message ‐‐‐
On June 30, 2018 10:00 PM, David McMackins cont...@mcmackins.org wrote:
> I'm new to graphics programming on DOS. My experience programming
> graphics on PC is on modern systems where I can use a library that
> handles all low-level calls for me. I know about Allegro, but it's kind
> of fat and I don't think it supports 16-bit.
> 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. On the Game Boy, for instance,
> there is a flag you can set which enables certain interrupts from the
> hardware, and you specify a function to be called on those interrupts.
> One of these is the vblank interrupt, which gets thrown once every frame
> so that the program knows when it is safe to draw.
> All the tutorials I can find online just use a while loop to constantly
> poll for the vblank state, but that seems very inefficient and could
> make it cumbersome to consider other types of interrupts.
> Surely there is a way, but I don't know where to look. Also, what about
> interrupts for mouse movement, etc.? Where is a good place to learn
> about this kind of thing, or perhaps a book to recommend?
> Happy Hacking,
> David E. McMackins II
> Supporting Member, Electronic Frontier Foundation (#2296972)
> Associate Member, Free Software Foundation (#12889)
> www.mcmackins.org www.delwink.com
> www.eff.org www.gnu.org www.fsf.org
> ---
>
> 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--
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