www.delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/1998/11/29/14:48:13

From: "Peter Remmers" <pitti AT tfh-berlin DOT de>
Newsgroups: comp.os.msdos.djgpp
Subject: VDS
Date: Sun, 29 Nov 1998 01:56:38 +0100
Organization: TFH-Berlin (Berlin, Germany)
Lines: 50
Message-ID: <73q651$ebj$1@idy05.tfh-berlin.de>
NNTP-Posting-Host: ip099167.tfh-berlin.de
X-Newsreader: Microsoft Outlook Express 4.72.3110.1
X-MimeOLE: Produced By Microsoft MimeOLE V4.72.3110.3
To: djgpp AT delorie DOT com
DJ-Gateway: from newsgroup comp.os.msdos.djgpp
Reply-To: djgpp AT delorie DOT com

Hi there!

I am trying to program a bus master PCI card and was wondering
how to cope with this can't-get-physical-address-problem.
Since I need to use quite large buffers (1-2 MB), using
conventional memory is not an option.
No I've read about this Virtual DMA Services, got the specs
and coded some test program.
Finds VDS present, determines correct version numbers
and provider codes (can distinguish between EMM386, QEMM
and W95 DOS-Box as VDS provider) et cetera.
But from there on my problems start:

The best thing for me would be that I could malloc/new a buffer and
use the LockRegion call (AX=0x8103) to get the physical address.
In a DOS box the following happens:
Without automatic remapping I get error 0x01 (region not contiguous).
With autoremap I get the same error... Small buffers work (~50k)
but this doesn't help me - If I wanted to use such small buffers, using
conventional memory would be a lot easier.
On plain DOS the region seems to be contiguous, but there I get
error 0x03 (unable to lock pages).

Then I thought: alright, then you have to take the less comfortable
approach and use the Request DMA Buffer function (0x8107),
allocate a buffer and have the trouble with allocating a
descriptor and using the _far* functions (a pity that DJGPP
doesn't support REAL far pointers...) or perhaps the VDS
Copy To/From Buffer functions.
And what gives? - the DOS-box has no problem with
allocating a 1 meg buffer, but plain DOS has! (i.e. the memory
manager to be exact - both QEMM AND EMM386!).
Error 0x05 (region too large for buffer).
Then I loaded QDPMI because CWSDPMI and QEMM
maybe don't go together well in this case? This changed nothing.
*sigh* and plain DOS is my primary target platform, because
there's native Win software that does the job my program
is supposed to do, quite well.

So the question is, why is there no memory available for
the VDS provider to allocate?
Has anyone solved this kind of problem and has written some
code that uses VDS in a useful manner?
Or is there any other solution to my problem?

Thanks
Peter Remmers



- Raw text -


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