VOGONS

Common searches


DosBox and Roland again...

Topic actions

  • This topic is locked. You cannot reply or edit posts.

Reply 20 of 44, by Qbix

User metadata
Rank DOSBox Author
Rank
DOSBox Author

the gus works fine without the patches.
maybe not with all games. but with enough games.

the mt32 doesn't work without the rom
we could do a replacement rom, but canadacow was never fond of that.
I respect that.

A mt32 is a nice stand alone project. The problem that you can not select that approiate midi driver is of some concern. I have no idea if that is possible for dosbox to select. If not; that's not a problem of dosbox, more a lack on flexibility on your os.

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

Reply 23 of 44, by Exaltor

User metadata

A mt32 is a nice stand alone project. The problem that you can not select that approiate midi driver is of some concern. I have no idea if that is possible for dosbox to select. If not; that's not a problem of dosbox, more a lack on flexibility on your os.

Lack on flexibility of my OS(win32)?, well, i can think that you never used windows before(i will think that), but as far as i know, a LOT of programs can select the midi device(check for example, duke nukem 3d win32 port, you can get the source...). Midi output selection is a problem of dosbox, not a OS problem(when you said that were you on drugs??).

If you (dosbox team) add support to windows users to select midi out device we will be happy, but as i said before, MacOSX users(and any other user of minority OS except linux) will never get mt32 sound until munt author want to do another device driver. Also, if i install Windows 64, running dosbox on that machine sould be easy, but i won't get mt32 sound until munt author port their driver to that OS(and it't not a trivial task, like a simple recompilation).

what i mean is that is better to dosbox to depend less in what other does and do it yourselves.

Reply 26 of 44, by fish

User metadata
Rank Newbie
Rank
Newbie

I mean isn't SDL made to provide some standard among low-level access routines through many OSes?

The post was targeted at "what i mean is that is better to dosbox to depend less in what other does and do it yourselves."

The Sole Survivor.
Find me on efnet #oldgames

Reply 29 of 44, by Srecko

User metadata
Rank Member
Rank
Member

Sorry for a delay, I wasn't around.
Here is what I use now for midi_mt32.h, Im not sure if I changed something since that older version.

/*
* Copyright (C) 2002-2003 The DOSBox Team
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU Library General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
*/

#include "mt32emu.h"
#include "mixer.h"

MT32Emu::Synth *_usesynth;
MixerChannel *mt32chan;

static void MT32_CallBack(Bitu len) {
_usesynth->render((Bit16s *)MixTemp, len);
mt32chan->AddSamples_s16(len,(Bit16s *)MixTemp);
}

static void vdebug(void *data, const char *fmt, va_list list) {
}

static int report(void *userData, MT32Emu::ReportType type, const void *reportData) {
switch(type) {
case MT32Emu::ReportType_errorControlROM:
LOG(LOG_ALL,LOG_ERROR)("MT32: Couldn't find control files");
break;
case MT32Emu::ReportType_errorPCMROM:
LOG(LOG_ALL,LOG_ERROR)("MT32: Couldn't open MT32_PCM.ROM file");
break;
default:
//LOG(LOG_ALL,LOG_NORMAL)("MT32: Report %d",type);
break;
}
return 0;
}


class MidiHandler_mt32: public MidiHandler {
private:
MT32Emu::Synth *_synth;
int _outputRate;
bool isOpen;

public:
MidiHandler_mt32() : isOpen(false),MidiHandler() {};
char * GetName(void) { return "mt32";};
bool Open(const char * conf) {
MT32Emu::SynthProperties tmpProp;
memset(&tmpProp, 0, sizeof(tmpProp));
Show last 42 lines
		tmpProp.sampleRate = 32000;
tmpProp.useDefaultReverb = true;
tmpProp.useReverb = true;
tmpProp.reverbType = 1;
tmpProp.reverbTime = 5;
tmpProp.reverbLevel = 3;
tmpProp.printDebug = &vdebug;
tmpProp.report = &report;
_synth = new MT32Emu::Synth();
if (_synth->open(tmpProp)==0) {
LOG(LOG_ALL,LOG_ERROR)("MT32: Error initialising emulation");
return false;
}
_usesynth=_synth;

mt32chan=MIXER_AddChannel(MT32_CallBack,tmpProp.sampleRate,"MT32");
mt32chan->Enable(false);
return true;
};
void Close(void) {
if (!isOpen) return;
_synth->close();
delete _synth;
_synth = NULL;
isOpen=false;
};
void PlayMsg(Bit8u * msg) {
mt32chan->Enable(true);
_synth->playMsg(*((Bit32u*) msg));
};
void PlaySysex(Bit8u * sysex,Bitu len) {
LOG_MSG("sysex");
if (sysex[0] == 0xf0) {
_synth->playSysex(sysex, len);
} else {
_synth->playSysexWithoutFraming(sysex, len);
}
};
};

MidiHandler_mt32 Midi_mt32;

