Hello all,

I am also curious about this topic. I found a recent thread on VOGONS (https://www.vogons.org/viewtopic.php?t=58445), where Scali and others found, after some experiments, that some x86 machines do support a vertical retrace interrupt, when the IRQ (usually IRQ 2) is properly enabled --- but not all support it. I guess this is why many programs tend to use the polling method.

Thank you!

--
https://github.com/tkchia/build-ia16

On 07/01/2018 10:24 AM, Mercury Thirteen via Freedos-devel wrote:
[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 [email protected] 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
[email protected]
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
[email protected]
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
[email protected]
https://lists.sourceforge.net/lists/listinfo/freedos-devel

Reply via email to