Message-Id: Comments: Authenticated sender is From: "Salvador Eduardo Tropea (SET)" Organization: INTI To: jpdelprat AT teaser DOT fr (JP), djgpp AT delorie DOT com Date: Tue, 18 Aug 1998 18:01:44 +0000 MIME-Version: 1.0 Content-type: text/plain; charset=US-ASCII Content-transfer-encoding: 7BIT Subject: Re: How to determine the physical address from a DPMI descriptor In-reply-to: <35d9d505.4345933@news.teaser.fr> Precedence: bulk jpdelprat AT teaser DOT fr (JP) wrote: > Eli Zaretskii wrote: > > > > >On Sun, 16 Aug 1998, JP wrote: > > > >> I've allocated a large array, locked it and set a descriptor to this > >> array. I would like to know the physical address of this array. Can it > >> be determined from the descriptor ? > > > >In general, you can't. You can only find the logical address, not the > >physical one. > > > >Please explain why do you need the physical address, then it would be > >possible to advise about any available solutions. > > > > My need is to create and lock a 2Mo continuous buffer (under Windows > 95), and > determine its physical address to give it to a video capture card. > > Determining the physical address shouldn't be a problem since > there are solutions to explore the entire physical memory, but I can > find any solution to create a continuous buffer. > > > With DPMI functions (under Windows 95), I allocate my buffer then > lock it, but despite the call to dpmi_lock_linear_region, the buffer > is still mixed and partially swapped out. > > I've tried everything I could think of. I've even tried to allocate > and lock an XMS buffer in my autoexec.bat (before Windows 95 loads), > but Windows 95 refuses to start then. > How did you tried it? I think you must use the options to reserve a portion of memory. HIMEM have some switches to reserve memory and don't include it in the XMS pool. Is that what you tried? I think this memory can be used with some old BIOS service (int 15?). I saw something about it in the help of HIMEM from DOS 6.2. Another way could be the use of native Win API calls. Is hard to do it from djgpp but some functions can be called. I don't know if you can use the memory allocation stuff. A nasty one: Try reducing the amount of memory reported by BIOS and use it. Some mother boards lies when reporting the installed memory because the on-board video chip uses the DRAM as video memory, you can use a similar trick. SET ------------------------------------ 0 -------------------------------- Visit my home page: http://set-soft.home.ml.org/ or http://www.geocities.com/SiliconValley/Vista/6552/ Salvador Eduardo Tropea (SET). (Electronics Engineer) Alternative e-mail: set-soft AT usa DOT net set AT computer DOT org ICQ: 2951574 Address: Curapaligue 2124, Caseros, 3 de Febrero Buenos Aires, (1678), ARGENTINA TE: +(541) 759 0013