joncampbell123 / dosbox-x

DOSBox-X fork of the DOSBox project
GNU General Public License v2.0
2.81k stars 383 forks source link

Mt-32 Emulation not working in ARM64/Mac version #2056

Open Skaggynuts opened 3 years ago

Skaggynuts commented 3 years ago

I think I've exhausted all my options, I cannot for the life of me get MT-32 emulation to work in the new ARM version of Dosbox for Mac. I can get it to work just fine in the Windows version, plop the rom files into the Dosbox directory, change the config and go, it sounds great. On the mac version though I've tried every combination I can think of to point the config to the directory of the rom files but it always just uses the General MIDI/Sound blaster and sounds terrible (Sounds the same if I delete the rom files on the Windows version.) The rom files are located on my computer at /Macintosh HD/Users/Skaggy/rom/

In the Dosbox config I've tried many variants to point to that directory: ~/rom /users/Skaggy/rom /Machintosh HD/Users/Skaggy/rom

I've put them in the same directory as the config file and left it blank, I've added " marks around the file path. Nothing. Am I doing something wrong or have I stumbled upon a bug?

Update: I even stuck the rom files on an external drive thinking it might be a permissions thing. /Volumes/Ruu. So in the config I made the mt32.romdir = /Volumes/Ruu and still nothing, still defaulting to coreaudio like it cannot find the roms.

Wengier commented 3 years ago

Not yet having a ARM Mac to test the ARM-based Mac package, but for the Intel-based Mac package, if I put the MT32_CONTROL.ROM and MT32_PCM.ROM files in the DOSBox-X program directory, and set mididevice=mt32 and mt32.romdir=., then MT32 is indeed enabled (check "Sound" => "Show MIDI device configuration" for verification). Maybe you can try this?

Skaggynuts commented 3 years ago

Thanks for the idea. I thought I was going crazy, I downloaded the Intel version and the Mt32 emulation works with the exact same config, I think the Arm version just can't find/access the ROM files.

Skaggynuts commented 3 years ago

Figured out the Logs, Hopefully its helpful.

Log from Arm version: LOG: MIDI:Cannot find device:mt32. Finding default handler. LOG: Error loading CoreAudio SoundFont 2 LOG: MIDI:Opened device:coremidi LOG: One joystick reported, initializing with 4axis

Log from Intel version: LOG: MIDI:Opened device:mt32 LOG: One joystick reported, initializing with 4axis

rwl4 commented 3 years ago

I can confirm what what @Skaggynuts mentioned above. It's not working on my M1 either while it works perfectly if I use the Intel binary.

Apple Silicon version:


LOG: MIDI:Cannot find device:mt32. Finding default handler.
LOG: Error loading CoreAudio SoundFont 2
LOG: MIDI:Opened device:coremidi
LOG: Pentium CMPXCHG8B emulation is enabled
LOG: VOODOO LFB now at d0000000
LOG: Parallel1: BASE 378h
LOG: MPU-401 Registering I/O ports as if IBM PC MPU-401 at base 330h```
Wengier commented 3 years ago

I have taken a look at the configure. ac file, and it does appear that the MT32 feature is currently compiled for x86/x86_64 builds only:

https://github.com/joncampbell123/dosbox-x/blob/master/configure.ac#L744

As I don't have an ARM Mac myself yet, I cannot really tell if this is a necessary requirement. You can try to modify this file (removing this requirement) and then compile the code in your M1 Mac yourself and see if it works.

Skaggynuts commented 3 years ago

As I don't have an ARM Mac myself yet, I cannot really tell if this is a necessary requirement. You can try to modify this file (removing this requirement) and then compile the code in your M1 Mac yourself and see if it works.

I've love to take a stab at it, Can anyone give me a crash corse on how to do that? My programming experience is very limited.

Wengier commented 3 years ago

@Skaggynuts On your ARM Mac, try change line 760 and 761 of the file configure.ac from:

enable_mt32=no
AC_MSG_RESULT(no)

To:

AC_MSG_RESULT(yes)
AC_DEFINE(C_MT32,1)

Rebuild the code and see how it works.

rglidden commented 3 years ago

I just tried what @Wengier suggested with the current code in master and forcing the MT-32 emulation to build on an ARM/M1 Mac seems to work fine. I've done very limited testing so I'm not sure if there are any issues, but I'm able to enable the MT-32 emulation and testing it with a few games the results sound correct so far.