From: Shawn Hargreaves Newsgroups: comp.os.msdos.djgpp Subject: Re: Vesa 1.0 Video Detection Date: Sun, 19 Jan 1997 11:39:38 +0000 Organization: None Lines: 23 Distribution: world Message-ID: References: <5bm7mi$8ti AT dfw-ixnews9 DOT ix DOT netcom DOT com> NNTP-Posting-Host: talula.demon.co.uk MIME-Version: 1.0 To: djgpp AT delorie DOT com DJ-Gateway: from newsgroup comp.os.msdos.djgpp Takahiro Horie writes: >Q. Currently I am using DJGPP and Allegro. I am asking for a routine > that simply checks to see if Vesa 1.0 Standard 640x480 256 colors > is available on the machine it is being run on- and if not, to > exit and display that error. Any one with an answer? If you are happy just using Allegro functions, try: if (set_gfx_mode(GFX_VESA1, 640, 480, 0, 0) != 0) { printf("VESA mode not available\n"); exit(1); } If you want to use the VESA functions directly, you should first call the VESA detection function (int 0x10, ax=0x4F00) to query if a VESA driver is present, and then the get-mode-info function (int 0x10, ax=4F01), to query if mode 0x101 is available. Get a copy of the VESA spec from x2ftp, and have a look at the vesa.c sources in Allegro... /* * Shawn Hargreaves - shawn AT talula DOT demon DOT co DOT uk - http://www.talula.demon.co.uk/ * Ghoti: 'gh' as in 'enough', 'o' as in 'women', and 'ti' as in 'nation'. */