Article View: rec.games.programmer
Article #513Re: RE: Vertical Retrace interrupt?
From: Khan
Date: Thu, 06 Aug 1992 14:42
Date: Thu, 06 Aug 1992 14:42
28 lines
2048 bytes
2048 bytes
In article <1992Aug6.154949.164290@dstos3.dsto.gov.au> egg@dstos3.dsto.gov.au writes: > >>No Josh, your wrong. Some VGA board create a vertical retrace interrupt >>whenever they enter the retrace period. A program would merely have to >>trap the interrupt to know when the retrace period is happening. > >I beleive its not a good idea to use the vertical retrace interrupt because > according to "Programmers Guide to PC and PS2 video systems" hardware >interrupts on IRQ2 cannot be distinguished from Vertical interrupts. I'm not >that cluey on the subject but if its in the book ??? Shouldn't you be able to distinguish interrupts based on the status of the CRT controller register? There's a bit which is set during the vertical blank, and reset otherwise. It seems to me that the interrupt service routine could check the value of this bit; if the bit is set, it would assume that the interrupt was generated by the video card, if reset it would assume that the IRQ was generated by some other hardware and chain to the next ISR in the vector chain. Not foolproof, but might be useful in certain situations where the chances of other hardware causing the IRQ are small or the other hardware has a positive method for determining whether or not IT caused the interrupt. For example, the Microsoft InPort card (a.k.a. the bus mouse card) has an Interrupt Identification Register which can be checked to determine if the InPort card (mouse) has caused an interrupt since the last time it was checked. Other hardware (UARTs, for example) have similar capabilities.
Technical Details
Message-ID:
<BsKGvE.Hpr@news.cso.uiuc.edu>Path:
arc1-ca.pugleaf.net!sparky!uunet!cs.utexas.edu!usc!sdd.hp.com!ux1.cso.uiuc.edu!news.cso.uiuc.edu!usenetReferences:
<1992Aug6.154949.164290@dstos3.dsto.gov.au>Show Full Headers
Complete Article Headers
Newsgroups: rec.games.programmer Path: arc1-ca.pugleaf.net!sparky!uunet!cs.utexas.edu!usc!sdd.hp.com!ux1.cso.uiuc.edu!news.cso.uiuc.edu!usenet From: tmkk@uiuc.edu (Khan) Subject: Re: RE: Vertical Retrace interrupt? References: <1992Aug6.154949.164290@dstos3.dsto.gov.au> Message-ID: <BsKGvE.Hpr@news.cso.uiuc.edu> Sender: usenet@news.cso.uiuc.edu (Net Noise owner) Organization: University of Illinois at Urbana Date: Thu, 6 Aug 1992 14:42:49 GMT Lines: 31