From: jlouwere AT galaxy DOT csc DOT calpoly DOT edu (Jan Louwerens) Newsgroups: comp.os.msdos.djgpp Subject: Re: X-mode Date: 22 Jan 1997 17:03:58 GMT Organization: Cal Poly Computer Science Dept. Lines: 19 Message-ID: <5c5h9u$bue@waldorf.csc.calpoly.edu> References: <01bc07f9$fa24d420$a3f80f82 AT default> NNTP-Posting-Host: galaxy.csc.calpoly.edu To: djgpp AT delorie DOT com DJ-Gateway: from newsgroup comp.os.msdos.djgpp Don (6dcb AT qlink DOT queensu DOT ca) wrote: : I'm writing my first game in Djgpp and I'm trying to use Mode-X because of : the many advantages. The only thing I don't like is the non-linear : addressing. Whenever you plot a pixel you have to select the bit-plane : right?! Okay I wrote a function to do that, but obviously it is somewhat : slower than say a 13h function. My biggest problem is blitting. How can I : blit in mode X without plotting one pixel at a time (as apposed to a say : memcpy command to blit whole lines). Basically I want a fast and easy way : to copy a buffer containing an image to the video buffer in mode-X. Maybe : that's not possible, maybe I should try VESA programming?? Any help would : be appreciated. The slow part is the register twiddling to select the proper bit plane. The fastest way to blit in mode X is to blit all the pixels in plane 0, then select plane 1, blit all those pixels, select plane 2, etc. This minimizes the amount of plane selections you have to do (4 per sprite blit). JL