Date: Sun, 20 Dec 1998 22:55:05 +0200 (EET) From: Toni Rasanen X-Sender: torasane AT paju DOT oulu DOT fi To: djgpp AT delorie DOT com Subject: Re: problems with linear frame buffer In-Reply-To: <367cdf99.0@d2o32.telia.com> Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=ISO-8859-1 Content-Transfer-Encoding: 8BIT Reply-To: djgpp AT delorie DOT com > I am writing a program that uses VESA mode 10F, 320x200x16.8M. > Basically easiest way to use LFB (you DO use it, right?) is to create a LDT - local descriptor - and access LFB buffer though it, either in C by farpokeb/peekb (slow!), some function that can copy over selectors or - the method I prefer - write own flip-routines. How to allocate LDT, then? __dpmi_meminfo mi; // variable to map memory mi.size = ; mi.address =
; __dpmi_physical_address_mapping ( &mi); // map device to physical memory selector = __dpmi_allocate_ldt_descriptors(1); // allocate 1 descriptor __dpmi_set_segment_base_address (selector, mi.address); //address we got from dpimi __dpmi_set_segment_limit (selector, ) As a result, you have a variable (selector) you can use to access video memory, pretty much like you used segments to access memory in rmode... Of course, you can create selector called "segA000" or something, which points to physical address 0xA0000 to access video memory just like in real mode. /// Toni Räsänen /// torasane AT mail DOT student DOT oulu DOT fi \\\ Physicians ask how. Filosofians ask why. Dragons don't care.