Xref: utzoo comp.graphics:9861 comp.sys.ibm.pc:44104 Path: utzoo!utgpu!jarvis.csri.toronto.edu!cs.utexas.edu!uunet!sdrc!scjones From: scjones@sdrc.UUCP (Larry Jones) Newsgroups: comp.graphics,comp.sys.ibm.pc Subject: Re: VGA - direct memory access question Message-ID: <1128@sdrc.UUCP> Date: 9 Feb 90 22:14:13 GMT References: <90039.091705IAP@PSUVM.BITNET> Followup-To: comp.sys.ibm.pc Organization: SDRC, Cincinnati Lines: 26 In article <90039.091705IAP@PSUVM.BITNET>, IAP@psuvm.psu.edu (Kirk Hanawalt) writes: > I'm trying to write a program (TurboC 2.0, IBM PS/2 Model 50 > with VGA adapter, HP LaserJet II) to dump a bitmap image of the > high resolution VGA screen to a LaserJet printer. Using the > TurboC getpixel function, the 640x480 graphics screen can be > dumped in about 35 seconds. I would like to access memory > directly, and dispense with getpixel() altogether. > Unfortunately, I can't figure out how the pixels are mapped in > memory. Both the EGA and VGA need more memory than there is room for in the reserved address space. To get around the problem, they have a number of different mapping schemes which allow access to some of the bits at a time. Precisely which bits and where in memory they are depends on the particular mapping scheme which has been invoked. I suggest you get a good book such as Programmer's Guide to PC and PS/2 Video Systems (Microsoft Press, if I remember correctly) and study it. The mapping schemes are incredibly complex. ---- Larry Jones UUCP: uunet!sdrc!scjones SDRC scjones@SDRC.UU.NET 2000 Eastman Dr. BIX: ltl Milford, OH 45150-2789 AT&T: (513) 576-2070 "You know how Einstein got bad grades as a kid? Well MINE are even WORSE!" -Calvin