Re: Mix LGR and Text?
- From: "Michael J. Mahon" <mjmahon@xxxxxxx>
- Date: Mon, 19 Dec 2005 00:03:37 -0800
josephoswaldgg@xxxxxxxxxxx wrote:
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.
But the problem is that you cannot re-acquire *precise* lock using
VBL in a single poll. You can *verify* a lock, or correct up to a
single-cycle drift, with a single poll, but if you don't know exactly
where the edge will be, you can't poll fast enough to achieve single-cycle lock in one pulse.
Of course, if exact timing was not required, as in the case of page flipping during blanking, then there is no issue. The page flip can occur anywhere in hundreds of cycles. "Windowing" using precisely timed mode switches demands cycle-exact timing.
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.
Yes, using the "flag bytes" approach, it is possible to re-acquire precise lock. What I was saying applies only to the VBL case.
(I'm afraid I'm mixing together a couple of different sub-threads in this discussion. ;-)
-michael
Music synthesis for 8-bit Apple II's! Home page: http://members.aol.com/MJMahon/
"The wastebasket is our most important design tool--and it is seriously underused." .
- References:
- Mix LGR and Text?
- From: Bryan Parkoff
- Re: Mix LGR and Text?
- From: Jorge Chamorro Bieling
- Re: Mix LGR and Text?
- From: josephoswaldgg@xxxxxxxxxxx
- Re: Mix LGR and Text?
- From: Jorge Chamorro Bieling
- Re: Mix LGR and Text?
- From: Michael J. Mahon
- Re: Mix LGR and Text?
- From: josephoswaldgg@xxxxxxxxxxx
- Mix LGR and Text?
- Prev by Date: Re: Mix LGR and Text?
- Next by Date: Re: Mix LGR and Text?
- Previous by thread: Re: Mix LGR and Text?
- Next by thread: Re: Mix LGR and Text?
- Index(es):
Relevant Pages
|
Loading