VOGONS


Munt Reloaded - Development

Topic actions

Reply 160 of 965, by OmerMor

User metadata
Rank Newbie
Rank
Newbie

This is really "Undefined" external error Do you have working mt32app on your system? You said you have installed MIDI yoke...

Actually, I made a mistake - I have installed Putzlowitsch's Vista MIDI Mapper, not MIDI yoke (which is XP only). You can get it from http://www.sierrahelp.com/Utilities/SoundUtil … IDI_Mapper.html.

The mt32app is not working on both my systems.
When I run it get the following error:

Failed to open midi input device

When I try to apply anything I get:

Failed to Reset MidiIn port

Reply 161 of 965, by sergm

User metadata
Rank Oldbie
Rank
Oldbie
OmerMor wrote:

Actually, I made a mistake - I have installed Putzlowitsch's Vista MIDI Mapper, not MIDI yoke (which is XP only).

AFAIK, MIDI Yoke works fine on Windows 7. And even on x64 if I got Varka's previous post right. There is a minor problem with old-format .INF file but it easily can be solved.

You've got right diagnostic. mt32emu.exe is intended to work with MIDI In (MIDI Yoke) port which you haven't installed on your system.

I've no idea about why the driver isn't working 🙁 Just tested it with a fresh WinXP install. Works flawlessly...

Try to get to the driver's control panel. If you can't, the driver isn't loaded at all and you need to look at the diagnostics.

UPD:
Check in the registry the following value:

[HKEY_CLASSES_ROOT\CLSID\{7C9E7084-9B27-4D50-8A8C-0BFC94EC51D5}\InprocServer32]
@="mt32emu.dll"

If there is no such class, the driver will never produce any sound

Reply 162 of 965, by Gez

User metadata
Rank Newbie
Rank
Newbie
sergm wrote:
collector wrote:

Any chance for a 64-bit Vista/Win7 driver?

I don't think so. As M$ don't plan to support DirectMusic further, there are no chances of signing the driver compiled for x64. AFAIK, a driver without a WHQL sign cannot be installed on x64 win 🙁

I don't know how helpful it would be, but this MIDI driver works on 64-bit Win Vista/7. The driver code itself is apparently derived from this.

Reply 163 of 965, by sergm

User metadata
Rank Oldbie
Rank
Oldbie

Thanks, Gez! You found another 2 Win32-only drivers and help me to be convinced that there is no x64 unsigned driver exists 😀

I know that win32 drivers work with win32 apps in WOW64. But not with x64 native apps. Though I don't know those apps... I doubt DOSBox needs to be compiled as x64 native app as well.

I'll try to figure out what's the problem with mt32emu_drv in several hours as I get to the Windows 7 x64 install 😀

Reply 164 of 965, by sergm

User metadata
Rank Oldbie
Rank
Oldbie

I've made some cleanup on Ykhwong's version of mt-32 patch for DOSBox. My version of the patch features:

- a lot simpler integration into the DOSBox project
- uses static library libmt32emu
- uses mt32 as the default MIDI device
- sets sample rate to 32000 if mt32rate not set
- doesn't hangup when you switch MIDI devices
- eats the same amount of CPU as Ykhwong's patch for now, which is significantly more then the standalone driver / mt32emu.exe does.

Attachments

Reply 165 of 965, by Dominus

User metadata
Rank DOSBox Moderator
Rank
DOSBox Moderator

I'll give it a try on os x

Windows 3.1x guide for DOSBox
60 seconds guide to DOSBox
DOSBox SVN snapshot for macOS (10.4-11.x ppc/intel 32/64bit) notarized for gatekeeper

Reply 166 of 965, by sergm

User metadata
Rank Oldbie
Rank
Oldbie

Windows 7 Ult x64 test report:
1. MIDI driver mt32emu can't be installed due to incompatible .INF format.
2. DOSBox 0.74 with a patch works fine (of course)
3. MIDI Yoke can't be installed using .INF as well. Although, .msi installer works fine (UAC is a problem though).
4. While using mt32emu.exe there was a problem with opening ROM files from systemroot path %) After changing the pathToROMfiles to "./" it works fine.
5. With MIDI Yoke and mt32emu Windows Media Player (though 32-bit version) plays mt-32 tunes just fine
6. mt32emu_display works fine as well... 😀

Conclusion:
I don't think we need to apply an extra effort to making x64 MIDI driver. I'll better make a cross-platform solution which makes possible to use mt32emu with Mac OS X as well 😀

Reply 167 of 965, by collector

User metadata
Rank l33t
Rank
l33t

Could the inf install be bypassed and the driver installed manually, i.e. copying files where they need to go, making the needed registry entries, etc.?

The Sierra Help Pages -- New Sierra Game Installers -- Sierra Game Patches -- New Non-Sierra Game Installers

Reply 168 of 965, by Myloch

User metadata
Rank Oldbie
Rank
Oldbie
sergm wrote:

