From: Shawn Hargreaves Newsgroups: comp.os.msdos.djgpp Subject: Re: VESA 1.2 Date: Tue, 8 Jul 1997 20:41:10 +0100 Organization: None Distribution: world Message-ID: References: <33BB72C2 DOT B1ADF07B AT abc DOT se> <33C17905 DOT 41204F1A AT abc DOT se> NNTP-Posting-Host: talula.demon.co.uk MIME-Version: 1.0 Lines: 45 To: djgpp AT delorie DOT com DJ-Gateway: from newsgroup comp.os.msdos.djgpp Precedence: bulk Henrik Baarnhielm writes: >Maybe I wrote a bit strange. What I meant was that when I call the VBE >interrupts, my vbeinfo-structure is filled with 0x0102 in the >vbeversion-field. My card must then be VBE 1.2, am I wrong? But I use >UniVBE 5.3a which emulate VBE 2.0 on some points, at least it says so. UniVBE doesn't just emulate VBE 2.0, it _is_ a VBE 2.0 driver. VESA is a purely software API, nothing to do with the hardware that lies underneath it... If UniVBE doesn't return the extended VBE 2.0 information, this means either that you told it to disable these features (there's some command line option to do this, or I think you can request it from the install program), or you are failing to copy the string "VBE2" into the VESASignature field before you call the get info function (you have to do that to indicate that you are providing a buffer large enough for the extra data added in VBE 2.0, this is explained in the VESA spec). >You mean that I should first map the memory address that I get from >function 0ah and then use the memory-address I get from the map as the >baseaddress for the allocated ldt? And you mean that everything else is >correct?! Is it the way to go to load ES with the ldt before I make the >switchbank call? Yup. Use %es for the bank switch and set display start calls, and %ds for the palette setting routine. But remember you only need to allocate and load this selector if the VESA driver requests it: most cards don't need any memory-mapped IO, so you don't need to bother... >asm volatile("movw %%ax,%%es > call %3 > : > :"b" (window),"d" (bank),"a" (ldt),"m" (switchbank)); > >You mean that this is enough? It doesn't get any compiler errors.... >But is the values moved to bx,dx and ax before the statement mov es,ax >is executed? It is. When in doubt about something like this, use the -S flag and take a look at the exact code that is being generated... -- Shawn Hargreaves - shawn AT talula DOT demon DOT co DOT uk - http://www.talula.demon.co.uk/ Beauty is a French phonetic corruption of a short cloth neck ornament.