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

Re: Mix LGR and Text?



Jorge Chamorro Bieling wrote:

In order to switch in/out a *known*, fixed band of every single picture
frame you'd need to be able to lock to the vertical sync. If not, you
can only be sure that you're switching in/out a certain portion of the
frame at the right frequency. I believe IIe's have had vsync
memory-mapped, but i can not figure out how did you manage to know when
it's vsync-time on an a2, a2+ ?

AFAIK, you store certain values in the last few bytes of the visible screen and make sure those values are nowhere else in your screen. Then you keep reading some unconnected I/O location. Since nothing is driving the data bus when you read those, the data that the video display circuitry put on the bus will still be there for the CPU to see. As soon as you see your data, you're locked in and then you only have to keep your cycle counts.

Also, being such a time-critical loop, if not interrupt-driven, there's
not much you can do while in-the-loop, or the whole thing stops being
in-sync... ?

Given that for example on the Atari 2600, all programs have to do stuff like this to get anything to display at all, and given that people nevertheless managed to cook up about a thousand games for the thing, I'd say there is quite a lot you can do -- if you're masochistic enough for this kind of coding, that is.

--
Linards Ticmanis