delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/2003/07/31/22:30:17

From: jbs30000 AT aol DOT com (Joel)
Newsgroups: comp.os.msdos.djgpp
Subject: Mapping DOS base memory under 1 meg
Date: 31 Jul 2003 19:26:17 -0700
Organization: http://groups.google.com/
Lines: 22
Message-ID: <84e4e2a9.0307311826.6a107b0c@posting.google.com>
NNTP-Posting-Host: 172.144.67.185
X-Trace: posting.google.com 1059704777 31855 127.0.0.1 (1 Aug 2003 02:26:17 GMT)
X-Complaints-To: groups-abuse AT google DOT com
NNTP-Posting-Date: 1 Aug 2003 02:26:17 GMT
To: djgpp AT delorie DOT com
DJ-Gateway: from newsgroup comp.os.msdos.djgpp
Reply-To: djgpp AT delorie DOT com

I'm writting some SVGA code which uses banked modes if a linear mode
is not availible.  Now, I had an idea of, when using _farpokeb instead
of adding segment << 4 to the offset, which is usually A0000 + offset,
I would make a selector for the A000 - AFFF graphics memory buffer. 
But then, while looking up __dpmi_physical_address_mapping at:
http://www.delorie.com/djgpp/v2faq/faq18_7.html
at the end it says:

The DPMI function that is issued by __dpmi_physical_address_mapping
only works reliably for addresses above 1MB mark. If you call it with
a physical address in the first Megabyte, it might fail, depending on
the DPMI server (e.g., CWSDPMI fails such calls). (The DPMI spec
explicitly says that programs should not call this function to access
memory below the 1MB boundary.) This failure usually means that the
offending address is already mapped into the page tables, so you
shouldn't worry about it; and most DPMI servers map the first Megabyte
1:1 anyway.

So, is there a reliable way to make a base memory selector other than
just using the __djgpp_nearptr_enable() ?

Thanks.

- Raw text -


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