From: Endlisnis Newsgroups: comp.os.msdos.djgpp Subject: Re: 640 x 400 Date: Mon, 07 Sep 1998 19:14:49 -0300 Organization: NBTel Internet Lines: 25 Message-ID: <35F45AD9.4F4B5E1@unb.ca> References: <01bdd031$0b208f20$0818d3d4 AT billy> <35EB2179 DOT 8A0437FF AT btinternet DOT com> <35F32B57 DOT 1A78 AT club-internet DOT fr> NNTP-Posting-Host: fctnts05c61.nbnet.nb.ca Mime-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Transfer-Encoding: 8bit To: djgpp AT delorie DOT com DJ-Gateway: from newsgroup comp.os.msdos.djgpp Precedence: bulk Ludvig Larsson wrote: > BTW, I had some problem with those VESA 1.2 modes because they are Not > always compatible with VESA 2.0 One thing that worked for me was to set > the bit in the for the lineframe buffer(why it works, I have no idéa, > but it does, using banks). So mode 0x100 will be 0x4100 etc. > The best thing offcourse, to make the code work on well almost all cards > is to scan the card for the desired graphic mode. As far as I know, this will work on EVERY VESA 1.2+ card. > Ps. to plot a pixel: (in 640xNNN in 256color mode) > bank=(x+y*640)>>16 > offset=(x+y*640)-bank<<16 > set bank to 'bank' and > put the colorvalue at 0xA0000+offset That is making the assumption that bank's have a 64k granularity (which they do not always have! Most Cirrus Logic cards do NOT have this, they us 4k/16k granularity). You will have to check to see the bank-size before knowing how much to bitshift by. -- (\/) Endlisnis (\/) s257m AT unb DOT ca Endlisnis AT GeoCities DOT com Endlis AT nbnet DOT nb DOT ca