From: Charles Sandmann Newsgroups: comp.os.msdos.djgpp Subject: Re: Simulating a linear frame buffer Date: Fri, 29 Nov 1996 21:44:14 CST Organization: Rice University, Houston, Texas Lines: 21 Message-ID: <329fad8e.sandmann@clio.rice.edu> References: Reply-To: sandmann AT clio DOT rice DOT edu NNTP-Posting-Host: clio.rice.edu To: djgpp AT delorie DOT com DJ-Gateway: from newsgroup comp.os.msdos.djgpp > I'm writing a graphics library, but my SVGA card does not support a linear > frame buffer. I want to write a program that allows me to write routines > which need not worry about bank switching in VESA video modes. Your choices are limited. You can: 1) Use DJGPP V1.x, and use (or write) a GRX type graphics driver to provide the linear frame buffer emulation. Note, this only works in non-DPMI mode, so you can't use your program under Windows, or any other DPMI environment. 2) Use DJGPP V2.x, and write a page fault handler for for CWSDPR0 or PMODE. (Thus, you are still limited to DOS-only type execution). You must use one of those DPMI providers, since you need to be able to directly modify the page tables, install an interrupt hook (instead of an exception hook) at ring 0 for speed, and use the instructions to recover CR2. Most of the code can be copied verbatim from the setup/drivers from V1.x. It's actually possible (since the source to CWSDPMI is available) to do this in ring 3 also, but it's more complicated (so you would get it working under ring 0 first). I had originally planned to do this for V2.x to provide GRX compatibility in DOS, but there just aren't enough hours in the day.