delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/1998/11/06/17:59:50

Message-Id: <199811062259.WAA22269@remus.clara.net>
From: "Arthur" <arfa AT clara DOT net>
To: "DJGPP Mailing List" <djgpp AT delorie DOT com>,
"Laqutis of Borg" <lodathi AT hotmail DOT com>
Subject: RE: Please Please Please Please <Pulling hair out>
Date: Fri, 6 Nov 1998 22:59:15 -0000
X-Priority: 3 (Normal)
X-MSMail-Priority: Normal
X-Mailer: Microsoft Outlook 8.5, Build 4.71.2173.0
Importance: Normal
In-Reply-To: <19981106173039.11464.qmail@hotmail.com>
X-MimeOLE: Produced By Microsoft MimeOLE V4.72.3110.3
Reply-To: djgpp AT delorie DOT com

> After reading all of the documentation that I could get my hands on for
> Allegro, GCC and DJGPP I have come to the conclusion that you are a
> helpful bunch of guys and just might answer my e-mail. I am having
> problems running any applications I compile that use the palette I
> guess. Here is my senario:

A better bet would be to try the Allegro or AGP Mailing Lists (go to
www.talula.demon.co.uk/allegro/ for details), since the problem is more
Allegro related. That's not to say that you won't find an answer on this
group, though.

> DJGPP and associated files were set up properly.
> Allegro was setup and compiled properly.
> Everything compiles and links properly.
> I have the previous setup on 4 different machines:

[snip] (What you had here probably wouldn't have made much of a difference,
at least not on the more powerful machines)

> I set the video mode with Allegro AUTODETECT, 640, 480, 0, 0.

You mean GFX_AUTODETECT ?

> When I
> use the grabber utility it runs fine until I read a 256 color bitmap
> then it locks up my PC's. When I try and use the graphics primatives
> with color they crash, locking up the PC's. I've tried the various VESA
> modes and they crash as well.

When the grabber loads a bitmap, it automatically dispalys that image if
possible. It seems that that is what is causing the problem. Does this
happen on all four systems you mentioned earlier?

Do you have VESA drivers for all of your cards? Go to your cards
manufacturers' websites and download the latest drivers. Ask them for VESA
drivers if possible.

> I have also attached a C file that I wrote myself using DJGPP and

Have you? :-)

> Allegro primitives rectfill() and rect(). My source simply sets the mode
> as AUTODETECT, 640, 480 then cycles through a for loop to display 10x10
     ^^^^^^^^^^
This again. I hope you havn't used this in your code (it probably wouldn't
compile, anyway).

> blocks of 256 colors across the screen in 4 rows. When I compile and run
> this source it displays properly but if you let it sit there too long it
> will lock up the PC.

Does it draw random colours to the screen? For instance colours 0 - 256? If
so, the program will crash whenever you try to draw colour 256 (palette
indeces between 0 and 255 - common error).

> I know nothing of DPMI nor do I know anything about CSDPMI. I used to
> write direct video memory functions, in line assembly with 16 bit Turbo
> C by Borland years ago. I never had a problem. I have not programmed in
> years and am quite anxious to begin again. I currently use the IDE Rhide
> for DJGPP. Everything is the same as Borlands old IDE except for a few
> things such as memory model. I looked at the GCC documentation for
> command line arguments which select a memory model. I found none. Does
> this have something to do with the architecture of GCC and DJGPP 32 bit
> (compiling and linking in DPMI????) That part kinda confuses me.

DJGPP is a 32-bit Protected Mode compiler. It has only one memory model
(equivalent to TINY I think). DPMI stands for DOS Protected Mode Interface,
and a DPMI server (eg DOS4GW or CWSDPMI) must be in a) a directory in your
PATH environment variable, or b) in your current directoryfor a DJGPP
program to run. For ease of use I've just put CWSDPMI in my DJGPP/BIN
directory. Read the FAQ, because it's explained in there.

The most significant difference in graphics terms is no real mode - ie no
farpointers. You can emulate these using DPMI - check out the section in the
Allegro manual about this.

Allegro, however, is perfectly capable of handling DPMI itself so you
shouldn't need to worry until you want to hack the screen with your own
routines for that little extra bit of speed.

Can't really say more until I see that code of yours.

James Arthur
jaa AT arfa DOT clara DOT net
ICQ#15054819


- Raw text -


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