delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/1998/02/18/18:45:47

From: Hartmut Schirmer <hsc AT techfak DOT uni-kiel DOT de>
Newsgroups: comp.os.msdos.djgpp
Subject: Re: ?: GRX22, only 2 colors after GrSetMode(..default..)
Date: Wed, 18 Feb 1998 11:33:44 +0100
Organization: Technische Fakultaet, University of Kiel, Germany
Lines: 34
Message-ID: <34EAB908.4B11@techfak.uni-kiel.de>
References: <6ccvb1$ook$1 AT fsuj19 DOT rz DOT uni-jena DOT de>
NNTP-Posting-Host: zora.techfak.uni-kiel.de
Mime-Version: 1.0
To: djgpp AT delorie DOT com
DJ-Gateway: from newsgroup comp.os.msdos.djgpp

E. Schmidt wrote:
> Sometimes my simulation program sets monochrom mode after
> 
>   GrSetMode(Gr_default_graphics);
> 
> The probability of this increases with larger memory allocation
> (Statement: You will never have enough memory...)
> 
> But sometimes it's Ok -> 640x480x16 colors.
> 
> Usage of GR_biggest_graphics
> or Gr_width_height_color_graphics
> does not help
> 
> Where should I look for solution?

Get the available memory before GrSetMode by
__dpmi_get_free_memory_information

If there's not enough memory for some internal allocations modes will be
disabled.

> By the way, I make text output in graph mode by means of printf()
> Is it Ok?

In standard VGA modes this should work as the BIOS knows how to display
text on graphics screens.

Hartmut
-- 
Hartmut Schirmer                   | Phone: +49-431-77572-709  FAX:-703
Automatisierungs- & Regelungstech. | hsc AT techfak DOT uni-kiel DOT de
Technische Fakult"at,              | http://www.techfak.uni-kiel.de/~hsc
Kaiserstr. 2, 24143 Kiel, Germany  | PGP key via WWW, Key ID:6D84AEC1

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019