today, by pure chance, looking at an unrelated topic, I found out that 2013, MAME not only made dump of the Original Roland MPU-401 ROM (i.e. firmware), but also wrote emulator of the Real Device using the Real firmware, my initial realization about it is here:
So, I don't know if their emulator is fully functional, but if yes (presumable if not, it can be fixed, because the hardest part is done, i.e. dumping the ROM), what about like we have MUNT-box, we have dedicated MAME-MPU401-box in front of it, i.e. do not rely anymore on expensive, speculatively priced MPU401 interfaces - I mean do diagram like this would be possible:
your (retro) PC with any sound card with MIDI UART (just to send the SysEx to MAME-box) --> Midi cable --> MIDI-In of dedicated MAME-MPU401-box --> MIDI-Out of dedicated MAME-MPU401-box --> Midi cable --> dedicated MUNT-box
What you think? Possible or I am missing something?
I would think these things got patched like they did on dosbox since then - but I can't claim to be an expert on softmpu... it is my impression that it works fine provided one meets the system reqs
I would think these things got patched like they did on dosbox since then - but I can't claim to be an expert on softmpu...
I tested them earlier today on the latest SoftMPU v1.9 - not only they are there, but test "2A" and "1A" - cause total freeze with SoftMPU (i.e. it's worse than the old test ran on Dosbox) plus I guess MAME could be ran on the same Box where the MUNT is run, i.e. not have physically 2 boxes. basically, instead run SoftMPU on the Retro PC, run MAME on the MUNT box next to it.
I don't know which is the best way to disassemble 6801-assembler, even less I know how to read it, but even my very clumsy attempt , seems to make a lot of sense:
The attachment mpu401_asm.jpg is no longer available
because MPU-401 Command 0xAC and Command 0xAD communication is the following:
and that is very obvious on the above screenshot of 6801 ASM code:
1load 0x15, compare if the CMD is 0xAC, return it
and same:
1load 0x01, compare if the CMD is 0xAD, return it
and so on. So, definitely, someone familiar with 6801-assembler can read the above better and even do some improvement to the MAME code. I guess that's also confirmation MAME ROM dump is good.
OK, here is something like a Guide and my current findings. That will save time of other people in case they want to join and help with the effort.
I am using the latest MAME 0.259 and apart of that, you need only 6 other files (that you can find and download online), you put them in sub-directory named "ct486" in your MAME roms directory:
("msdos622.chd" is optional, you can generate your own HDD image using MAME 'chdman' tool and install your own DOS or other OS, but I will not cover it, because in this case it's just waste of time)
After that running MAME with Roland MPU-401 emulation and running DOS 6.22 installation is as easy as:
mame ct486 -hard1 msdos622 -isa5 mpu401
NOTE: on the 1st run of the emulator, you need to enter the emulated 486-machine BIOS with pressing DEL and go to auto-detect the HDD and save the changes to the BIOS.
NOTE2: in case you want to exchange some files between the DOS 6.22 installation running in MAME and the "outside world" the stupidest way I found is using floppy disk image (created with WinImage) in the following way:
In order to be able to experiment and add some debug messages to Roland MPU-401 emulator you need to be able to build MAME from its source code - that turned out to be extremely easy in my 'Ubuntu 22.04.2 LTS' installation, only 3 simple steps:
So, that initial test shows there are what seems to be minor bugs/problems with the MAME emulation of Roland MPU-401, I tracked down those problems to the time when that emulation was made - even before it was in MAME, it was initially part of the 'MESS project release 0.150' - that should explain why it's not popular, because since then (over 10 years now), no one cared to fix those small issues, here are the details:
MAME 6801-emulator seems to properly run the Roland MPU-401 ROM, but something is not quite right as the screenshot shows and explains:
The attachment mame_mpu401_bug.jpg is no longer available
I don't claim the below is the correct and the best fix - it's just way to illustrate the MAME emulation of Roland MPU-401 problems look very minor and probably easy to be ironed out:
and after that the result is on the screenshot below:
The attachment mame_mpu401_fix.jpg is no longer available
So, currently, my conclusion is that MAME did all the hard work - dumped the latest version of Roland MPU-401 ROM (v1.5A) and wrote 6801-emulator that is working. The communication between the 6801-Emulator and the upper layers (where DOS is running) has some issues, but they seem that should be easily fixable as I illustrated above.
[EDIT] I forgot to mention that MAME includes tools called 'unidasm' that is capable to disassemble the Roland MPU-401 ROM: