Hi @gmcn42, hope you are well!
@appiah4 has encountered problems using mt32-pi-control to send SysEx from MS-DOS via a Music Quest PC-MIDI "Intelligent" MPU clone card from keropi - there's a (long!) thread here: dwhinham/mt32-pi#127 (reply in thread)
I have an Orpheus card which has the same MIDI hardware/"intelligent" MPU as the PC-MIDI clone, and was able to reproduce this.
The problem is that the MPU emits no data at all when using mt32-pi.exe -g
or mt32-pi.exe -m
, for example, and so the Pi of course receives nothing. DUMP.EXE
, on the other hand, works fine with an equivalent .SYX file; games and other intelligent-mode aware software also works fine.
The issue is timing-sensitive, because:
- For @appiah4, passing
-v
seems to "fix" it - but not for me. The printf()
caused by -v
appears to add just enough of a delay between putting the MPU into UART mode and sending the data to allow it to work.
- For me, spamming the command (up-arrow + return) very fast may sometimes send some data to the Pi. My PC is an Am5x86-133MHz "486", so a fairly fast DOS machine.
- For me, using
-Y
and providing a .SYX file works too; I think the delay caused by reading the file from disk allows it to work too.
As a hack, I added a call to delay_ms(1000);
here, just after the mpu401_uart(mpubase)
line:
mpu401_waitread(mpubase);
instead of the delay also appears to work, but I don't think this is correct.
I'm not sure of the true fix, as I'm not experienced with programming the MPU-401, but this knowledge may help narrow things down.
I'm guessing there's a sequencing problem with the checking and waiting of the MPU read/write status bits, but I can't see it.