www.delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/1996/06/17/07:55:48

Date: Mon, 17 Jun 1996 12:42:37 +0100 (BST)
From: Shawn Hargreaves <slh100 AT unix DOT york DOT ac DOT uk>
To: Orlando Andico <orly AT gibson DOT eee DOT upd DOT edu DOT ph>
cc: djgpp AT delorie DOT com
Subject: Re: Allegro and linux
In-Reply-To: <Pine.SGI.3.93.960617155113.8064F-100000@gibson.eee.upd.edu.ph>
Message-ID: <Pine.SGI.3.91.960617095632.19576E-100000@tower.york.ac.uk>
MIME-Version: 1.0

On Mon, 17 Jun 1996, Orlando Andico wrote:

> I'm really just hazarding a guess here, since I don't use Allegro at
> present. Linux has this textmode driver called gpm which virtualizes the
> mouse. I'm not sure how you handled the timer stuff (God forbid -- using
> an interrupt handler and reprogramming the PIC) but UN*X has a more
> elegant version in setitimer(). I know DJGPP has it, too.

Hehe. Yes, Allegro does some very dodgy stuff with the PIT, including, in 
the latest version, simulating vertical retrace interrupts. It would be 
possible to get similar results with setitimer(), in fact you could just 
slot in a signal handler in place of Allegro's interrupt handler, and 
replace the PIC programming code with calls to setitimer(). Under DOS, 
setitimer() has the disadvantage that signals don't get raised in real 
mode, which produces nasty artifacts like the MIDI player grinding to a 
halt every time you access the disk, but I think it would be fine under 
Linux.

> Linux does support MIDI with the Linux Sound System. Although at least one
> Linux MIDI player first converts the MIDI to PCM, then blasts that out on
> /dev/audio.. not optimal on memory and CPU cycles, but portable since it'd
> also work on Suns without modification..

I've just had a look at the Linux voxware, and I don't think it would be 
too hard to port the Allegro sound code to it. And writing an Allegro 
graphics driver that sits on top of svgalib would be pretty easy. I don't 
have the time to do this myself, but if anyone wants to have a go I can 
give you some pointers about where to start...


/*
 *	Shawn Hargreaves.        Why is 'phonetic' spelt with a ph?
 *	Check out Allegro and FED on http://www.york.ac.uk/~slh100/
 */



- Raw text -


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