> I research Some Infos
> about VESA memory acces...
> How put pixel in vesa mode (BankSwitching,Granularity,etc....)
> Please give a very simple source or an algorytm method....
You could do with a book or a spec on VESA SVGAs.
On a PC in memory at 0xa0000 (typically) are either
two 32k memory apertures one for reading and one for writing or
one 64k memory aperture for reading and writing.
The appature has a granuity which you have to find from the Video BIOS
Form a linear address A of the pixel (x,y) from screen width w and bytes
per pixel b:
A = (y * w + x) * b
Find the bank B and offset C for granuity g:
B = A / g
C = A % g
% is the modulus operator, if g is a power p of 2 such that:
g = 2^p where ^ is the raise to operator
then a faster version is:
B = A >> p
C = A & (g - 1)
where >> is shift right and & is bit AND operators.
Now using the set bank Video BIOS call set the bank to B and the pixel
address P is for apature base D (= A0000 hexadeciaml)
P = D + C;
NO JUNK E-MAIL
or I will have to do something annoying.