Date : Mon, 29 Jan 1996 17:21:29 +0000 (GMT)
From : John Sullivan <js10039@...>
Subject: Re: Vertical blank interrupt
On Mon, 29 Jan 1996, David Alan Gilbert wrote:
> > Tom Seddon <T.W.Seddon@...> wrote:
> >
> > ;I am aware that the vertical blank interrupt occurs 50 times a second,
but
> > ;I am unsure as to when it occurs. Does it occur when the visible display
> > ;area -- that is, 256 scanlines or (display character rows)*(scan
lines per
> > ;character row) -- has all been traced, or does it occur when all 312
> > ;scanlines (ie both visible and invisible) have been traced? Or is it
> > ;rather more weird than this?
> >
> > I didn't find out either, so I guessed at the value by trial and error
> > until the Elite screen looked right :)
>
> I found Rocket Raid was pretty critical of this; if you screw it up
you find
> that the ship disappears as you fly close to the top of the screen.
> I've just had a quick look at my code; its a long time since I did
it, but as
> far as I can figure I do the sync at the bottom just after the last
> displayed line is scanned out and take it off about a horizontal scan
line or
> so later.
The idea is that once you catch the VSYNC interrupt, you have to do all
your screen update before the next frame starts displaying (to avoid
flicker). It makes sense, then, to have this happen as soon as the
previous frame has stopped displaying.
(If your emulator isn't doing 'real' screen emulation then you should
probably wait an appropriate delay, *then* take a snapshot of the screen,
*then* generate a fake VSYNC to tell the program it can start drawing the
next frame.)
John
--
So much shit, that's what life would be.
So much lonely, aching, empty shit.
<a href="http://callisto.girton.cam.ac.uk/users/js10039/">Me!</a>