delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/1998/11/20/02:08:44

Date: Fri, 20 Nov 1998 09:08:23 +0200 (EET)
From: Toni Rasanen <torasane AT mail DOT student DOT oulu DOT fi>
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: <Pine.SGI.3.95.981120090357.23053A-100000@paju.oulu.fi>
MIME-Version: 1.0
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

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019