I frequently use the Roland MT-32 emulator, MUNT, with Scummvm (it's built into the latest versions) and it works great. Occasionally however, I find myself wanting to play a game that is not currently supported by Scummvm, such as MicroProse's Sword of the Samurai or the Sierra/Dynamix games Heart of China and Rise of the Dragon.
Currently, the best way to play these games under Linux is with a combination of dosbox and MUNT. There are a lot of tutorials out there that show you how to setup dosbox and MUNT, but not many at all that are SPECIFIC TO LINUX. With that in mind, let us begin.
The dosbox / MUNT combo will require a fairly fast computer in order for it to work well. Emulation of any kind is very CPU intensive (this is why Scummvm works so well, as it's not actually an emulator but rather a straight interpreter). Dosbox is a DOS machine emulator that can tax a machine to a degree and when you throw a second emulator into the mix (the MT-32 emulator) things can get bogged down fairly quickly.
This tutorial assumes that you are running a Linux system know how to edit text files as well as how to compile and install software on your Linux system. I use Slackware and as such I compile most things. Under Ubuntu, Fedora or Debian, I'm sure that there are packages already made, but I don't know anything about them.
Make sure that all of the following apps/files are present on your system.
Two more issues to check.
In order to use MUNT you must have copies of both the PCM ROM and the Control ROM from either a Roland MT-32 or a CM-32L. These ROM files should be named either MT32_PCM.ROM and MT32_Control.ROM or CM32L_PCM.ROM and CM32L_Control.ROM and they should both be placed in the /usr/share/mt32-rom-data directory (this is where MUNT will look by default).
Many people do not know this, but MUNT can emulate the Roland CM-32L as well as the MT-32. If you have ROM files from both the MT-32 and the CM-32L, then MUNT will default to emulating the CM-32L. If you read my page describing the differences between the MT-32 and CM-32L, you will know that this is a good thing.
Make sure that the /usr/share/mt32-rom-data dir is writable by the user who will be running MUNT. When MUNT is run for the first time, it will try and create a waveform cache file (usually called waveformcache-44100-440.00.raw or similar) in that directory. If it cannot write to the dir, it will have to regenerate this cache in memory each time it is run. That is not a show stopper, but it will slow down the initialization process. For performance reasons explained in the next section, the developers recommend that you run MUNT as the root user anyway.
FYI: The version of MUNT that is built into Scummvm seems to want to create this waveform cache in your home directory. The stand alone version of MUNT tries to create this file in /usr/share/mt32-rom-data.
Once the correct ROM files are in place, start up MUNT by opening up a terminal window and running either mt32d or xmt32. These are both the same app, but the xmt32 version will give you a graphical representation of the MT-32's LCD screen and buttons for a few controls such as Reset and Clear. Some games (in particular the Sierra adventure games) were designed to display messages on the MT-32's LCD screen so this can be a fun option.
The MUNT developers recommend that you run these commands as root. Doing so will allow MUNT to use real time scheduling which can help to some extent if your system is struggling to keep up with both the dosbox and MT-32 emulation.
Once MUNT is up and running, you will need to configure dosbox to use MUNT for MIDI. As with any other dosbox configurations, you will accomplish this by editing the dosbox.conf file. This file is usually located in the .dosbox dir within your home directory. On later versions of dosbox, this file is actually named something like dosbox-0.73.conf, where 0.73 will be replaced with whatever your dosbox version happens to be.
Once you have the dosbox configuration file open, you need to check for two things. First, search for the line that says “mpu401=” and make sure that it is set to “intelligent”. Most games supporting the MT-32 require an MPU-401 to be running in intelligent mode. This is the default for dosbox now days, but it never hurts to double check.
This next part is critical. Move down two lines to the option labeled “midiconfig=” and set it to equal “128:0”. The 128 is the ALSA client number and the 0 is the port number for that client.
Save your dosbox config file and exit your text editor. You are now ready to run dosbox.
Depending on your setup, the ALSA client and port numbers maybe different, but unless you have another software synth running (which is NOT recommended) it will be 128:0.
You can check MUNT's ALSA client and port numbers by running one of the following two command while MUNT is running:
$ aconnect -o (that's a lowercase letter "o" not a zero)
$ cat /proc/asound/seq/clients
Somewhere in the output you should see something that looks like this:
Client 128 : "MT-32" [User] Port 0 : "Standard" (-We-) Port 1 : "GM Emulation" (-We-)
We see that MUNT (labeled here as “MT-32”) is registered as client number 128 and it has two ports open, port 0 and port 1.
For true MT-32 emulation, always use port 0. Port 1 is only used when you want MUNT to try and translate General MIDI data to MT-32 data. This GM to MT-32 option is experimental and not something you would generally want to do anyway. If your game was designed for General MIDI it will sound better with real General MIDI. For GM games stay away from MUNT and use something like Timidity++ along with a high quality General MIDI soundfont such as 8MBGMSFX.SF2 or FluidR3_GM.SF2.
When running MUNT please make sure that no other software synth (such as Timidity) is running at the same time. Technically it would be possible to run MUNT along side another soft synth, but this would likely strain your systems resources and complicate setup. Besides, dosbox (and your game) will only use one or the other so there is no reason to try and run two synths simultaneously.
Back in the DOS days, games could not automatically detect the presence of an MT-32. You had to explicitly tell the game that an MT-32 was present and that you wanted to use it. Obviously different games had different ways to accomplish this, but it usually involved running something along the lines of SETUP.EXE, INSTALL.BAT or SETSOUND.COM and choosing the MT-32 from among the various options.
In this example I am going to use Sierra's Space Quest III : The Pirates of Pestulon, (a game that made excellent use of the MT-32s features).