From: "Kalum Somaratna aka Grendel" To: djgpp AT delorie DOT com Date: Mon, 22 Nov 1999 14:56:54 +0600 MIME-Version: 1.0 Content-type: text/plain; charset=US-ASCII Content-transfer-encoding: 7BIT Subject: Re: fprintf() and using under graphic modes In-reply-to: <8195o6$qfc$1@portraits.wsisiz.edu.pl> X-mailer: Pegasus Mail for Win32 (v3.12) Message-ID: <94329738501@out.newmail.net> Reply-To: djgpp AT delorie DOT com X-Mailing-List: djgpp AT delorie DOT com X-Unsubscribes-To: listserv AT delorie DOT com Precedence: bulk On 21 Nov 99, at 17:12, Chaos wrote: > My philosophy is that: If Allegro can do it I can do it too. > BTW. I'm treating that game as learning in programming C and Asm using > various algorithms. Way to go Chaos! It's nice to see someone trying to learn by experimenting instead of relying blindly on high level library API's. Sure, Allegro is a great library (my favourite) but one must not depend on library's without having a understanding of what they do. for ex;- If you have a understanding about various algorithm's for texture mapping ...etc you can think of other faster, innovative ways of doing it....(and maybe write a new 3D rendering engine which will get you lot's of $$$) . >>None of VESA works when compiling for M$ Windows If the video card supports VESA then you shouldn't have any problems acessing it under Win95/98. AFAIK NT doesn't allow direct access so this might not be possible under NT. Some card's have buggy VESA implementations however this can be corrected by installing SciTech Software's Display Doctor. The great game Quake v1.00 uses VESA 2.0 for video acess. >Now i'm wondering if I can do it safelly. Can I stick with printing >text messages such as timer or player name using only printf->family functions. Are there any limitations in using those functio ns >in graphics modes? AFAIK printf is dependent on the BIOS to print the strings. So the BIOS must be able to acess the video memory you are using for your graphics at the same time (it must understand the graphics mode). In my video card the bios writes to 0xA000 segment for printf call's. So when you use bank switching printf will work (the BIOS writes text to 0xA000 and the video card also uses 0xa000 for the screen). However if you are using the Linear frame buffer mode the buffer may be located somewhere around 128MB so the video card will be using the 128MB location for the screen. So when you use printf my BIOS will still be writing text to 0xa000 and there will be no text output on the screen because my video card in LFB mode ignores what is written to 0xa000 (because it reads the LFB located at 128MB). Regards, Kalum