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

Re: Apple video question?



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).

-michael

Check out amazing quality 8-bit Apple sound on my
Home page:  http://members.aol.com/MJMahon/