I'm sorry to hear that you are experiencing problems with the MIDI music on Tie Fighter CD. We are aware of some problems that h […]
Show full quote
I'm sorry to hear that you are experiencing problems with the MIDI music on Tie Fighter CD. We are aware of some problems that have occurred relating to the MIDI music option on Tie Fighter (this has most commonly been seen on systems that use MIDI daughter-boards.) The most common problem that has been reported is the occurrence of hanging notes. We have spent a great deal of time researching this problem, and unfortunately have come to the conclusion that the problem cannot be fixed. Here is a detailed explanation of what we have discovered to be the nature of the problem:
The standard adlib-compatible FM synthesizer (also known as the OPL2 or OPL3 chip) is the de facto music standard for computer games. The FM synth chip is located on the sound card and it's registers are directly accessible to our programmers. They program the chip to have nine channels of FM synthesis. When a music note plays, IMUSE (our sound engine) finds an open channel, downloads the appropriate instrument (11 bytes), and flips a status bit in the FM chip to un-mute the channel.
This process takes around 275 microseconds to complete. Turning the note off takes under 30 microseconds. Since the instrument is included in the note-on command, there is no extra time taken to switch instruments. These timings are small enough that we haven't encountered any stuck notes or other problems when playing Tie Fighter using the FM synth option for the music. As long as you select FM synth, you should be able to play the game without experiencing any hanging notes.
The General MIDI daughterboards (that most commonly attach to the Sound Blaster 16) can improve the quality of the game's music significantly.
However, because the chips driving the music are no longer on the sound card, the programmer is forced to access these chips indirectly through a serial interface on the card (running at around 32 kbaud, or 4000 bytes/sec.) The card then interprets the standard MIDI note information. To turn a note on, you must send 3 bytes to the card, and then wait for each to be sent to the daughterboard (at 4000 bytes/sec, this process takes 750 microseconds.) Turning a note off is another 3 byte message (which takes another 750 microseconds). Changing an instrument, is a 2 byte message (another 500 microseconds). In addition to the time that it takes to send a byte to the daughterboard, there is a delay that is caused by the wait for an acknowledgment signal to be returned.
The high density of the notes in our Star Wars music, and the delay caused by routing the information through the MIDI daughterboards, combined with the high-resolution SVGA graphics, presented quite a challenge to both our programmers, and to computer systems that were trying to simultaneously process all of the game's data.
In some cases, systems processing all of this information during gameplay can experience temporary pauses (caused by such things as waiting for data from the CD-ROM.) This causes the music engine to starve and then suddenly become inundated with MIDI messages. When this happens, the system literally hangs for 2-3 seconds as the computer attempts to process the CD-ROM reads and the MIDI messages at the same time.
We attempted to correct this problem by changing the setup so that the system did not have to wait for the "busy-wait" acknowledgment that was being sent out through the MIDI messages. This did manage to get rid of the pausing problem, but there were still difficulties because occasionally a MIDI message was lost. When the lost MIDI message was a "note-on" message, the note simply didn't play. When the lost message was a "note-off" message, the musical note didn't stop playing--This is what causes the "hanging note" problem.. Our various other attempts to remedy stuck notes either recreated the pauses, or didn't work 100% of the time.
Another thing that we tried to do to eliminate the pauses, was to internally buffer the MIDI messages and wait for the "busy-wait" acknowledgment, so that when the system is very busy, no MIDI messages are sent out. Then, when the system has extra time for music, the buffer unloads as much as possible. This worked well, but since the "time-out" period was shortened, stuck notes still occurred (but fewer than normally would have). This is the solution that was shipped with Tie Fighter CD.
We spent an extensive amount of time researching this problem, with the hope of coming up with a solution, but we have determined that there just isn't any way that a patch can be produced that will fix the problem (specifically because the problem is hardware related). The best thing to do would be to use the FM Synth option when playing the game. This will allow you to play without experiencing any of the "hanging-note" problems.
I appreciate your patience in this matter. We wanted to be sure that we had exhausted every possibility before we reached the conclusion that the problem could not be resolved.
I hope this helps.
Natalia / LucasArts Technical Support