Mail Archives: djgpp/1998/02/10/07:47:19
From: | brenner AT biochem DOT mpg DOT de (Markus Brenner)
|
Newsgroups: | comp.os.msdos.djgpp
|
Subject: | Allegro: Adding background music to old DOS game
|
Date: | Tue, 10 Feb 98 12:34:24 GMT
|
Organization: | Max-Planck-Institut fuer Biochemie
|
Lines: | 33
|
Message-ID: | <6bphi4$8r6$1@fu-berlin.de>
|
NNTP-Posting-Host: | pcfr21.biochem.mpg.de (141.61.7.150)
|
Mime-Version: | 1.0
|
To: | djgpp AT delorie DOT com
|
DJ-Gateway: | from newsgroup comp.os.msdos.djgpp
|
What I'm trying to do is get some MIDI background music into the old MS-DOS
Ultima games. My plan is to start up Allegro's MIDI player in the background,
then hook the 0x21 interrupt and check for the file-open function. My
interrupt routine should determine which file name the Ultima game is about to
open, then accordingly change the current MIDI file playing in the background.
Then the actual game will be started by issuing system("ultima").
Now I'm a beginner in coding DOS system functions (though I did quite some
extensive Assembler programming on the Amiga some years ago) and after trying
to grasp the basic concepts of the Allegro library I concluded it would be a
wise idea to ask the professionals if this is possible using Allegro/djgpp at
all :) From what I learned so far it's pretty tricky to do complex tasks like
changing the running song in the MIDI routines *from out of an interrupt*, can
you give me some suggestions as how to do this? (Can I call the play_midi()
function from out of an interrupt handler? I'm pretty sure, I can't ;) Is
there an easy way to do this anyway?) How about the 0x21/open interrupt. Do I
use Allegro's _install_irq() routine to install my own handler?
Any help or helpful source programs would be very welcome!
Thanks,
-markus
----
Markus Brenner _ no matter how - how hard you try
-==(UDIC)==- ( ) in your own life, and through the years
|\/| --+-- with every up - must come a down
\/ | enjoy the laughter and the tears
Minstrel Dragon | of happiness (Roger Taylor)
Lord High Mucketty-muck of the UDIC Greybeards (tm)
email: brenner AT biochem DOT mpg DOT de * WWW: http://www.biochem.mpg.de/~brenner/
- Raw text -