From: dstamp@watserv1.waterloo.edu (Dave Stampe-Psy+Eng) Subject: VGA from hell! Date: Sat, 26 Oct 1991 03:32:46 GMT Message-ID: <1991Oct26.033246.13012@watserv1.waterloo.edu> Organization: University of Waterloo OK. I ran some timing tests on my somewhat-super VGA Paradise card. Talk about wait states! This is the added times for various operations as compared to memory accesses: Write byte: add 0.93 uS Read byte: add 1.21 uS Copy bytes (plane to plane, using internal latches to move 4 bytes at once) add 2.2 uS Write to plane mask, bit mask, or color registers (out dx,ax) add 2.1 uS Now, I'm running this on a 486/25, and these timings include a few clock cycles because the VGA card buffer is always a cache miss. These timings translate into (factoring in mask register accesses, etc): 83 mS to copy buffer into 320x200x256 color mode 42 mS to copy buffer to 320x200x16 color mode, 32 mS for 8 color, 21 mS for 4 color, etc. (also to clear buffer). 6 uS to write 1 pixel in 16-color mode 25 uS to draw 24-pixel horizontal line 350 uS to draw 24x24 polygon . . You get the general idea. Obviously, 10 frames/sec on a VGA card is the best you can get. The processor is running at 30% of its possible speed. You CAN get 2800 polys/sec, but almost no time to do anything else. Interestingly, the 6uS single-pixel time predicts that line-drawing the same scene (2800 polys, no hidden lines) takes the same amount of time! And it's faster to draw both lines and polys in 256-color mode (1.3 uS/pixel) (340 uS/24x24 poly) Going to have to check out some new ideas on how to do it better: the best idea is imcremental updates, but they won't work for eyephones, as head movement means the whole screen must be redrawn. Maybe drawing to a buffer, and copying to the screen later... (>B-{(= -------------------------------------------------------------------------- | My life is Hardware, | | | my destiny is Software, | Dave Stampe | | my CPU is Wetware... | | | Anybody got a SDB I can borrow? | dstamp@watserv1.uwaterloo.ca | __________________________________________________________________________