dosbox-pure icon indicating copy to clipboard operation
dosbox-pure copied to clipboard

DOSBox Pure Core in Retroarch produces Roland MPU-401 error.

Open SiriusVI87 opened this issue 11 months ago • 10 comments
trafficstars

Hey everyone,

I was trying to Launch Alice's Adventures in Wonderland with DOSBox Pure in Retroarch. I am using the dosbox.conf file to launch the game via Launchbox. Everything seems to work fine, including the audio. However, I get this MPU-401 driver error in the beginning. If I just hit OK, I can hear the audio playing, so I don't know what this error means.

Can anyone tell me what I have to do to get rid of it? The error does not appear if I use the eXoWin3x version of the game, however, I'd like to use overlays, shaders and save states, that's why I want to use the DOSXBox Pure Retroarch Core.

image

SiriusVI87 avatar Dec 20 '24 11:12 SiriusVI87

This error does not appear if I use the regular DOSBox core in Retroarch. Does DosBox Pure have to be set up differently so the MPU Driver works correctly?

SiriusVI87 avatar Dec 22 '24 21:12 SiriusVI87

You have to enable MIDI output in the Audio -> MIDI Output setting, otherwise the MPU401 device is disabled.

schellingb avatar Dec 22 '24 23:12 schellingb

I have set Midi Output to "Roland SC-55". I have also tried various other settings, such as MT-32. But I still always get this error.

SiriusVI87 avatar Dec 22 '24 23:12 SiriusVI87

You have to enable MIDI output in the Audio -> MIDI Output setting, otherwise the MPU401 device is disabled.

By the way, this here is the .conf file I'm using to load the game in DOSBox Pure. It was taken from the ~~admin edit: piracy reference~~ collection. Maybe there is something I need to change in the .conf file for it to work?

And just to be clear, the game does run with this .conf file in DosBox Pure, and there is even (some) audio when in game (though during the intro screen there is no audio when there should be). It's just that this error appears every time the gameis launched and there is some audio missing.

And again, this same .conf file works without the error when using the regular dosbox core in retroarch. Any idea what could be wrong here?

