I thought this may be something cool, if not kind of pointless. Anyways the MPU401 UART can be run like a traditional serial port with an IRQ, in intelligent mode, or just as a ‘dumb’ device you can just bit bang to talk to MIDI devices. So while playing with DOSBox I thought it’d be fun to take it’s emulation and plug it into Qemu.
And this is the end result.
It’s far from perfect, when it works it does tend to work well, although it fails to work with things like Return to Zork, but it does work with DMX’s sound code in DooM and the MPU401 driver for Windows 3.1
While doing this I was originally struggling with mapping the IO ports. Qemu has some functions to map in the memory model to assign a function that will trap read/write space. In this case base is 0x330 the base of the MPU401 device.
I was thinking that the port 0x331 needed to be mapped in the same way, but it turns out after looking through more of the source, it’s actually a word aligned access. So in that case you can use a switch to see which port is actually being accessed.
As annoying as it is that Windows 10 won’t drive my el-cheapo USB-MIDI interface adapter, I have to say that even loading Windows XP into VMWare Player, and then loading DOSBox is a pleasant enough experience when connecting to the Roland.
Pluses include the built in power supply, RCA jacks, and of course it just sounds snappier compared to the Yamaha MU-80.
I’ll have to capture samples from both, to compare and contrast.
I have to say that for a mere 2,400 Yen I’m really enjoying this fine piece of hardware!
As you can see it clearly can see the USB device, but when it opens the device it fails. And yes I’ve tried Administrator. And for the hell of it, I fire up Windows XP on VMWare, connect the USB dongal, and amazingly:
MIDI:win32 selected USB Audio Device
MIDI:win32 selected USB Audio Device 
MIDI:win32 selected Microsoft GS Wavetable SW Synth
Yes, I can open the out port just fine. So now I run a virtualizer to run my emulator to drive a physical peripheral… Ugh. Has MIDI been this messed up all along and I never noticed?
Oh yeah, the GS Wavetable Synth works fine, as did MUNT before I uninstalled it, thinking it was somehow interfering with anything.
I know I’m using this fine device, the QinHeng USB MIDI adapter, which apparently is notorious crap, but my recently acquired Yamaha MU 80, works fine with it on Windows XP.
What do you mean, giving up? Well I’ve been trying to buy one, and I’ve lost every auction. So I figured I’d check up the emulation scene and see what is up. Then I heard this video:
And this one.
Or at least to my ears, MUNT, sounds the same as the real thing!
So, how to use the thing? Well in Windows Vista onward (8/8.1/10..) Microsoft decided to hide the MIDI selection tools, making this a mission to see what mapper you are using. But using DOSBox it’s easy to see which is which. In DOSBox run: