Enabling VSync should take care of tearing; I think the VESA spec has a way to
enable that feature internally without you writing code for it.
Also, proper double buffering will go a long way towards eliminating tear and
flicker.
Sent from ProtonMail mobile
Original Message
Hello Mr. Bertho,
Thanks for the tips. However, I suspect that knowing when exactly
vertical retraces occur is still relevant to modern monitors (and OSes),
where one needs to prevent "screen tearing" and other nasty artefacts.
So I would think it is still useful to know how to do it right.
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
Interesting! Thank you for researching this. Sadly, this guy's program
is just a binary. I would be curious to read it and see exactly how he
did it. I would like to implement a function to test if this works so
that programmers can use it when available or otherwise use polling.
The big concern
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
[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
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