Mail Archives: djgpp/1998/03/27/18:52:34
"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 -