VOGONS

Common searches


First post, by Grestorn

User metadata
Rank Newbie
Rank
Newbie

Hi there,

I just revived my old MT-32 (it turned out that the PSU was bad) and I'm currently installing all kinds of old games I bought more than 10 years ago...

Some of them, especially old Legend text adventures ("Spellcasting 101", "Gateway", "Death Gate", "Eric the Unready" etc.) have excellent MT-32 support, but they all require a full fledged MPU-401 with working IRQ timing.

If you use one of the Creative MPU-401 emulations or the one provided by Windows, the games complain that they don't get any interrupts. It seems that they base their music timing on these interrupts, and simple MPU emulations don't provide them.

Fortunately, DOSBox does emulate those interrupts!!!! Horray! Finally a way to play those old MT-32 tunes!

But there's one drawback. The timing is a little off. The more complicated a piece is, the more delay can be percieved. Some tunes are really quite off key because of that.

I wonder if it's somehow possible to adjust the way the MPU-401 emulation is generating these interrupts, to make the timing more stable. Anyone got an idea how to do that?

But anyway, those were the times. Just started to play Gateway I again. What a great game! I miss Legend... Too bad that they tried to be mainstream and failed in the end...

Reply 1 of 12, by Qbix

User metadata
Rank DOSBox Author
Rank
DOSBox Author

did you use the cvs version of dosbox ?
that one should have better mpu401 support in intelligent mode.

Look in the development forum where to get it.

Water flows down the stream
How to ask questions the smart way!

Reply 2 of 12, by Grestorn

User metadata
Rank Newbie
Rank
Newbie

I already got the CVS version of the DOSBox, but thanks for the tip!

I just found out, that the sound lag is actually much less pronounced if I play in a window, not full screen.

Since those games use "hi-res" (800x600), the scaling isn't used in full screen, so these settings don't change anything. I guess I'll just have to play the game in a window. Which is not that bad actually...

I really enjoy playing "Gateway" by the way. Anyone else who still knows that game?

P.S.: You've done some great work on the DOSBox. Are you accepting donations?

Reply 3 of 12, by Qbix

User metadata
Rank DOSBox Author
Rank
DOSBox Author

ah yes. 800x600 is killing the timing. A lot of data needs to be transfered. I assume you allready used some frameskipping and set the output to overlay ?

We are accepting donations however we are obligated to do it through the sourceforge.net page.
On our homepage you see a "support this project" button. You can click that.

Water flows down the stream
How to ask questions the smart way!

Reply 4 of 12, by vasyl

User metadata
Rank Oldbie
Rank
Oldbie

Those games may actually work better if you decrease CPU cycles giving more time to sound emulation. We still have some odd issues in regard of performance differences between fullscreen and window -- SDL's acting up or something.
Frameskip in Legend games will work just fine as well. It may affect animated cutscenes but even those play at something around 6 fps. After all, Legend games are just glorified text adventures.
My favorite Legend's game is Eric the Unready but I liked pretty much all of them all the way to Shannara (CCS and Blackstone Chronicles were ok but not the same). Thinking of it, Eric the Unready was the reason why I started digging into the DOSBox code -- some versions of that game didn't work in 800x600 with 0.63.

Reply 5 of 12, by Kaminari

User metadata
Rank Oldbie
Rank
Oldbie
Grestorn wrote:

But there's one drawback. The timing is a little off. The more complicated a piece is, the more delay can be percieved. Some tunes are really quite off key because of that.

I think it's been like this since the implementation of Intelligent Mode.

Even in the CVS, the MIDI notes in the Legend games are more or less off key, no matter what the CPU cycle or the window scaling is set to. It's especially noticeable in Gateway 2 (ie. the condo) and Hoboken (ie. Matilda's computer room). I'm not sure what's causing it, since otherwise it works perfectly in a lot of games that are much more CPU and graphic intensive.

Reply 7 of 12, by Kaminari

User metadata
Rank Oldbie
Rank
Oldbie

Thanks ih8, sadly your optimized build doesn't seem to help. Normal/Dynamic Core don't make a difference either. Taking the example of Superhero League of Hoboken, the strangest thing is that it requires no more than 15% CPU time on my P4/2.7, yet the MIDI notes are played at a noticeably sluggish tempo.

For those having this game and an MT-32 at hand, try it in DOSBox (CVS or regular build) and compare it with how it should sound.

Reply 8 of 12, by HunterZ

User metadata
Rank l33t++
Rank
l33t++
Kaminari wrote:

Even in the CVS, the MIDI notes in the Legend games are more or less off key, no matter what the CPU cycle or the window scaling is set to. It's especially noticeable in Gateway 2 (ie. the condo) and Hoboken (ie. Matilda's computer room). I'm not sure what's causing it, since otherwise it works perfectly in a lot of games that are much more CPU and graphic intensive.

Do you mean "off-tempo" rather than "off-key"? If the actual wrong note pitches are being played, then it's probably not DOSBox's fault.

I can see how tempo problems could result, however (which you also mention experiencing).

Last edited by HunterZ on 2005-10-07, 15:15. Edited 1 time in total.

Reply 9 of 12, by Grestorn

User metadata
Rank Newbie
Rank
Newbie

First of all. thanks to all for your tips and suggestions! I'm glad that I'm not the only one who has a sweet spot for these adventures!

HunterZ wrote:

Do you mean "off-tempo" rather than "off-key"? If the actual wrong note pitches are being played, then it's probably not DOSBox's fault.

I can see how tempo problems could result, however (which you also mention experiencing).

Off-tempo is the more correct description. The pitches are correct. They're played by the real MT-32 after all, and I'm pretty sure that the messages themselves are transmitted correctly, just not with the correct timing.

A frameskip of 2 or 3 reduces the problem noticeably. I can live with the less-than perfect animations, so I'll stick with that.

Thanks again!

Reply 11 of 12, by Kaminari

User metadata
Rank Oldbie
Rank
Oldbie

Off-tempo, yes that's it :)

Btw, the frameskipping trick never worked for me -- sure it's a tad better, but even with a frameskip of 10, the notes are still not timed properly. I'm pretty much certain the issue is not just speed-related.

Reply 12 of 12, by Srecko

User metadata
Rank Member
Rank
Member

It's (IMO) related to dosbox irq event resolution.
In mpu401 data requests are queued and mpu401 calls irq for every one. This, I suppose, can induce delay if game sends data frequently (because between every irq executed, it takes some time (IIRC a millisecond?) waiting for second one in dosbox, so this sums up after a while). On real hardware it is probably a lot faster.
If mpu401 is set to use high timing resolution by game, problem supposedly gets worse.
Maybe mpu401 code could somehow be modified to compensate for those losses (probably not very easy to do).

I don't have real mpu401 device, so I never really noticed this problem with the emulation.