[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Mix LGR and Text?



Michael J. Mahon wrote:
> Jorge Chamorro Bieling wrote:
> > Joseph,
> >
> > You're right, now I believe I understand: after finding (vsync or
> > whatever) by polling, you can be sure that you can use (whatever the
> > amount) of cycles before the next (vsync or whatever) arrives, so as
> > long as you don't exceed this number of cycles you'll be still in time
> > to lock to the next (vsync or whatever)...
> >
> > You have to split your code in chunks of no-more-than whatever cycles.
>
> Actually, once you achieve lock, you never look at VBL or the
> vapor lock bytes again.  You just count cycles perfectly, and
> the processor stays in exact sync with the video generator.
>
> It would be possible to re-sync, but if you were more than one
> cycle out of sync, it would take more than one field to
> re-establish precise sync.

It depends on the application. If you are done doing your video-related
work very early in the field, you could reacquire on the bottom of the
field. For instance, if you just want to avoid page-flipping outside of
VBL. Or have a few lines of text on the top of a otherwise graphics
screen.
Then, the exact amount of work you do is not important, as long as you
are done in time to reacquire.

Also, Lancaster's version of Vaporlock achieves precise lock in less
than one field. I think it needs only 4 video lines or so. First line
gives you 7 cycle resolution, second 3 cycles, third 1--2 cycles,
fourth exact. Or something like that.