Reply 20 of 35, by sndwv
wrote:What's the pass?
'vogons', in case you hadn't found out already.
wrote:What's the pass?
'vogons', in case you hadn't found out already.
I've hit this issue with PCem too (with SoftMPU loaded through SB16 emulation, since PCem lacks proper MPU-401 emulation.) Exactly the same bug there. Is PCem using the same code as DOSBox for this? Otherwise, it's strange that both DOSBox and PCem exhibit the exact same bug.
LEGMPU.COM isn't working on PCem, since there's no way use IRQ 2.
Coming late to this thread - Ripsaw8080, was this eventually patched into the baseline dosbox (assuming that's the right place to permanently fi, it), or is the TSR still the suggested fix for slow midi/mt-32 tempo?
wrote:Coming late to this thread - Ripsaw8080, was this eventually patched into the baseline dosbox (assuming that's the right place to permanently fi, it), or is the TSR still the suggested fix for slow midi/mt-32 tempo?
The TSR is still needed.
Thanks Realnc!
I believe that SoftMPU does use the MPU code from DOSBox, which certainly could account for it having the same issue.
Games that use intelligent mode generally fulfil a data request immediately in the MPU IRQ handler, but the Legend games are unusual in that they register a data request in the MPU IRQ handler and only fulfil it later in the timer IRQ handler. I think an event queue would help to better tolerate the delay because data could be requested in advance. It might be just an active and pending event, so a queue depth of two events, but it's not a trivial change in the code.
The TSR calls the timer IRQ handler immediately after an MPU IRQ, thus eliminating the problematic delay, but the workaround is not something that can be "patched into" DOSBox.
wrote:The TSR calls the timer IRQ handler immediately after an MPU IRQ, thus eliminating the problematic delay, but the workaround is not something that can be "patched into" DOSBox.
Do you still have the source for the TSR around? I'd like to see if I can get it working for a different IRQ, for the Sound Blaster + SoftMPU use-case, which is usually IRQ 5 or 7. (You can't use IRQ 2 on a Sound Blaster, but the Legend games allow you to configure the IRQ so they can be played with SoftMPU.)
Interesting details Ripsaw, thanks for the explanation.
Definitely sounds like a development bug in these Legend games. So if there's any gap between the MPU and timer IRQs, then midi playback will be delayed by the gap (over and over again, giving the feeling of slower music).
Maybe Legend developers had machines where these two IRQs fired at the same time, or maybe they had some overlapping/conflicting IRQs that effectively did the same?
I suppose if the game doesn't otherwise use the timer IRQ for anything important, then having it fire sooner than its usual 55ms tempo won't affect anything in the gameplay. Nice.
I'm curious to give this a go with proper midi audio; thanks again for the very nice work!
I didn't mention it before, but the Legend games do reprogram the timer interrupt to be quite a bit faster than the normal ~18.2 times per second. That is why it's only fast/short events, like the timpani rolls in the Gateway 2 title music, that have a problem because of the delay.
I doubt the Legend games were developed or tested on non-standard hardware or BIOS. I think a real MPU-401 tolerates a small amount of delay in fulfilling data requests by using an event queue like I described in my previous comment. It makes sense because the MPU-401 was probably designed to work without issue on a 4.77 MHz PC using software that might not be efficiently coded.
I just found this topic when I notice the same problem with the Legend games. I am wondering if anyone can help me with LEGMPU.COM. I have it in the game's folder and when I run it with DOSBOX nothing happens. The game doesn't load and the command prompt shows again. I used ripsaw8080's GATEFIX.COM for Gateway before without a problem.
Here is what happens:
C:\gateway>legmpu.com
C:\gateway>_
If anyone can point me in the right direction I would really appreciate!
Yeah, that's normal. It doesn't print anything, it just loads itself into memory and stays there.
Also, do you actually need gatefix.com? The starting room ("Your Quarters") music plays fine for me after the intro with current SVN dosbox.
LEGMPU is a TSR, and it does not automatically launch a game because it applies to more than one Legend game.
GATEFIX is a loader, and it launches Gateway because it is specifically for that game. However, LEGMPU does a better job of fixing the issue addressed by GATEFIX, so you don't need to use both.
Ah, I was thinking LEGMPU.COM was a loader too!
OK, so I tried this:
C:\gateway>legmpu.com
C:\gateway>gateway.exe mt32
And it works! 😀
Thanks to you both!
For future reference, here are Legend Entertainment's games courtesy Moby Games:
https://www.mobygames.com/company/legend-ente … ainment-company.
Edit: and the subset that benefit from ripsaw's midi timer TSR (thank you ripsaw!):
AFAIK, Superhero League of Hoboken is the last game release affected by the issue described in this thread. The exception is "The Lost Adventures" which is a compilation of earlier games.
Thanks for the clarification ripsaw; updated.