Mail Archives: djgpp/1998/11/20/02:08:44
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 -