On Sun, 13 Jun 2004, Jeff Walther wrote:
The specific question that gives me the most headache is how to handle the refresh of the screen data. I believe that updates to the screen image (changes to the contents of the video RAM) may be coming from the host CPU at any time. But if the video card is only halfway through drawing a screen image (the CRT has scanned half-way down the screen), one would not want to then implement an update on the second half of the screen which hasn't been drawn yet. This could result in the top half of the screen showing one image and the bottom half showing a completely different image, though only for one screen refresh cycle. In less extreme cases it just results in flickers and little starbursts here and there as on ancient CGA video systems.
There are various schemes for dealing with this. One is to have two screen buffers--two sets of video RAM. But this requires twice the memory on the card (not a big problem now days), and it seems to require moving a lot more data back and forth, though I'm not certain. Another method is to only update the video RAM during the flyback period of the attached CRT. This requires some kind of buffering of incoming data or lowers performance, as the video card tells the CPU to hold video updates until that short period.
Another method is to track where in the video RAM the screen scan is, and only update portions of the video RAM which are behind the current scan cycle, but this also requires some kind of buffering for updates to video RAM in front of the scan point.
I'm sure these methods have been worked out in detail better than I can reinvent them, and there is probably a comprehensive comparison of their relative merits discussed somewhere, but I have not been able to find such a reference. Somehow the NuBus video cards we used to buy managed this without using twice the video RAM.
They managed this because the hardware has NEVER compensated for the vertical blanking. Programs had to compensate themselves. Games had to have a VBL interrupt handler running as part of their code which would tell them when the video blanking signal hit the top of the screen so they could know when to refresh the screen buffer. If a game didn't do this, you'd get the tearing you talk about. But it was never the video card's responsibility to prevent this tearing.
Another question that interests me, but is not critical, is how to implement QuickDraw accelleration. If one is going to build a video card from scratch, one might as well consider providing some acceleration. There's plenty of logic capacity available in modern FPGAs at a low price and the things run at clock speeds that designers of ten years ago could only dream about. Was all the information on this topic proprietary to folks like Radius and Raster Ops, or did Apple ever publish guidelines or articles on building QuickDraw accelerators?
Apple used the Intel i860 in the 8*24GC to accelerate QuickDraw by porting most of the QD ToolBox to i860 assembly to run on the card instead of the CPU. I think lowendmac.com has a few articles on the 8*24GC, which from what I understand has a lot of compatability issues, especially with games. The Quadra on-board video circuitry was not accelerated, and was almost as fast as the 8*24GC, though it was optimized local bus video circuitry that took advantage of the 68040 architecture. Nonetheless, I would think a more compatible non-QuickDraw accelerated modern NuBus or PDS video card that's highly compatible with existing software would be more useful.
- Nate
-- Compact Macs is sponsored by <http://lowendmac.com/>.
Support Low End Mac <http://lowendmac.com/lists/support.html>
Compact Macs list info: <http://lowendmac.com/lists/compact.shtml> --> AOL users, remove "mailto:" Send list messages to: <mailto:[EMAIL PROTECTED]> To unsubscribe, email: <mailto:[EMAIL PROTECTED]> For digest mode, email: <mailto:[EMAIL PROTECTED]> Subscription questions: <mailto:[EMAIL PROTECTED]> Archive:<http://www.mail-archive.com/compact.macs%40mail.maclaunch.com/>
---------------------------------------------------------------
The Think Different Store
http://www.ThinkDifferentStore.com ---------------------------------------------------------------
