Path: utzoo!utgpu!news-server.csri.toronto.edu!mailrus!uunet!pilchuck!amc-gw!thebes!polari!tm From: tm@polari.UUCP (Toshi Morita) Newsgroups: comp.sys.apple2 Subject: Vertical blank Message-ID: <2080@polari.UUCP> Date: 6 Jun 90 14:50:07 GMT Distribution: na Organization: Seattle Online Public Unix (206) 328-4944 Lines: 42 Paul Sender writes: (various stuff deleted) >I also understand that some folks reading this newsgroup have some way of >storing particular values in the unused locations scattered about the text >and hires pages, and then watch some unused location in the motherboard's >I/O page for those particular values. It seems that these values will get >latched someplace where a program can see them during the retrace intervals. >All of this is undocumented by Apple, of course, but I seem to recall quite .a bit of discussion about this around two years ago. Can someone elaborate >on this technique, and is it still used? >-- >Paul Sander (408) 734-9822 | Wisdom If I recall correctly, any value fetched by the video circuitry is accessible by reading the $C05X softswitches. Values in screen holes appear at $C05X during horizontal retrace. For example, to determine when the video has started vertical blanking interval, assuming screen is in graphics mode: 1) Select a value that is not used in the video display. This can either be predetermined (preferred) or memory can be scanned (inefficient). Some programs never use values with the high bits clear or set; if so, this is ideal since the converse can be used for the next step. 2) Store the value at the first byte in the last screen hole. (pg 1 = $3ff8, pg 2 = $5ff8) 3) Watch a softswitch (ex. $C050) for the value to appear. 4) Execute vertical blanking interval code. On an Apple //e, //c, or //gs this code is obsolete - it's much easier to poll the high bit of $C019 to determine the vertical blank interval status. tm@polari.UUCP