From: Hans-Bernhard Broeker Newsgroups: comp.os.msdos.djgpp Subject: Re: Anyone have VGA (620x480x4) code to share Date: 1 Mar 2001 12:50:59 GMT Organization: Aachen University of Technology (RWTH) Lines: 27 Message-ID: <97lgjj$4s0$1@nets3.rz.RWTH-Aachen.DE> References: <01c0a1c5$da8125a0$98247d81 AT doug> NNTP-Posting-Host: acp3bf.physik.rwth-aachen.de X-Trace: nets3.rz.RWTH-Aachen.DE 983451059 4992 137.226.32.75 (1 Mar 2001 12:50:59 GMT) X-Complaints-To: abuse AT rwth-aachen DOT de NNTP-Posting-Date: 1 Mar 2001 12:50:59 GMT Originator: broeker@ To: djgpp AT delorie DOT com DJ-Gateway: from newsgroup comp.os.msdos.djgpp Reply-To: djgpp AT delorie DOT com Doug wrote: > Does anyone have code to share for standard VGA mode for DJGPP? I'm > looking for something simple (if possible) for 640x480 with 16 > colors. Just basic mode setting and pixel get/set and if possible > line drawing... You don't say why you want to (have to?) use that mode, but let me advise against using it as long as you can possibly help it. 16 color modes in VGA and higher are a royal PITA to write code for. It's almost unbelievably complicated to output a single pixel in those EGA-like modes, given all those bit planes, bank access mode registers and whatever you have to take care of. Compare that with the very simple 256 color modes where you can usually just write a single byte to a particular memory location and be done with it. Esp. since VESA linear frame buffering is available for just about every piece of hardware currently in use. I.e. unless there's a very good reason in favour of doing it, keep your fingers off those modes. Use 640x480x256 or something higher, instead, or if you really must, rely on BIOS putpixel routines to access them. The fraction of machines that offer 640x480x16 but not 640x480x256 is small enough to be negligible for just about every application. -- Hans-Bernhard Broeker (broeker AT physik DOT rwth-aachen DOT de) Even if all the snow were burnt, ashes would remain.