Mail Archives: djgpp/1997/01/23/00:09:55
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'.
*/
- Raw text -