www.delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/1995/02/13/11:23:32

From: kunst AT prl DOT philips DOT nl
Subject: Re: Graphics and DPMI under Windoze
To: jwvm AT umdsun2 DOT umd DOT umich DOT edu (john miller)
Date: Thu, 9 Feb 1995 08:51:04 +0100 (MET)
Cc: djgpp AT sun DOT soe DOT clarkson DOT edu (DJGPP users list)

John Miller writes:
> What are the options for performing graphics with djgpp in Windows full
> screen mode?  The excellent graphics program display.exe runs fine under
> Windows so it is obviously possible. The target system has a local bus so
> it might even be possible to access the video memory directly although the
> dpmi server in Windows may not be up to providing this feature. 

You can use standard VESA calls to achieve this.
Have a look at the VESAINFO program somewhere in contrib\libgrx\ndriver.
It also has some VESA documentation.

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).

Pieter Kunst (kunst AT prl DOT philips DOT nl)


- Raw text -


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