Xref: news2.mv.net comp.os.msdos.djgpp:5363 From: Shawn Hargreaves Newsgroups: comp.os.msdos.djgpp Subject: Re: VESA VBE 2 Date: Tue, 25 Jun 1996 10:40:08 +0100 Organization: The University of York, UK Lines: 32 Message-ID: NNTP-Posting-Host: tower.york.ac.uk Mime-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII In-Reply-To: To: djgpp AT delorie DOT com DJ-Gateway: from newsgroup comp.os.msdos.djgpp On Tue, 25 Jun 1996, John Joseph Newbigin wrote: > I have a vesa graphics program written in Borland C which I want to > convert to djgpp but I am not sure how to use protected mode vesa. Do I > need to use vesa vbe 2? Does anyone have any information or sample > code? You can still use your existing VESA 1.x code, with a couple of changes. The calls to VESA int 10 functions should be replaced with DPMI equivalents (using __dpmi_int()), and you'll need to change the functions that return a block of data (get vesa info and get mode info) to use a buffer in conventional memory: the libc transfer buffer is good for this. The trouble with VESA 1.x is the speed of the bank switching functions. Every time you call __dpmi_int() to switch banks, the cpu has to switch to real mode to run the VESA routine, and this is sloooow. VBE 2.0 avoids this by giving you access to protected mode bank switching functions, which you can copy into your address space and use with a simple 32 bit near call. If you don't have the VBE 2.0 spec, it's on SciTech's web site (http://www.scitechsoft.com). For sample code using both VESA 1.x and 2.0, have a look at my Allegro library... /* * Shawn Hargreaves. Why is 'phonetic' spelt with a ph? * Check out Allegro and FED on http://www.york.ac.uk/~slh100/ */