www.delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/1998/03/25/07:28:09

Message-Id: <m0yHpG7-000S2tC@inti.gov.ar>
Comments: Authenticated sender is <salvador AT natacha DOT inti DOT gov DOT ar>
From: "Salvador Eduardo Tropea (SET)" <salvador AT inti DOT gov DOT ar>
Organization: INTI
To: Eli Zaretskii <eliz AT is DOT elta DOT co DOT il>, djgpp AT delorie DOT com, ShawnH AT Probe DOT co DOT uk
Date: Wed, 25 Mar 1998 09:29:21 +0000
MIME-Version: 1.0
Subject: Re: Allocate physical memory?
References: <D1FB30BBA491D1118E6D006097BCAE391A0A6A AT Probe-nt-2a DOT Probe DOT co DOT uk>
In-reply-to: <Pine.SUN.3.91.980324131557.22075A-100000@is>

Eli Zaretskii <eliz AT is DOT elta DOT co DOT il> wrote:
 
> On Mon, 23 Mar 1998, Shawn Hargreaves wrote:
> 
> > To initiate a bus master copy, I need to program the graphics
> > controller with the physical memory address of the source data,
> > but as far as I can see there is no way for me obtain this
> > information!
> 
> Either use conventional memory (which is mapped 1:1 by every DPMI
> server I've heard of), 

I doubt that's true under Windows because you can have tons of VMs with DOS. I 
think Windows virtualize the DMA system and remaps the memory when you ask for 
DMA in a DOS box.

> or use the VDS (Virtual DMA Services) API,
> available under most memory managers.  The latter option will not work
> when the programs run without any memory manager or with HIMEM alone.

And I don't know if this service was designed for what Shawn wants, I think it 
uses base memory. Shawn needs to make PCI DMA transfers, they can be done in 
any place of the memory (not only base memory) and they can be huge (over 
640Kb) so the base memory won't help.

> Probably your best bet would be to use VDS where it's available and
> conventional memory where it isn't, since in the latter case you can
> safely assume it's plain DOS.
> 
> The Interrupt List documents the VDS API which are a bunch of
> functions of interrupt 4Bh/AH=81h.
> 
> > I need some way to allocate a block of contiguous
> > physical memory locations, but unless I've missed something,
> > there are no DPMI functions to do this (using conventional
> > memory will break under Windows).
> 
> Why do you think conventional memory won't work on Windows?

I think because he got to similar conclutions.

If I remmember  well Windows have functions to do what Shawn is asking, but 
they are available thru the Windows API. The solution is not easy and perhaps 
the only way is to have different routines depending on the DPMI host 
(Windows/CWSDPMI/other?) And that's a real pain in the as.

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
CQ: 2951574
Address: Curapaligue 2124, Caseros, 3 de Febrero
Buenos Aires, (1678), ARGENTINA
TE: +(541) 759 0013

- Raw text -


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