From: kunst AT prl DOT philips DOT nl Subject: Re: Graphics and DPMI under Windoze To: sandmann AT new-orleans DOT NeoSoft DOT com (Charles Sandmann) Date: Tue, 14 Feb 1995 14:59:04 +0100 (MET) Cc: djgpp AT sun DOT soe DOT clarkson DOT edu (DJGPP users list) > > > 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. It's a pity that the VESA standard doesn't include calls for initializing (fast) *linear* addressing video memory access, such as provided by all recent SVGA cards (from S3, Tseng etc). Another problem is how to obtain the physical address of the video memory. For PCI cards this can be retrieved at 'PCI Configuration Space Register' 0x10 (4 bytes). A GNU program 'scanpci.c' (part of the XFree86 3.1.1 release) provides the details. For VL cards no general method for obtaining this address is available :-( You better get a copy of Richard F. Ferraro's 1600(!) page bible. I was wondering how you (Charles, DJ etc) have done/are planning the support of graphics in V2.0. Maybe you could post some remarks to the list. An obvious question is: will unpaged video memory access be supported ? (or only by the way as presented in my previous posting) Regards, Pieter Kunst (kunst AT prl DOT philips DOT nl)