From: "Chaos" Newsgroups: comp.os.msdos.djgpp Subject: fprintf() and using under graphic modes Date: Sat, 20 Nov 1999 23:17:17 +0100 Organization: Chaos Engine Lines: 42 Message-ID: <8176ml$or0$1@portraits.wsisiz.edu.pl> NNTP-Posting-Host: pb26.warszawa.ppp.tpnet.pl X-Trace: portraits.wsisiz.edu.pl 943136277 25440 212.160.53.26 (20 Nov 1999 22:17:57 GMT) X-Complaints-To: abuse AT news DOT wsisiz DOT edu DOT pl NNTP-Posting-Date: 20 Nov 1999 22:17:57 GMT X-Newsreader: Microsoft Outlook Express 4.72.3110.1 X-MimeOLE: Produced By Microsoft MimeOLE V4.72.3110.1 To: djgpp AT delorie DOT com DJ-Gateway: from newsgroup comp.os.msdos.djgpp Reply-To: djgpp AT delorie DOT com Hi I've been recently writing 2D video game. Nothing really big, but for my pleasure. VESA is used prtty much in my code, so I was wondering if there is easy (and fast!) method to print some text message on the LFB or VRAM (using bank switching). My first thought was to make it with fprintf() and other *printf functions. I was surpprised, that fprintf put a very nice text prompt in 640*480*256c mode (0x101). 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-familly functions. Are there any limitations in using those functions in graphics modes? I suspect they are only text modes functions. And what about erasing buffer (text buffer) in graphics modes. I know that i sends strings to stdout but, could this mess my VRAM in graphic mode? Secondly. Is ther a limit how much memory can I use in the following example: __dpmi_set_segment_limit(VideSelector,XXXXXXX); I'm using that in Linear_Frame_Buffer allocating routine. Experimentally i figured out that reasonable amount (of XXXXXX) is 1024*1024. My machine (64 MB RAM) didn't let me "take" more. And what if I will have to allocate much more memory for true_color_high_resolution prog? Is ther a way to go through it? -- Take care. -=| Chaos |=- e-mail: chengin AT alpha DOT net DOT pl chengin AT polbox DOT com _______________________________________________ The statistics on sanity are that one out of every four people is suffering from some form of mental illness. Think of your three best friends. If they are okay, then it's you. _______________________________________________