delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/1997/03/04/01:06:18

From: pmonks AT iname DOT com (Peter Monks)
Newsgroups: comp.os.msdos.djgpp
Subject: Re: Some Allegro questions (Shawn?)
Date: Tue, 04 Mar 97 00:15:21 GMT
Organization: Financial Market Software Consultants pty ltd
Lines: 87
Message-ID: <5ffpip$26g_004@fmsc.com.au>
References: <5fdsds$p42 AT freenet-news DOT carleton DOT ca>
NNTP-Posting-Host: gw.fmsc.com.au
Cache-Post-Path: clark.fmsc.com.au!unknown AT sleepy DOT fmsc DOT com DOT au
To: djgpp AT delorie DOT com
DJ-Gateway: from newsgroup comp.os.msdos.djgpp

In article <5fdsds$p42 AT freenet-news DOT carleton DOT ca>, ao950 AT FreeNet DOT Carleton DOT CA (Paul Derbyshire) wrote:
>I have several questions about Allegro, mostly out of curiosity...
>
>* Why, when using a SVGA mode e.g. GFX_AUTODETECT 640x480, does a
>  fade_in(palette) or a fade_out() seem to do 4 fades in series instead of
>  just 1? Fades work as expected in GFX_MODEX. Is it a bug or a "feature"?

I'm not sure what you mean, but nothing unusual happens on either of my two 
PCs (an S3 P5-75 and a Video7 486DX33).  Even under Win95 palette fading runs 
perfectly.

>* Is the video manipulation ultimately done with super-fast nearptrs or far
>  pointers? Near pointers are thought not to work on some DPMI hosts,
>  so an optimal Allegro would detect the DPMI host, if it is a known safe
>  one i.e. cwsdpmi use nearptrs, else use farptrs for safety...

Its done with far pointers.  Near pointers _do_not_ work on many DPMI hosts 
(including Win95, which is probably the most common DPMI host), hence the use 
of far pointers.

>* What functions in allegro are typically inlined?
>* Which graphics functions use inline asm for optimisation?

Look at the source.

>* Was Allegro compiled with -m486?

Look at the makefile (or even just watch while Allegro is being compiled).

>* Do you know where UniVBE 5.1 can be obtained?
>  It seems to be the most up-to-date version that DOESN'T cripple itself
>  after 21 days.

Why don't you just register it, if you find it so useful?

>* When an allegro program that uses sound starts, there is a popping noise.
>  The noise also happens at exit. I have learned to dread this pop, since
>  usually if it happens when I'm not expecting it, I find myself staring at
>  a stack dump a few seconds later. What is it?

Most Soundblasters makes a small "popping noise" when they're reset.  My Pro-2 
does it when Windoze starts, for example.  This noise has no relationship or 
relevance to the bug in your program that is causing the stack dump.

>* There is a definite link between using allegro and GCC making funny noises
>  during compile. For instance, using RHIDE and Allegro, I ran a program,
>  and it hit a breakpoint. I inspected a few variables, then changed some
>  source and ran Make. GCC was called, and five seconds into the compile a
>  bunch of queer repeating and *LOUD* sound effects started coming from my SB!
>  It has happened a total of 3 times now. All 3 times after an allegro
>  program a) used sound and b) never got to allegro_exit.

How did you quit your program from inside RHIDE?  If you don't let Allegro 
properly shut down, it'll leave all sorts of handlers still in place, and 
they're bound to cause problems later on (as you've discovered).  You _must_ 
ensure Allegro shuts down properly, or you're going to get burnt.

One way to ensure Allegro shuts down correctly is to install the keyboard 
handler, then press Ctrl+Alt+End when you want to stop the program.  This 
ensures that Allegro's shutdown code gets called correctly.  Of course, you 
won't be able to use GDB (or RHIDE) to debug your program any more, but you 
can still use fprintf's and redirect the output (using redir - read the 
excellent FAQ).

>Also, using an S3, and lacking a non-crippled UniVBE supporting Vesa 2.0,
>is it possible to get a "modex" mode 320x240 that is not limited to 256 k?

RTFM:

"   How can I extend the 256k limit on Mode-X video memory? I have two megs 
   in my card.

      You can't. The limit is imposed by the VGA hardware, not by Allegro. 
      To access more than 256k of video memory you need to use an SVGA mode, 
      which means either switching to a higher resolution or getting a copy 
      of UniVBE, which provides several low resolution SVGA modes."

(quoted from the Allegro FAQ).

Peter


----------------------------------------------------------------------
Peter Monks                    http://www.geocities.com/Yosemite/4455/
pmonks AT iname DOT com
pmo AT fmsc DOT com DOT au
Peter_Monks AT australia DOT notes DOT pw DOT com

- Raw text -


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