From: jim AT curved-logic DOT com (James Shaw) Newsgroups: rec.games.programmer,comp.os.msdos.djgpp Subject: Re: VBE Mode List Date: Thu, 26 Mar 1998 11:07:41 GMT Organization: http://extra.newsguy.com Lines: 24 Message-ID: <351c364b.3416306@enews.newsguy.com> References: <01bd582f$3875e6c0$LocalHost AT ctx> NNTP-Posting-Host: p-234.newsdawg.com Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit To: djgpp AT delorie DOT com DJ-Gateway: from newsgroup comp.os.msdos.djgpp Precedence: bulk "Adrian Francis" wrote: >Hi, > >I have created a VBE interface in DJGPP but I am having problems >with the VideoModePtr, which is a pointer to a list of available video modes. > >I have read the VBE2.0 specification and it does not seem to state >what sort of pointer this is. I have presumed that it is a real-mode > far pointer but no matter what I try I cannot get access to the list. > >Can anyone help? A code snippet would be useful! #define FLAT_PTR(x) (char *)(((x>>12)&0x000ffff0)+(x&0xffff)) char *flat_address = FLAT_PTR(card_info->vidmodeptr); The format is a ulong, word:word, the first word is the segment, the second is the offset. You'll need to use DPMI function 0x800 (physical->linear mapping) before you can write to that address though. Jim