VOGONS


First post, by NewRisingSun

User metadata
Rank Oldbie
Rank
Oldbie

FixMPU is a software solution for the "hanging note bug" encountered when using the MPU-401 interface of Sound Blaster 16 cards bearing DSP versions greater then 4.05 and smaller than 4.16. Refer to this wiki article ("Type 1" only) for a more detailed description.

FixMPU acts as a launcher for the actual game. Instead of typing "DOOM" at the command line, type "FixMPU DOOM", followed by any command line parameters. The BLASTER= environment variable must be correct in the the A, I and P values. Only IRQs below 8. On two tested systems with affected Sound Blaster 16 cards, FixMPU successfully prevented the well-known high-pitched garbage notes from occurring. FixMPU does not attempt to correct any other hardware or software problem, such as slow-downs or missing MIDI messages as a result of games' short delay loops (hello LucasArts and Sierra).

Please refer to the included FIXMPU.TXT for technical details. Source code included. Comments welcome, but only to this thread, not via PM.

Attachments

Reply 1 of 17, by darry

User metadata
Rank l33t
Rank
l33t
NewRisingSun wrote on 2020-10-31, 14:41:

FixMPU is a software solution for the "hanging note bug" encountered when using the MPU-401 interface of Sound Blaster 16 cards bearing DSP versions greater then 4.05 and smaller than 4.16. Refer to this wiki article ("Type 1" only) for a more detailed description.

FixMPU acts as a launcher for the actual game. Instead of typing "DOOM" at the command line, type "FixMPU DOOM", followed by any command line parameters. The BLASTER= environment variable must be correct in the the A, I and P values. Only IRQs below 8. On two tested systems with affected Sound Blaster 16 cards, FixMPU successfully prevented the well-known high-pitched garbage notes from occurring. FixMPU does not attempt to correct any other hardware or software problem, such as slow-downs or missing MIDI messages as a result of games' short delay loops (hello LucasArts and Sierra).

Please refer to the included FIXMPU.TXT for technical details. Source code included. Comments welcome, but only to this thread, not via PM.

This is very interesting and useful . Thank you very much for sharing .

Reply 5 of 17, by vetz

User metadata
Rank l33t
Rank
l33t

Amazing work! Will test it out 😀

Wish this came 10 years ago, then my collection/system setup would've looked very different.

3D Accelerated Games List (Proprietary APIs - No 3DFX/Direct3D)
3D Acceleration Comparison Episodes

Reply 6 of 17, by EmpireOfScrap

User metadata
Rank Newbie
Rank
Newbie

This is quite amazing work. Thank you also for explaining the theory of operation and providing the source code in the archive.

I have tried this out with two cards yesterday and it worked fine out of the box! I will do more testing later, but reading on how it works, I assume it will work the same on all the cards.

Reply 8 of 17, by Oetker

User metadata
Rank Oldbie
Rank
Oldbie

I don't understand how I haven't seen this thread before, what a great tool! The analysis is very interesting, I'd be curious to know how you discovered the mechanism behind the bug. And, do you have any idea what causes the Type 2 bug and it that could be fixed?
It's especially great that this tool works with protected mode games.

Reply 9 of 17, by Oetker

User metadata
Rank Oldbie
Rank
Oldbie

Also, the analysis of the slowdown Duke3D is very interesting, I assume you've looked into the source code? Is it a conflict between

MPU_SendMidi (tests if device is ready)
MIDI_Reset (disables interrupts)
BLASTER_ServiceInterrupt (waits for an interrupt from the digital audio part)

Looking at the code further it seems MIDI_Reset is called whenever a track is (re)started, so maybe that explains why the game will also hang during gameplay, not just at the 3DRealms logo. I guess it should be possible to fix the game's audio library?

Reply 10 of 17, by ViTi95

User metadata
Rank Member
Rank
Member

Duke3D uses the Apogee Sound System, the source code is fully available so it's possible to fix it. I'm using it for FastDoom (as DMX is closed source) compiling it instead of linking as a prebuilt library, maybe you can use it to fix that problem.

Reply 13 of 17, by mkarcher

User metadata
Rank Oldbie
Rank
Oldbie
muteKi wrote on 2022-06-06, 18:21:

Simple, probably silly, question -- when you say "MPU-401" does that include wavetable headers?

On SB16-like cards (that's the only family of cards requiring FixMPU), the wavetable header and the gameport MIDI output share the same signal. So everything that influences MIDI output always applies to both. This is true for FixMPU, too. (SB16-like cards include the AWE32 and AWE64 cards, because those cards only differ in having an EMU8k synthesizer that is separate from the MIDI/DSP system that has the hanging note issue)

Reply 15 of 17, by darry

User metadata
Rank l33t
Rank
l33t
villeneuve wrote on 2022-06-06, 22:44:

I wonder how FixMPU does compare to SoftMPU. Two search engines I tried didn't give me any clue about that. Anybody here able to give me a hint?

They are completely different things.

FixMPU addresses a bug in SB16, AWE32, SB32 MPU-401 implementation with certain DSP versions.

SoftMPU allows for intelligent mode MPU-401 emulation on any sound card with a UART mode only (so called "dumb") MPU-401 compatibility or with a an SB MIDI port or even through a serial port.

Reply 17 of 17, by muteKi

User metadata
Rank Newbie
Rank
Newbie
mkarcher wrote on 2022-06-06, 22:17:
muteKi wrote on 2022-06-06, 18:21:

Simple, probably silly, question -- when you say "MPU-401" does that include wavetable headers?

On SB16-like cards (that's the only family of cards requiring FixMPU), the wavetable header and the gameport MIDI output share the same signal. So everything that influences MIDI output always applies to both. This is true for FixMPU, too. (SB16-like cards include the AWE32 and AWE64 cards, because those cards only differ in having an EMU8k synthesizer that is separate from the MIDI/DSP system that has the hanging note issue)

Ah, thanks. I don't have any external MIDI modules but I do have a wavetable card (that sounds close enough to soundcanvas for me to quite enjoy playing, say, DOOM with it) so being sure this would fix it (which I suspected based on how it works) is good for me and my recently-acquired Vibra16S.