Re: 640*480 memory modes
- Posted by Pete Eberlein <xseal at HARBORSIDE.COM> Oct 23, 1997
- 874 views
The Reaper wrote: > > Loo woo seob, anything you can send me about mode 18 or the other modes you > were talking about would be appreciated. Lee, May I have a copy of the svga library too? > And, yes Pete, Mode 18 only has 16 colors. Sigh...Did I say something?
It was Daniel Berstein that pointed out the number of colors. Here's what I know about mode 18, 640x480x16. Video memory is set up like 8 pixels per byte. Each bit written to memory is copied to any combination of the 4 video planes (red, green, blue, intensity). Which planes bits are copied to is determined by the video map mask register. So to write a magenta pixel to the screen set the map mask to 5 and write a 1 to memory. If the memory isn't already known to be 0's then you have to not the map mask register and write a 0 to memory. But there are other write modes that the video processor can do, like one optimized for bit-block-transfers and one for single pixel methods. In my opinion, 16-color modes are not worth the headache of switching planes and manipulating bits and all that. Sixteen-color routines would have to be coded in machine language to be fast enough for any real use. So I suggest sticking with SVGA. Happy Coding, -- _____ _____ _____ ________ /\ \ /\ \ /\ \ / \ \ / \____\ / \____\ / \____\ / _ \____\ / / ___/_ / /____/ / / ___/_ / / \ [___] / / /\____\ / \ \ / / /\____\ \ \_/ / / \ \/ / ___/_\ \ \ \ \/ / ___/_ \ /____/ \ / /\ \\/\ \ \ \ / /\ \ \ \ \ \ \/ \____\ \ \ \ \ \/ \____\ \ \ \ \ / / \ \____\ \ / / \ \____\ \ / / \ / / \ / / \ / / \ / / \/____/ \ / / \/____/ \/____/xseal at harborside.com\/____/