www.delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/1995/11/07/15:34:36

Xref: news-dnh.mv.net comp.os.msdos.djgpp:3089
Path: news-dnh.mv.net!mv!news.sprintlink.net!newsfeed.internetmci.com!chi-news.cic.net!usc!sdd.hp.com!hplabs!unix.sri.com!news.Stanford.EDU!newshub.internex.net!news.internex.net!usenet
From: Brian Hook <bwh AT netcom DOT com>
Newsgroups: comp.os.msdos.djgpp
Subject: Mapping physical->linear
Date: 7 Nov 1995 17:52:18 GMT
Organization: InterNex ISDN Internet Access is our Business
Lines: 29
Nntp-Posting-Host: 205.158.17.25
To: djgpp AT sun DOT soe DOT clarkson DOT edu
Dj-Gateway: from newsgroup comp.os.msdos.djgpp

I need to map a region of physical memory into my program's 
linear address space.  I don't know terribly much about DJGPP 
2.0, so I'll just toss out what I'm doing under Watcom and 
maybe someone can give me some pointers to resources that may 
be able to help.

Basically, I'm trying to map a video card's graphic's memory so 
that I can address it with a near (32-bit) pointer.  Under 
Watcom and DOS4GW this is/was trivial, since linear addresses 
correspond to virtual addresses 1:1 (under DOS4GW CS, DS, and 
SS all map directly from 0...4GB, which gets rid of pointer 
validation capabilities but which also makes things marginally 
faster for certain types of things and which also makes life 
very convenient when doing lots of low DOS memory bit 
twiddling).

To do the above I used standard DPMI int 31h functions to map 
my video card's address space from 0xA0000000 (physical 
address, default for ATI GPT) into a linear address space.  The 
resulting pointer could be used normally.  Not a lot to it.

If someone could show me how to do something similar with DJGPP 
2.0 I'd greatly appreciate it.

Thanks,

Brian Hook


- Raw text -


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