From: Shawn Hargreaves Newsgroups: comp.os.msdos.djgpp Subject: Re: Allegro Problems Date: Sun, 7 Sep 1997 12:03:55 +0100 Organization: None Distribution: world Message-ID: <4NfdXAAbooE0EwPO@talula.demon.co.uk> References: <3411E944 DOT 52E6 AT voyageur DOT ca> NNTP-Posting-Host: talula.demon.co.uk MIME-Version: 1.0 Lines: 25 To: djgpp AT delorie DOT com DJ-Gateway: from newsgroup comp.os.msdos.djgpp Precedence: bulk > set_gfx_mode(GFX_VGA, 320, 200, 1024, 1024); > clear(screen); The GFX_VGA driver uses the standard mode 13h 320x200 resolution, which doesn't support hardware scrolling. So when set_gfx_mode() sees your request for a 1024x1024 workspace it gives up in disgust and returns -1. At this point you are still in text mode, so the call to clear(screen) crashes your program. You should always check the return code from set_gfx_mode(), unless you are using GFX_VGA driver without requesting any virtual screen or GFX_MODEX with a virtual screen that fits into 256k of video memory. Any other request might sometimes fail! Re. getting it to work, if you change that GFX_VGA to GFX_MODEX you will be able to get a 512x512 virtual screen. For the full 1024x1024 size you will need to use a VESA driver, which generally don't support any low resolution screen modes. If you have UniVBE installed your card _might_ be able to do it, but as a rule you shouldn't count on getting a scrollable VESA screen in anything less that 640x400 or 640x480 mode. See the documentation for set_gfx_mode() for a detailed description of the different drivers and what they are able to do... -- 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.