🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: rec.games.programmer
Article #454

Re: Vertical Retrace interrupt?

#454
From: Matthew Smith
Date: Thu, 06 Aug 1992 17:11
45 lines
2727 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.  The
>>program could carry on doing its own thing until it gets the interrupt,
>>then it can update the screen.  No polling required.
>>I don't think the timer interrupt trick would work, even though the
>>interrupt could be generated 60Hz (or 70Hz), it still would not inform
>>the program that it is a safe time to write to the VGA.
>>
>>I have tried the retrace interrupt a little, without any real success,
>>an I would also like to know how to enable the retrace interrupt, and
>>how to signal to the VGA that the interrupt had been recieved.
>
>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 ??? Apparently bus versoins
>of the Microsoft mouse cause this problem, and possibly other hardware that
>use IRQ2. If you are still keen on using it, The book shows you how.
>
The problem is that for the interrupt controller was changed somewhere when 
the XT became the AT or something like that.  The original set of hardware
interrupts were limited from IRQ0 to IRQ7, however, they found that add in
cards needed more interrupts, so they added a second interrupt controller 
to give people IRQ8 through IRQ15.  However, to stay compatable with the 
original hardware, they daisy chained the new controller onto the old 
controller via IRQ 2.  The net result is that any IRQ above 7 also generates 
an IRQ 2.  

Given that background, if you have a network adapter (or some other hardware)
that uses an IRQ above 7, then you can't be sure that when you receive an IRQ
2 that it's the video card or not.  

Maybe at that point you could poll the adapter to see if it is the video card,
and if not, pass it on to the old handler? 

Thoughts?



Matt Smith
msmith@peruvian.utah.edu
Student - University of Utah Department of Computer Science
Technical Details
Message-ID: <1992Aug6.111142.29746@hellgate.utah.edu>
Path: arc1-ca.pugleaf.net!sparky!uunet!cs.utexas.edu!hellgate.utah.edu!peruvian.utah.edu!msmith
References: <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!hellgate.utah.edu!peruvian.utah.edu!msmith
From: msmith%peruvian.utah.edu@cs.utah.edu (Matthew Smith)
Subject: Re: Vertical Retrace interrupt?
Date: 6 Aug 92 11:11:42 MDT
Message-ID: <1992Aug6.111142.29746@hellgate.utah.edu>
Organization: University of Utah CS Dept
References: <1992Aug6.154949.164290@dstos3.dsto.gov.au>
Lines: 45