Linards Ticmanis wrote: >Michael J. Mahon wrote: > >> Since the active scan line is only 40 cycles per line (the rest of the >> line is blanked), it doesn't matter to the display what data is read >> during the 15 cycles of horizontal blanking. (Some clever code >> can determine what data is read during these "invisible" refresh >> cycles, and use it to synchronize processor execution with the >> video generator.) > >Really? I always thought that syncing to the refresh was impossible on >the Apple without a card that provides blanking interrupts. What does >this code look like? Was it used in games to avoid flicker? The method to sync with the video refresh on the Apple ][ and ][+ 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 its 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 get 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 something solid, like VBL, 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 sound for 8-bit Apples on my Home page: http://members.aol.com/MJMahon/