Date: Fri, 25 Jun 93 10:31:36 EDT From: kent AT cme DOT nist DOT gov (Ernie Kent) To: djgpp AT sun DOT soe DOT clarkson DOT edu Subject: Re: Direct Graphics Memory Writing >Christopher Matthews Keane, Subject: Direct Graphics Memory Writing > I am using DJGPP 1.09 with GRX in developing some image processing > programs. I currently have the screen refresh being done by indexing > the color to the LUT - and plotting the point via GrPlot(x, y, c); > Anyone know of a > routine to move whole lines via direct video writing at a fast > rate.... I must admit that this garbage is comes up on the screen > VERY quickly! I have code for moving blocks (including single lines) of any x/y extent to the screen by direct write to 0xd0000000 (or the appropriate offset from it if a block goes in the middle of the screen.) It is written in gas assembler so it can be assembled and linked by gcc. It works under 1.09 (1.10 not tested.) It is pretty well optimized, and I believe it is about as fast as it can be done in a reasonably flexible manner, i.e., no special tricks. Using a 486DX50 with a local video bus it is instantaneous perceptually, even for large images. It moves data in DWORD-sized chunks, so you either need to move blocks that are multiples of four bytes in width (anything in height) or pad them with, e.g., zeros. If this is offensive it is easily changed to write 2-byte or single-byte increments at some cost in speed. I wrote it because the library routines were too slow for some of my applications, and it is indeed significantly faster, at least on my hardware. It is pretty trivial, but anyone is welcome to it. Ernie Kent