www.delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/1998/08/19/23:45:39

From: Endlisnis <s257m AT unb DOT ca>
Newsgroups: comp.os.msdos.djgpp
Subject: Re: help with 640x480x65536
Date: Wed, 19 Aug 1998 14:42:07 -0300
Organization: NBTel Internet
Lines: 39
Message-ID: <35DB0E6F.CBE6F6FB@unb.ca>
References: <6rdo2i$8ak AT news1 DOT snet DOT net>
NNTP-Posting-Host: fctnts13c40.nbnet.nb.ca
Mime-Version: 1.0
To: djgpp AT delorie DOT com
DJ-Gateway: from newsgroup comp.os.msdos.djgpp

Mark Figura wrote:

> Hi!
> Here's my function that switches to 640x480x65536...
> int _640x480x64k()
> {
>     __dpmi_regs regs;
>     regs.x.ax=0x4f02;
>     regs.x.bx=0x111;
>     __dpmi_int(0x10,&regs);
>     ... // allocate memory for double buffer, etc...
>     if(regs.x.ax=0x4f)
>         return(1); // it worked
>     else
>         return(0); // it didn't
> }
>
> On my friends computer, it doesn't work, and it returns a "0".
> Could this be because it's AGP, or what?

    You are making the assumption that 0x111 is ALWAYS 640x480x16bit, but that
is only true under VESA 1.2 standard, if his card is VESA2+, then it will not
nessecarily be the same number.  You need to call function #0 to get info about
the card, then call function #1 on every mode there until one matches
640x480x16bit.  It is a little annoying, but it works (I have made a Screen
function that takes as parameters the desired width, height & color-depth, then
it finds the closest match.  This is guarenteed to work on arbitrarily high
resolutions (like 1600x1200) and stuff like that.)  Getting that list of modes
requires a 'dosmemget' call because it is passed back as a 20-bit far pointer.

--
     (\/) Endlisnis (\/)
          s257m AT unb DOT ca
          Endlisnis AT GeoCities DOT com
          Endlis AT nbnet DOT nb DOT ca




- Raw text -


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