cvs.gedasymbols.org/archives/browse.cgi   search  
Mail Archives: djgpp/1998/03/27/18:52:34

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
To: djgpp AT delorie DOT com
DJ-Gateway: from newsgroup comp.os.msdos.djgpp

"Adrian Francis" <adrian DOT francis AT cableinet DOT co DOT uk> 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

- Raw text -


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