www.delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/1998/08/19/17:30:22

From: jpdelprat AT teaser DOT fr (JP)
Newsgroups: comp.os.msdos.djgpp
Subject: Re: How to determine the physical address from a DPMI descriptor
Date: Wed, 19 Aug 1998 21:27:59 GMT
Organization: Guest of France-Teaser
Lines: 63
Message-ID: <35db4349.456916@news.teaser.fr>
References: <m0z8sj2-000S3uC AT inti DOT gov DOT ar>
NNTP-Posting-Host: ppp2816-ft.teaser.fr
NNTP-Posting-Date: 19 Aug 1998 21:17:21 GMT
To: djgpp AT delorie DOT com
DJ-Gateway: from newsgroup comp.os.msdos.djgpp

"Salvador Eduardo Tropea (SET)" <salvador AT inti DOT gov DOT ar> wrote:

>jpdelprat AT teaser DOT fr (JP) wrote:
>> Eli Zaretskii <eliz AT is DOT elta DOT co DOT il> 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.
>

I had made a mistake. It works now. I've written a small program that
allocates and locks an XMS buffer. I run it in my autoexec.bat and
save parameters in a configuration file. Then, under Windows 95, my
real program read this file and map over the XMS buffer. 

Thanks very much for your answer,
JP

Jeepy (Jean-Pierre Delprat)
jpdelprat AT teaser DOT fr
www.teaser.fr/~jpdelprat (JPTUI home page)

- Raw text -


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