Date: Wed, 3 Jul 1996 08:46:30 +0200 (IST) From: Eli Zaretskii To: Mihai Moise Cc: djgpp AT delorie DOT com Subject: Re: fat-ds hack In-Reply-To: <9607022203.AA18873@vonneuman.ift.ulaval.ca> Message-Id: Mime-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII On Tue, 2 Jul 1996, Mihai Moise wrote: > Aren't we talking about virtual addresses, as opposed to physical? If > so, then how can we be sure the vga will be mapped at 0xa0000 in virtual > space? ( CWSDPMI might decide on a whim to map it at 0x1234 ). > Using this method to access video memory at 0xf0000000 would > probably cause a page-absent exception. AFAIK, no DPMI server does this, precisely because it may make trouble with accessing memory-mapped hardware. > This is all speculative, correct me if I'm wrong. I did not test > it, and no, I was unable to retrieve Junaid's original article. You don't need to. The FAQ points you to a couple of library functions that should be used to access absolute memory addresses as if they were arrays in your address space. If you need the utmost speed and don't care losing memory protection for a while, just use `__djgpp_nearptr_enable' and `__djgpp_nearptr_disable'. If id Software can use it in their QUAKE game that should run under many different DPMI hosts, so can you. > I personally recommend the > > __dpmi_allocate_linear_memory_block() > __dpmi_map_device_to_memory_block() These are DPMI 1.0 functions that aren't supported by most DPMI servers (CWSDPMI and 386Max are the only known exceptions). So you can't use them in a program that should run under any DPMI host. (Btw, the first of the two functions above is misspelled: its name is `__dpmi_allocate_linear_memory'.)