(Sorry, couldn't attatch the file, so here are its contents:)

[sdl] fullscreen=false fulldouble=false fullresolution=0x0 windowresolution=640x480 output=openglnb autolock=true sensitivity=100 waitonerror=true priority=higher,normal mapperfile=mapper-0.74.map usescancodes=true [dosbox] language= machine=svga_s3 captures=capture memsize=63 [render] frameskip=0 aspect=true scaler=normal2x [cpu] core=auto cputype=auto cycles=55000 cycleup=10 cycledown=20 [mixer] nosound=false rate=44100 blocksize=1024 prebuffer=20 [midi] mpu401=intelligent mididevice=default midiconfig= [sblaster] sbtype=sb16 sbbase=220 irq=7 dma=1 hdma=5 sbmixer=true oplmode=auto oplemu=default oplrate=44100 [gus] gus=false gusrate=44100 gusbase=240 gusirq=5 gusdma=3 ultradir=C:\ULTRASND [speaker] pcspeaker=true pcrate=44100 tandy=auto tandyrate=44100 disney=true [joystick] joysticktype=auto timed=true autofire=false swap34=false buttonwrap=false [serial] serial1=dummy serial2=dummy serial3=disabled serial4=disabled [dos] xms=true ems=true umb=true keyboardlayout=auto [ipx] ipx=false [autoexec] mount c .\Win3x\AAiW imgmount d ".\Win3x\AAiW\cd\ALICE.cue" -t cdrom d: path=C:;z:;c:\windows\ @cls @win runexit alice exit

SiriusVI87 avatar Dec 23 '24 14:12 SiriusVI87

Ah, you're using a .conf file. Notice how your .conf file sets the midiconfig option of the [midi] section to an empty value. The settings in the .conf file take precedence over the core options. You have to do one of these:

  • Remove the line midiconfig= from the .conf file to use the core option
  • Change it to something like midiconfig=X:\path\to\MySoundFont.sf2 to fix playback with a .SF2 SoundFont
  • Change it to something like midiconfig=X:\path\to\SomeMT32_Control.rom to force using MT32 emulation with the given ROM

schellingb avatar Dec 23 '24 15:12 schellingb

Ah, you're using a .conf file. Notice how your .conf file sets the midiconfig option of the [midi] section to an empty value. The settings in the .conf file take precedence over the core options. You have to do one of these:

  • Remove the line midiconfig= from the .conf file to use the core option
  • Change it to something like midiconfig=X:\path\to\MySoundFont.sf2 to fix playback with a .SF2 SoundFont
  • Change it to something like midiconfig=X:\path\to\SomeMT32_Control.rom to force using MT32 emulation with the given ROM

Hey thx, I will try that for sure and report back.

I'm guessing that the reason why regular the dosbox core does not give this error is that it handles the empty value of the "midiconfig" differently? It probably reads an empty value the same ways as if the whole line "midiconfig" wasn't there, correct?

SiriusVI87 avatar Dec 23 '24 16:12 SiriusVI87

I don't know how the other cores work... I assume they fully ignore the .conf setting of the [midi] section and only use the core option. If an empty midiconfig is somehow very common, we could add special handling to ignore such a line in the .conf file. But as of now it works like described above. Hopefully you get it working!

schellingb avatar Dec 23 '24 16:12 schellingb

I don't know how the other cores work... I assume they fully ignore the .conf setting of the [midi] section and only use the core option. If an empty midiconfig is somehow very common, we could add special handling to ignore such a line in the .conf file. But as of now it works like described above. Hopefully you get it working!

I made a quick check of all the .conf files in the ~~admin edit: piracy reference~~ collection. As far as I can tell, the "midiconfig" line is always empty. So your suggestion of having dosbox pure ignore this line if it is empty, could be a good idea.

For further information, I was able to distinguish three different types of .conf fies in ~~admin edit: piracy reference~~'s collection that may be of interest to you.

  1. case looks like my example above:

[midi] mpu401=intelligent mididevice=default midiconfig=

  1. case has some lines added, but the midiconfig line is still empty:

[midi] mpu401 = intelligent mididevice = fluidsynth midiconfig = fluid.driver = default fluid.soundfont = .\mt32\SoundCanvas.sf2 fluid.samplerate = 48000 fluid.gain = .2 fluid.polyphony = 256 fluid.cores = default fluid.periods = 8 fluid.periodsize = 512 fluid.reverb = yes fluid.chorus = yes fluid.reverb,roomsize = .61 fluid.reverb.damping = .23 fluid.reverb.width = .76 fluid.reverb.level = .57 fluid.chorus.number = 3 fluid.chorus.level = 1.2 fluid.chorus.speed = .3 fluid.chorus.depth = 8.0 fluid.chorus.type = 0 mt32.romdir = .\mt32 mt32.reverse.stereo = false mt32.verbose = false mt32.thread = false mt32.chunk = 16 mt32.prebuffer = 32 mt32.partials = 32 mt32.dac = 0 mt32.analog = 2 mt32.output.gain = 100 mt32.reverb.mode = auto mt32.reverb.output.gain = 100 mt32.reverb.time = 5 mt32.reverb.level = 3 mt32.rate = 44100 mt32.src.quality = 2 mt32.niceampramp = true

  1. case may look like case 1 or 2, but ~~admin edit: piracy reference~~ adds the following piece of information regarding the midiconfig line (so in this case, DosBox pure should not totally disregard the midiconfig line, just if it's left empty):

           midiconfig: Special configuration options for the device driver. This is usually the id or part of the name of the device you want to use (find the id/name with mixer/listmidi).
                         Or in the case of coreaudio, you can specify a soundfont here.
                         When using a Roland MT-32 rev. 0 as midi output device, some games may require a delay in order to prevent 'buffer overflow' issues.
                         In that case, add 'delaysysex', for example: midiconfig=2 delaysysex
    

Hope you can use this information. I will try and report back if the error disappears if I delete the midiconfig line, so we can know for sure that this is the issue here.

SiriusVI87 avatar Dec 23 '24 17:12 SiriusVI87

Ah, you're using a .conf file. Notice how your .conf file sets the midiconfig option of the [midi] section to an empty value. The settings in the .conf file take precedence over the core options. You have to do one of these:

  • Remove the line midiconfig= from the .conf file to use the core option
  • Change it to something like midiconfig=X:\path\to\MySoundFont.sf2 to fix playback with a .SF2 SoundFont
  • Change it to something like midiconfig=X:\path\to\SomeMT32_Control.rom to force using MT32 emulation with the given ROM

Hey quick addendum to my previous post: I just wanted to confirm that deleting the midiconfig line works. The error is gone and sound works like it's supposed to. the section of the config looks like this now:

[mixer] nosound=false rate=44100 blocksize=1024 prebuffer=20 [midi] mpu401=intelligent mididevice=default [sblaster]

Now, what would be really great is if DosBox Pure could be updated to ignore the "midiconfig= " line, if nothing comes after the "=". That would save me from editing all the .conf files.

PS: Sorry, I accidentally closed this issue and had to reopen it.

SiriusVI87 avatar Dec 23 '24 20:12 SiriusVI87

Update:

For now I have replaced all the .conf files with edited ones in which the "midiconfig=" lines are deleted. Everything is working fine with this workaround.

IMPORTANT UPDATE: the new "DOSBox Pure 1.0 Preview 1" version breaks everything for me. None of my games work anymore. I have created a separate issue for this.

SiriusVI87 avatar Dec 27 '24 15:12 SiriusVI87