Mail Archives: djgpp/2003/07/31/22:30:17
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 -