Date: Mon, 22 Nov 1999 02:08:33 +0200 From: Marius Myburg Subject: Re: fprintf() and using under graphic modes To: djgpp AT delorie DOT com Message-id: <0FLK003UZO9RIJ@cpt-proxy1.mweb.co.za> MIME-version: 1.0 X-Mailer: Microsoft Internet Mail 4.70.1154 Content-type: text/plain; charset=ISO-8859-1 Content-transfer-encoding: 7bit X-MSMail-Priority: Normal X-Priority: 3 Reply-To: djgpp AT delorie DOT com If you really want to do things yourself from the bottom up, then you can access the ROM character set directly. char *rom_char_set = (char *)0xffa6e; This is the start of the character set. Treat it exactly like a memory bitmap. Each character is 8 bits wide and 8(?) bits high. _____________________________________________ Wise man: "Behind blind eyes, there lies great vision!" Pupil : "What does that mean, master?" Wise man: "Nothing, I just like the sound of it!" _____________________________________________ ---------- > From: Chaos > To: djgpp AT delorie DOT com > Subject: fprintf() and using under graphic modes > Date: Sunday, November 21, 1999 12:17 AM > > 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. > _______________________________________________ >