In article , "Charlie" 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/ In article <9307085f.0302200832.53ba0ee5@posting.google.com>, steve@dosius.zzn.com (Dosius) writes: >Holger Picker wrote in message >news:... >> On Thu, 20 Feb 2003, Dan Ritter wrote: >> >> > Date: Thu, 20 Feb 2003 09:05:20 GMT >> > From: Dan Ritter >> > Newsgroups: comp.sys.apple2 >> > Subject: Apple video question? >> > >> > I was wondering how the Apple2 generated video? Is it all software >driven? >> > Because I remember playing some really good games on my old Apple. The >> > video seemed very fast for software generated. >> > >> Hello, >> >> yes, the graphic is all software driven. There is no hardware support for >> the programmer: no sprites (as found on the C64), hardware acceleration >> (like blitter), no raster interrupt etc. > >(But the //e had something like the VBL - although AFAIK it worked >only on the //e and not even on the //c. It was fake, however - there >was no real VBL. ;)) Yes, there was. VBL is generated at the start of the vertical blanking interval, so that programs can synchronize with the video refresh to minimize flickering. With single hi-res pages, this can be done by doing all the updates during the blanking interval (if they'll fit), or with double-buffered hi-res page switching, by flipping pages during vertical blanking. On the //e, VBL is a level that must be polled, while on the //c it is a selectable source of interrupts. -michael Check out amazing quality 8-bit Apple sound on my Home page: http://members.aol.com/MJMahon/ In Jon Co wrote: > I've heard some software clocks were driven by the //c's VBL. they'd > increment the second every 60 interrupts. What's in the //c and > missing from the //e that allowed it to have VBL interrupts? It's because of the mouse, of all things. The Apple mouse card has it's own processor which keeps track of the mouse movement. The card can be set to generate interrupts on movement, button click, or during the video vertical blanking (VBL). The II, II+ and IIe have no interrupt source at all without extra hardware like a mouse card. Since the Apple IIc has a mouse port it also has the extra hardware to generate the interrupts needed. -- Roger Johnstone, Invercargill, New Zealand Apple II - FutureCop:LAPD - iMac Game Wizard http://homepages.ihug.co.nz/~rojaws/ ________________________________________________________________________ "So we went to Atari and said, 'We've got this amazing thing, even built with some of your parts and what do you think about funding us? Or we'll give it to you. We just want to do it. Pay our salary, we'll come work for you.' They said 'No'. Then we went to Hewlett-Packard; they said, 'We don't need you. You haven't got through college yet'." Apple Computer founder Steve Jobs on attempts to get Atari and H-P interested in his and Steve Wozniak's personal computer