ftp.delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/1995/02/14/09:07:42

From: Charles Sandmann <sandmann AT new-orleans DOT NeoSoft DOT com>
Subject: Re: Graphics and DPMI under Windoze
To: kunst AT prl DOT philips DOT nl
Date: Tue, 14 Feb 1995 07:35:59 -0600 (CST)
Cc: jwvm AT umdsun2 DOT umd DOT umich DOT edu, djgpp AT sun DOT soe DOT clarkson DOT edu

> To access video memory directly (under DPMI) you have to use *far*
> pointers again (just when you thought you didn't need this far stuff
> anymore with DJGPP ;-) Find a DPMI 0.9 specification first.
> 
>   (1) allocate a LDT descriptor (0x0000) (this gives you a selector)
>   (2) map to physical address (0x0800) i.e. where your video memory is
>   (3) lock linear address (0x0600)
>   (4) set segment base address (0x0007)
>   (5) set segment limit (0x0008)
> 
> You can use the far calls to set the selector, and access 
> the video memory directly (i.e. unpaged).

You should only use the procedure above if you have a linear graphics 
buffer in extended memory.  If you are accessing video memory in the
1Mb area, use the conventional memory selector which is already set up.

- Raw text -


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