Mail Archives: djgpp/1996/06/17/07:55:48
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 -