From: beyonddeath Newsgroups: comp.os.msdos.djgpp Subject: Re: hmm can someone help me with VESA Message-ID: References: <341beso0h099e7a3cl10alhg6rstecud3a AT 4ax DOT com> X-Newsreader: Forte Agent 1.7/32.534 MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Lines: 47 Date: Sat, 01 Apr 2000 18:04:11 GMT NNTP-Posting-Host: 24.112.65.173 X-Complaints-To: abuse AT home DOT net X-Trace: news2.rdc1.on.home.com 954612251 24.112.65.173 (Sat, 01 Apr 2000 10:04:11 PST) NNTP-Posting-Date: Sat, 01 Apr 2000 10:04:11 PST Organization: @Home Network Canada To: djgpp AT delorie DOT com DJ-Gateway: from newsgroup comp.os.msdos.djgpp Reply-To: djgpp AT delorie DOT com this works without 0x0 but not in my program if i make a program that starts up into that mode then getch(); then closes works fine but in mine it doesnt make the change... On Sat, 01 Apr 2000 11:55:26 GMT, "AndrewJ" wrote: >Darn it, I went and replied this to an older message posted by you by accident. >Here is the entire text cut 'n pasted. =) > >[snip] > >> union REGS regs; >> regs.x.ax = 0x4F02; /* change display mode */ >> regs.x.bx = 117; /* three-digit mode number */ >> int86(0x10, ®s, ®s); /* Call the BIOS (int10) */ >> if(regs.h.al != 0x4F) >> { >> printf("VESA modes NOT supported!\n"); >> } > >[snip] > >Well, I see one problem right off the bat. Mode numbers are generally given in >hex, NOT decimal, so when your trying to set it to mode 117, you're giving it >an invalid vesa mode (0x75, which isn't even a vesa mode). Try setting it to >mode 0x0117 instead and you should get proper results. > >Secondly, going with the assumption that this would be a complete program, you >aren't following the recommended steps for use vesa. Ideally you should be >allocating a block of real-mode memory (dpmi functions will do this), getting >the vbe information to check that vbe is actually installed (unless you only >intend to use this on your system and you know you have vbe), going through the >mode list pointer getting information about each mode until you find the one >that corresponds to the mode you want, and *then* setting the mode. In VBE 2+ >it was no longer required by the specification to continue using fixed mode >numbers for various modes, so in theory mode 0x0117 might not even be >1024x768x16bpp on your system (although I've yet to hear about a card that >didn't retain all the old VBE 1.x mode numbers). > >Hope this helps, > >AndrewJ > > >