I've made some cleanup on Ykhwong's version of mt-32 patch for DOSBox.

Is the dosbox mt32 patch on par with the recent munt updates (like the wing commander correct sounds) or is it based on an older version?

Reply 169 of 965, by ykhwong

User metadata
Rank Oldbie
Rank
Oldbie
Myloch wrote:

Is the dosbox mt32 patch on par with the recent munt updates (like the wing commander correct sounds) or is it based on an older version?

sergm's patch does not include any recent munt updates but it relies on the external libmunt. With the help of dynamic linking, DOSBox may require something like mt32emu.dll which you can replace with another version of munt library. Of course, the library can be integrated into DOSBox if static linking is used.

sergm wrote:

I don't think we need to apply an extra effort to making x64 MIDI driver. I'll better make a cross-platform solution which makes possible to use mt32emu with Mac OS X as well

I am looking foward to this solution if it gives the same benefit as MIDI driver does.

sergm wrote:

I doubt DOSBox needs to be compiled as x64 native app as well.

There have been lots of discussions about the development of 64bit of DOSBox, but I heard that there would be not that much performance improvement especially on dynamic core. Also inline stuffs cannot be used in codebase. There may be some other considerations when compiling 64bit native applications. Anyway, with the help of WOW64, 32bit version of DOSBox works fine with long mode. 😀

Reply 170 of 965, by KingGuppy

User metadata
Rank Member
Rank
Member
ykhwong wrote:
Myloch wrote:

Is the dosbox mt32 patch on par with the recent munt updates (like the wing commander correct sounds) or is it based on an older version?

sergm's patch does not include any recent munt updates but it relies on the external libmunt. With the help of dynamic linking, DOSBox may require something like mt32emu.dll which you can replace with another version of munt library. Of course, the library can be integrated into DOSBox if static linking is used.

Btw, libmt32emu isn't intended to be used as a dynamic link library (and the build system has never supported this), at least until the API is finalised. Any mt32emu.dll you see floating around is probably the Win32 MIDI driver.

Speaking of drivers, as SergM mentioned, I've been wanting to switch to (1) a Qt GUI and (2) RTP-MIDI (probably with the proprietary-but-well-known Apple session protocols) for quite some time. This will result in a unified, cross-platform application that will obsolete the display app (which was never officially released), the Win32 driver and the ALSA driver. For Windows, the best RTP-MIDI driver I've come across is here: http://www.tobias-erichsen.de/rtpMIDI.html. It's a kernel driver, so it doesn't use the long-deprecated DirectMusic API, and it supports 64-bit. For ALSA it looks like we might have to make our own RTP-MIDI driver. For Mac OS X, it's built into the system.

Reply 171 of 965, by wd

User metadata
Rank DOSBox Author
Rank
DOSBox Author

but I heard that there would be not that much performance improvement especially on dynamic core.

That's wrong, x64-only dosbox will be slower because x64-to-x86 is slower
than the much more optimizable x86-to-x86 recompiler.
x64 native compilation is only of interest it 32bit libraries are not available
(special linux setups).

Reply 172 of 965, by sergm

User metadata
Rank Oldbie
Rank
Oldbie
collector wrote:

Could the inf install be bypassed and the driver installed manually, i.e. copying files where they need to go, making the needed registry entries, etc.?

Yes. I wasn't able to workout the .INF install since MEDIA class registration fails on x64 even after I modified .INF for NTamd64 🙁
But the install process is fairly simple though. AFAIK, MIDI Yoke installer use the similar approach, i.e. direct registry hack.
I've managed the driver to work by doing the following:

1. Copy mt32emu.dll, *.ROM, SDL.DLL, SDL_net.DLL to %systemroot%\system32
2. Add to the
[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Drivers32]
MIDI#=mt32emu.dll
where # is an available number in range 1..9
After this step the driver appears in MIDI mapper list
3. Register DMusic server running
rundll32 mt32emu.dll,DllRegisterServer

That's all. Now, any win32 app can play MT-32 tune fine.

Reply 173 of 965, by ykhwong

User metadata
Rank Oldbie
Rank
Oldbie
KingGuppy wrote:

Btw, libmt32emu isn't intended to be used as a dynamic link library (and the build system has never supported this), at least until the API is finalised. Any mt32emu.dll you see floating around is probably the Win32 MIDI driver.

Oops, sorry, I was probably confused it with other types of libraries that support dynamic linking. I didn't take a look that much at the munt setup. However, as I mentioned before, I prefer to implement it directly into DOSBox source for convenience.

wd wrote:
That's wrong, x64-only dosbox will be slower because x64-to-x86 is slower than the much more optimizable x86-to-x86 recompiler. […]
Show full quote

That's wrong, x64-only dosbox will be slower because x64-to-x86 is slower
than the much more optimizable x86-to-x86 recompiler.
x64 native compilation is only of interest it 32bit libraries are not available
(special linux setups).

