Date: Fri, 20 Nov 1998 09:08:23 +0200 (EET) From: Toni Rasanen X-Sender: torasane AT paju DOT oulu DOT fi To: djgpp AT delorie DOT com Subject: Re: Directly accessing 16bit color video RAM In-Reply-To: <008101be1395$25bf4720$1b8b19c4@default> Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=ISO-8859-1 Content-Transfer-Encoding: 8BIT Reply-To: djgpp AT delorie DOT com On Thu, 19 Nov 1998, StefanViljoen,6599 wrote: > How do you access 16bit video Ram directly using assembler? Do you still > write to > 0x0A000, just for a greater total of bytes than the 320x200 64000? Or do you > have to do all those weird bank switching thingies and stuff? I know that in Well, I personally prefer LFB (allowed by VBE2) over bank flipping, but basically you have to do bank flipping. 320x200x16bit totals 128000 bytes, so you have to flip bank two times (if display adapter tolerates 64k banks) for each flip done. > 16 bit you have to write more than one byte to set a pixel? Can you still > address the video ram as one big array like in good old 320x200x256? As 16bits already say, you have to write two bytes for a pixel. This short consist of color attributes; usually 5 lowest bits for blue, next 6 bits for green and highest 5 bits for red. And yes, you can use it as an array if you use Linear Frame Buffer allowed by VBE2's protected mode extensions. If you dont have VBE2 or you don't want to use it, you still have to use bank switching. /// Toni Räsänen /// torasane AT mail DOT student DOT oulu DOT fi