delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/1997/02/02/12:43:18

From: Shawn Hargreaves <Shawn AT talula DOT demon DOT co DOT uk>
Newsgroups: comp.os.msdos.djgpp
Subject: Re: Is there an interrupt on vertical sync?
Date: Sun, 2 Feb 1997 12:01:23 +0000
Organization: None
Distribution: world
Message-ID: <Wm0muKATII9yEwZp@talula.demon.co.uk>
References: <32f52f30 DOT 14440371 AT news DOT slip DOT net>
NNTP-Posting-Host: talula.demon.co.uk
MIME-Version: 1.0
Lines: 19
To: djgpp AT delorie DOT com
DJ-Gateway: from newsgroup comp.os.msdos.djgpp

Hamilton Feltman writes:
>Hi , I've been( programming in VGA )using allegro's Vsync to wait for
>the blit() function, but isn't there a way to generate an Interrupt
>when that vertical sync occurs? That way, I won't be wasting cycles
>constantly polling with vsync( If that's whats happening .) Would such
>an interrupt be present on most x86 hardware or  vga cards?

There is such an interrupt, but it isn't widely supported. A better
solution is to use the timer chip to simulate retrace interrupts, by
programming it to generate an interrupt shortly before each retrace is
due, and then polling the retrace register inside your handler to make
sure you stay in sync (you can do this in Allegro by calling
timer_simulate_retrace(TRUE)). The only trouble with this technique is
that it doesn't work under win95...

/*
 *  Shawn Hargreaves - shawn AT talula DOT demon DOT co DOT uk - http://www.talula.demon.co.uk/
 *  Ghoti: 'gh' as in 'enough', 'o' as in 'women', and 'ti' as in 'nation'.
 */

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019