Yes, I wanted to say what you are talking about as for linux case. I meant users would not be able to get the performance benefit from dynamic core in 64bit native compilation when compared to 32bit.

Reply 174 of 965, by gulikoza

User metadata
Rank Oldbie
Rank
Oldbie
            tmpProp.sampleRate = section->Get_int("rate");
if(tmpProp.sampleRate <= 44100) tmpProp.sampleRate = 32000;
else if(tmpProp.sampleRate <= 22050) tmpProp.sampleRate = 16000;
else tmpProp.sampleRate = 32000;

Shouldn't these conditions be reversed?

http://www.si-gamer.net/gulikoza

Reply 175 of 965, by sergm

User metadata
Rank Oldbie
Rank
Oldbie
gulikoza wrote:
Shouldn't these conditions be reversed? […]
Show full quote
            tmpProp.sampleRate = section->Get_int("rate");
if(tmpProp.sampleRate <= 44100) tmpProp.sampleRate = 32000;
else if(tmpProp.sampleRate <= 22050) tmpProp.sampleRate = 16000;
else tmpProp.sampleRate = 32000;

Shouldn't these conditions be reversed?

IMHO, these conditions must look like

tmpProp.sampleRate = 32000;

😀

Thanks, updated the DOSBox patch...

Attachments

Reply 176 of 965, by collector

User metadata
Rank l33t
Rank
l33t
sergm wrote:
Yes. I wasn't able to workout the .INF install since MEDIA class registration fails on x64 even after I modified .INF for NTamd6 […]
Show full quote
collector wrote:

Could the inf install be bypassed and the driver installed manually, i.e. copying files where they need to go, making the needed registry entries, etc.?

Yes. I wasn't able to workout the .INF install since MEDIA class registration fails on x64 even after I modified .INF for NTamd64 🙁
But the install process is fairly simple though. AFAIK, MIDI Yoke installer use the similar approach, i.e. direct registry hack.
I've managed the driver to work by doing the following:

1. Copy mt32emu.dll, *.ROM, SDL.DLL, SDL_net.DLL to %systemroot%\system32
2. Add to the
[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Drivers32]
MIDI#=mt32emu.dll
where # is an available number in range 1..9
After this step the driver appears in MIDI mapper list
3. Register DMusic server running
rundll32 mt32emu.dll,DllRegisterServer

That's all. Now, any win32 app can play MT-32 tune fine.

On 64-bit systems the key should be [HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\Microsoft\Windows NT\CurrentVersion\Drivers32]

I wrote an NSIS script to do this. It will copy all of the required files to their proper locations, make the registry entry above and register the DLL. It does not include the ROMs, but if they are present in the same folder as the installer, it will copy them to the System32 folder. It does make the driver usable in 64-bit Windows. I might have it also include Putzlowitsch's Vista-MIDI on Vista and Win7. If anyone is interested in I can post the installer here.

Reply 177 of 965, by sergm

User metadata
Rank Oldbie
Rank
Oldbie
collector wrote:
sergm wrote:
Yes. I wasn't able to workout the .INF install since MEDIA class registration fails on x64 even after I modified .INF for NTamd6 […]
Show full quote
collector wrote:

Could the inf install be bypassed and the driver installed manually, i.e. copying files where they need to go, making the needed registry entries, etc.?

Yes. I wasn't able to workout the .INF install since MEDIA class registration fails on x64 even after I modified .INF for NTamd64 🙁
But the install process is fairly simple though. AFAIK, MIDI Yoke installer use the similar approach, i.e. direct registry hack.
I've managed the driver to work by doing the following:

1. Copy mt32emu.dll, *.ROM, SDL.DLL, SDL_net.DLL to %systemroot%\system32
2. Add to the
[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Drivers32]
MIDI#=mt32emu.dll
where # is an available number in range 1..9
After this step the driver appears in MIDI mapper list
3. Register DMusic server running
rundll32 mt32emu.dll,DllRegisterServer

That's all. Now, any win32 app can play MT-32 tune fine.

On 64-bit systems the key should be [HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\Microsoft\Windows NT\CurrentVersion\Drivers32]

I wrote an NSIS script to do this. It will copy all of the required files to their proper locations, make the registry entry above and register the DLL. It does not include the ROMs, but if they are present in the same folder as the installer, it will copy them to the System32 folder. It does make the driver usable in 64-bit Windows. I might have it also include Putzlowitsch's Vista-MIDI on Vista and Win7. If anyone is interested in I can post the installer here.

This is great, collector!

The driver install should of course be automated like that 😀
Although, KingGuppy and I think it will be abandoned soon...

Reply 178 of 965, by collector

User metadata
Rank l33t
Rank
l33t

I realize, but for the time being the installer can make the Mute driver available for 64-bit Windows users.

The Sierra Help Pages -- New Sierra Game Installers -- Sierra Game Patches -- New Non-Sierra Game Installers