[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Apple video question?
"Michael J. Mahon" <mjmahon@aol.com> wrote in message
20030221020724.10901.00000989@mb-dh.aol.com">news:20030221020724.10901.00000989@mb-dh.aol.com...
> In article <b33s730u56@enews3.newsguy.com>, "Charlie"
> <charlied@NOSPAMbboard.com> writes:
>
> >Isn't there a similar but undocumented way to get the VBL on an Apple II+
and
> >presumably an Apple II? I seem to recall that it was a result of the same
> >clock signal being used to refresh the memory chips and the video. I think
> >that you polled an unused location in the I/O area ($C000 - $CFFF) and
somehow
> >derived the VBL from the garbage that you normally see there. I don't have
my
> >Apple II+ anymore so I can't check.
> >Or maybe I just dreamed all this?
>
> No, there is a way to sync with the video refresh on the Apple ][ and ][+.
> It was perhaps best documented by Don Lancaster. Since the phenomenon
> on which it depends is reading the "phantom" state of the Apple's multiplexed
> bus to determine what data was most recently read by the video generator,
> he called it "vapor lock".
>
> Whenever you do a load from an I/O address that does not drive the data bus
> with any value, the data read by the load is whatever happens to be held by
> the floating bus's capacitance since it't last use. Since the video
generator
> uses every other bus (and memory) cycle to access video memory, the data
> that such a "floating" load will load is the data last read by the video
> generator.
>
> Because of the non-linear, and not-all-visible memory references made by the
> video generator, it is possible to plant some distinctive "flag" values in
some
> invisible spots in the hi-res memory area, and then "scan" for these by
polling
> the phantom data. This allows the CPU to synchronize with the video
generator,
> so that some fancy "mixed mode" split screens can be generated, among other
> things.
>
> It is a lot trickier to get a solid lock this way than by polling a solid,
> dedicated
> logic level, but it can be done. Aside from some demonstration programs,
> I'm not aware of any significant use that was made of the "vapor lock"
> technique.
>
> It has been written up on the Web. For example, check:
>
> http://rich12345.tripod.com/aiivideo/vbl.html
>
> which also contains a link to Bob Bishop's article on the "Apple Split"
> (same idea, but takes longer to sync than Don Lancaster's).
Thanks for jogging my memory. The method you describe is indeed the one I was
trying to remember. I played around with that method for a while and then made
a minor hardware hack (one wire, I believe) that made it easier to get the VBL.
I think I got that modification from Don Lancaster's book "Enhancing Your Apple
II".
Charlie