www.delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/1999/08/26/02:12:10

From: Eric Berenson <ekb44 AT cats DOT ucsc DOT edu>
Newsgroups: comp.os.msdos.djgpp
Subject: Allegro Again
Date: Tue, 16 Feb 1999 12:29:26 -0800
Organization: University of California, Santa Cruz
Lines: 84
Message-ID: <36C9D524.F298279E@cats.ucsc.edu>
NNTP-Posting-Host: tsb-01.dialup.ucsc.edu
Mime-Version: 1.0
X-Mailer: Mozilla 4.01 [en] (Win95; I)
X-Priority: 3 (Normal)
To: djgpp AT delorie DOT com
DJ-Gateway: from newsgroup comp.os.msdos.djgpp
Reply-To: djgpp AT delorie DOT com

Thanks all for the replies! I would've been more specific if I knew
response would be like this.
Last night I was fried; I never passed a string like "GFX_VBEAF" to
set_gfx_mode(); Always used GFX_AUTODETECT or GFX_VBEAF. Sorry.
I have a Gateway 2000 P120, no mmx, from 1995 (a gift), with a STB Trio
64V+ graphics card and an Ensoniq Soundscape
Wavetable Sound card, and 16MB RAM, running WIN95. None of the sound
library routines work in Allegro, but that's a problem to fix later. If
I cannot get any graphics I have nothing to do. I switched from
TurboPascal/DOS/ASM to the "real world" of C. I have so many things to
port and look at (New cellular autonomatas, escape time pictures over
complex and quaternions, earthquake data, listening to dynamical
systems, etc etc etc etc and I have written fast as f-k optimized
floating point routines for all kindsa stuff. Must learn ATT syntax and
port TASM code. Learning C but I am quick. Wrote my own assembly video
kbd mouse library for Pascal. I'd rather not rewrite it for non-DOSmode.
I like Allegro. I just wont work.
Shawn, I followed your suggestions. Here is the code. Both programs
crash unrecoverably. Every time. Using REHIDE or gcc on the command
line. Same thing. Every time.
-----------------------------------------------------------------------------

/* This program crashes unrecoverably in a power-down fashion. */
#include <stdlib.h>
#include <stdio.h>
#include "allegro.h"

int main()
{
   allegro_init();
   install_keyboard();
   if (set_gfx_mode(GFX_AUTODETECT, 800, 600, 0, 0) != 0) {
      allegro_exit();
      printf("Error setting graphics mode\n%s\n\n", allegro_error);
      return 1;
   }
   return 0;
}
------------------------------------------------------------------------------

#include "allegro.h"
int main()
{
   int x, y, w=800, h=600;
   allegro_init();
   install_keyboard();
   if (set_gfx_mode(GFX_AUTODETECT, w, h, 0, 0))
   /* the line above produces an unrecoverable-powerdown type crash */
   {
     allegro_exit();
     printf("Modeset failure.\n");
     return 0;
   }
   for (x=0;x<320;x++)
     for (y=0;y<200;y++)
       putpixel(screen,x,y,x&y);
   do{
   } while (! keypressed() );
   allegro_exit();
   return 0;
}
-----------------------------------------------------------------------------------------------

And Mr. Sharp,.... do you think I am stupid?
I taught myself electronic music, quantum mech., abstract algebra,
number theory, complex analysis, assembly language (Motorola, Intel),
hardware programming on PCs, (int 1, int8, 0040:000 area, ETC!), music
theory, bass and guitar, piano,
Pascal, C, learning DSP theory (Zxform, freq/time domain, filter
theory), and a lot of other stuff. Don't you think I printed anything
out? Akshly I printed out all the docs, tests, many examples, and
studied them. About 1000 pages of stuff. My problem is hardware related
and not my mental hardware, Mr. Sharp. The documentation does not speak
clearly about preconditions. I don't know if there are any. Usually, I
put comments above a subroutine briefly describing neccessary
preconditions or assumptions about other vaiables and such. I cannot
find this in the Allegro docs. Every example program
in the examples dir uses 320x200 mode. Anyways, I appreciate sarcasm, as
I use it frequently, Mr. Sharp, but I am a little on the rag lately.
I'll read your message again and if I really concentrate I suppose I
could figure out how to laugh at it. Ha ha.
Thanx y'all,
EB

- Raw text -


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