Here's also a complete source which I compile with vs.net(without project files, though) including latest official munt. Basically only midi.cpp is changed from dosbox files, mt32cvs and freeverb are added to include paths and cpp files added as project files . ROM files should be in dosbox directory when running and midi device set as mt32.

Attachments

  • Filename
    dosboxmunt.rar
    File size
    622.5 KiB
    Downloads
    183 downloads
    File license
    Fair use/fair dealing exception

Reply 30 of 44, by Kaminari

User metadata
Rank Oldbie
Rank
Oldbie
Exaltor wrote:

MacOSX users(and any other user of minority OS except linux) will never get mt32 sound until munt author want to do another device driver

Hey dude, BIG news for you: Munt is open source and mainly developed by an ex-Amiga coder. So go get cracking or find someone to do it for you (I'm sure Richard Bannister wouldn't mind having a look at it). KingGuppy and CanadaCow have been working their asses off to make the softsynth a shared driver precisely to avoid seeing it mangled and brought down-to-date in proprietary projects.

Reply 32 of 44, by Qbix

User metadata
Rank DOSBox Author
Rank
DOSBox Author

if I were to add support for midi selection in win32 ( i browsed through msdn and determined that it's easy to add) what would be the prefered way ?
(it will an option in that config line idea)

do you want to specify the name of the device ? or do you want a device number ?

and should dosbox list the midi devices on startup (so you can get the correct names or device numbers. ?

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

Reply 33 of 44, by mirekluza

User metadata
Rank DOSBox Moderator
Rank
DOSBox Moderator

The device name is more descriptive, but number is shorter.
What about this:
- if it is a number then take it as number
- if it is not number, take it as device name

Listing of MIDI devices is a good idea - it will save some explanation to newbies where to find out what to put there.

Mirek

Reply 34 of 44, by MiniMax

User metadata
Rank Moderator
Rank
Moderator

I don't like an automatic listing. I would rather see something like the mount -cd option which lists device-numbers for use with mount -usecd.

Perhaps the mixer command can be extended to list not only left/right volumes, but also MIDI device names?

DOSBox 60 seconds guide | How to ask questions
_________________
Lenovo M58p | Core 2 Quad Q8400 @ 2.66 GHz | Radeon R7 240 | LG HL-DT-ST DVDRAM GH40N | Fedora 32

Reply 37 of 44, by KingGuppy

User metadata
Rank Member
Rank
Member

I've gone through this thread and made some notes, perhaps they'll clear a few things up:

- There's nothing illegal about Munt - I don't think this is an issue for anyone.

- I personally have no objection to Munt being directly supported by DOSBox. I have no objection to it not being supported, either.

- I don't have access to operating systems other than Windows and Linux, so I won't personally be able to write a driver for those. Unless someone contributes drivers, those users won't be able to use the MT-32 emulator with DOSBox unless it's integrated.

- The Munt code is very modular; the core is now a static link library which should be extremely portable and easy to integrate. The library basically just has functions for sending MIDI data and retrieving samples - it's very easy to plug into whatever sound environment is available.

- The code in ScummVM is (aside from a few file name changes) identical to that in Munt. I'm a developer on ScummVM, so I maintain both versions. I would prefer for ScummVM to use the link library (a fairly trivial change), but this way is more convenient for people compiling their own version of ScummVM, and not much effort for me to keep it in sync. I'd prefer that Munt source isn't directly included in DOSBox in this way, since I'm unable to maintain it. However, it should be considered that the API is likely to change as the library is still alpha. Optionally linking with the mt32emu link lib and directing users to a specific release would - in my opinion - be best.

- It is a pain to change the default MIDI output device in Windows, and it would be great to see DOSBox providing a method for choosing a specific device to use whether Munt is integrated or not. I have nothing useful to say about how the device should best be specified, sorry.

Reply 38 of 44, by gulikoza

User metadata
Rank Oldbie
Rank
Oldbie

@Exaltor: No I can't get it to work. I even tried compiling with VS.NET (although I must say MinGW is easier to configure, not to mention it's free 😜). It always crashes when I start a mt32 game. Perhaps I should test this with working Munt as midi device to see if it works at all...

As for selecting midi device...I would rather not complicate much. There's no default tool in Windows to show you midi device number so many users will probably be confused what to enter. So far there hasn't (?) been any request for selecting a midi device (except for mt32), I think most people just use the default. A simple selection in the conf file - use default or mt32 if detected would probably be enough. Although...advanced configuration could probably come in handy sometimes 😀

Reply 39 of 44, by Exaltor

User metadata

I agree with KingGuppy. it seems that Dosbox team don't like too much mt32 integration, but as you don't need to change too much in you code, i think that if you add an option at compile time to link with munt library if it's available should be great, so any user of any OS that dosbox is ported to would be happy.

Also selection of midi device in win32 is nice, not only if you don't want to integrate mt32 into dosbox, so at least we can(win32 users) load different soundfonts in diferent devices(my SB has 2 independent devices) and i can shoose for each game wich device to play the midi with.