delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/2000/02/14/19:19:54

From: "Marcus" <mesthlm AT hem DOT passagen DOT se>
Newsgroups: comp.os.msdos.djgpp
Subject: Get video modes
Date: Tue, 15 Feb 2000 00:11:19 +0100
Organization: Telenordia
Lines: 38
Message-ID: <88a255$dhi$1@cubacola.tninet.se>
NNTP-Posting-Host: cns2-210-200.cm.starport.se
X-Trace: cubacola.tninet.se 950569957 13874 193.150.210.200 (14 Feb 2000 23:12:37 GMT)
X-Complaints-To: abuse AT algo DOT net
NNTP-Posting-Date: 14 Feb 2000 23:12:37 GMT
X-Priority: 3
X-MSMail-Priority: Normal
X-Newsreader: Microsoft Outlook Express 5.00.2314.1300
X-MimeOLE: Produced By Microsoft MimeOLE V5.00.2314.1300
To: djgpp AT delorie DOT com
DJ-Gateway: from newsgroup comp.os.msdos.djgpp
Reply-To: djgpp AT delorie DOT com

Hi!
Could anyone see what's wrong with this code? I get the information correct
but it's something wrong and I don't know what.

Here's the code:
unsigned short modes[100];
getmodes(vbeinfo.videomodeptr, modes, 200);

void* getmodes(unsigned int modeptr, void* dest, int maxlength)
{
   int offset = (modeptr>>12 & 0xFFFF0) + (modeptr & 0xFFFF);
   dosmemget(offset, maxlength, dest);
   return dest;
}

And the struct:
struct VBEINFO {
  char vbesignature[4]; // VBE Signature
  unsigned short vbeversion; // VBE Version
  unsigned int oemstringptr; // Pointer to OEM String
  unsigned char capabilities[4]; // Capabilities of graphics cont.
  unsigned int videomodeptr; // Pointer to Video Mode List
  unsigned short totalmemory; // number of 64Kb memory blocks
  unsigned short oemsoftwarerev; // VBE implementation Software revision
  unsigned int oemvendornameptr; // Pointer to Vendor Name String
  unsigned int oemproductnameptr; // Pointer to Product Name String
  unsigned int oemproductrevptr; // Pointer to Product Revision String
  char reserved[222]; // Reserved for VBE implementation scratch area
  char oemdata[256]; // Data Area for OEM Strings
};

Thanks for all help!

--
/regards Marcus



- Raw text -


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