MiSTer MidiLink

Kernel, Main, Utilities & Applications, Miscellaneous Devices.
abbub
Posts: 36
Joined: Mon May 25, 2020 3:52 pm
Location: Fort Collins, CO
Has thanked: 2 times
Been thanked: 7 times
Contact:

Re: MiSTer MidiLink

Unread post by abbub »

bbond007 wrote: Mon Feb 22, 2021 2:19 am
abbub wrote: Sun Feb 21, 2021 6:26 pm So, is 'Modem' currently broken on C64? When I select it from 'UART Mode' it jumps back a screen and shows 'Connection: None' with no other options other than 'save'. Updates have been run, and the current C64 core on the sd card is: C64_20210216.rbf
Have you installed this update?

https://misterfpga.org/viewtopic.php?p=17936#p17936
I had not installed that update. I have now, and it's working as expected at 2400 baud for some Sunday night telnet BBSing.
Thanks!
bbond007
Top Contributor
Posts: 519
Joined: Tue May 26, 2020 5:06 am
Has thanked: 85 times
Been thanked: 198 times

Re: MiSTer MidiLink

Unread post by bbond007 »

dwmcqueen wrote: Sun Feb 21, 2021 3:49 pm I figured out the issue - but not sure how to solve. Changing the baud rate in the C64 menu does not change the baud rate in MidiLink.INI and it stays at 2400 baud.
MidiLink.INI no longer defines the baud rate. It is now set by the OSD.
dwmcqueen wrote: Mon Feb 22, 2021 2:20 am You have to do the update and it works (sort of - having issues changing the baud rate).
With CCGMS I was able to change the modem to 300/1200/2400 BAUDs...

Looking at debug info everything seem to be working properly as far as BAUD rate change as far as I can tell...
ryanvb
Posts: 8
Joined: Tue Feb 23, 2021 5:09 am
Has thanked: 1 time

Re: MiSTer MidiLink

Unread post by ryanvb »

I've been trying for 2 days to get Space Quest 1 VGA or SQ4 to work on my MT32 without generating a "Exc. Checksum Error" message on the MT32 at launch.

I do have "DELAYSYSEX = TRUE" set in /media/fat/linux/MidiLink.INI which I thought was supposed to avoid these presumably speed related issues. I'm using the official Roland USB cable and a first-gen MT32.

Does anyone know a solution for this?

EDIT:

After many more hours of testing today, here’s what worked for me for perfect MT-32 playback on Space Quest 1 and 4 (and possibly other Sierra games of that generation). This balances game performance with perfect music performance, with no buffer errors or checksum errors:

Performance settings:

56 or 90mhz CPU (30mhz gets stuttering in game, 90mhz may make animations a bit faster than acceptable so 56mhz is probably a good middle ground)
L1 cache off
L2 cache on

Only the L2 cache can be enabled, otherwise the game runs too fast and generates buffer overflows and / or checksum errors on the MT32.

Config Settings:

DELAYSYSEX FALSE in MidiLink.ini. If it’s TRUE then music starts playing late, after the Sierra logo has displayed for a while. So there’s no need to have MidiLink slow down the transmission, disabling L1 cache already seems to do that well enough.

EMM386 MUST be enabled. With just HIMEM, the MT32 checksum error occurs at startup of both SQ1 and SQ4 (regardless of whether DELAYSYSEX is set in SoftMPU or MidiLink.INI, unfortunately).

Notes:

I'm using the official Roland UM-ONE mk2 USB cable from my Mister to a first-gen MT-32. I'm the software from the Top 300 DOS games pack.
FoxbatStargazer
Top Contributor
Posts: 994
Joined: Thu Dec 10, 2020 5:44 pm
Has thanked: 309 times
Been thanked: 228 times

Re: MiSTer MidiLink

Unread post by FoxbatStargazer »

Is there any way to lower the mixing quality of MUNT to try and shore up performance on a Pi or even Mister? Midilink has a MUNT options= line but I can't find documentation anywhere about what you can put there.
bbond007
Top Contributor
Posts: 519
Joined: Tue May 26, 2020 5:06 am
Has thanked: 85 times
Been thanked: 198 times

Re: MiSTer MidiLink

Unread post by bbond007 »

FoxbatStargazer wrote: Fri Feb 26, 2021 1:15 am Is there any way to lower the mixing quality of MUNT to try and shore up performance on a Pi or even Mister? Midilink has a MUNT options= line but I can't find documentation anywhere about what you can put there.

Code: Select all

-r           : Enable reverb (default)
-n           : Disable reverb 
-m           : Manual buffering mode (buffer does not grow)
-a           : Automatic buffering mode (default)
-x msec      : Maximum buffer size in milliseconds
-i msec      : Minimum (initial) buffer size in m;
-l mode      : Analog emulation mode (0 - Digital, 1 - Coarse, 2 - Accurate, 3 - Oversampled 2x, default: 2)
314ter
Posts: 5
Joined: Mon May 25, 2020 10:28 am
Has thanked: 3 times
Been thanked: 1 time

Re: MiSTer MidiLink

Unread post by 314ter »

I am failing to get Midilink to work on my rPi4. Got it to work on an Retropie installation, but I wanted something leaner, so I installed a Dietpi image on the rPi4 which is a lightweight Debian based OS.
https://dietpi.com/downloads/images/tes ... -Buster.7z
Note, I chose the 64bit (ARM v8) version.

When i try to run midilink the output is as follows:

Code: Select all

root@DietPi:/opt# ./midilink UDPFSYNTH
-bash: ./midilink: No such file or directory
After a google search I tried:

Code: Select all

root@DietPi:/opt# readelf -l ./midilink | grep interpreter
      [Requesting program interpreter: /lib/ld-linux-armhf.so.3]
The midilink program is trying to use /lib/ld-linux-armhf.so.3, but I seem to be missing this...
The same is the case for mt32d (which I copied to /usr/bin)

Is there any way to get midilink to run on this (64bit) Dietpi distro?
User avatar
Alkadian
Top Contributor
Posts: 721
Joined: Thu May 28, 2020 9:55 am
Has thanked: 289 times
Been thanked: 116 times

Re: MiSTer MidiLink

Unread post by Alkadian »

314ter wrote: Mon Mar 01, 2021 12:04 pm I am failing to get Midilink to work on my rPi4. Got it to work on an Retropie installation, but I wanted something leaner, so I installed a Dietpi image on the rPi4 which is a lightweight Debian based OS.
https://dietpi.com/downloads/images/tes ... -Buster.7z
Note, I chose the 64bit (ARM v8) version.

When i try to run midilink the output is as follows:

Code: Select all

root@DietPi:/opt# ./midilink UDPFSYNTH
-bash: ./midilink: No such file or directory
After a google search I tried:

Code: Select all

root@DietPi:/opt# readelf -l ./midilink | grep interpreter
      [Requesting program interpreter: /lib/ld-linux-armhf.so.3]
The midilink program is trying to use /lib/ld-linux-armhf.so.3, but I seem to be missing this...
The same is the case for mt32d (which I copied to /usr/bin)

Is there any way to get midilink to run on this (64bit) Dietpi distro?
Hi,

I have compiled Midilink optimised for the rpi4. Please see refer to my post below:

https://misterfpga.org/viewtopic.php?p=17150#p17150
314ter
Posts: 5
Joined: Mon May 25, 2020 10:28 am
Has thanked: 3 times
Been thanked: 1 time

Re: MiSTer MidiLink

Unread post by 314ter »

Alkadian wrote: Mon Mar 01, 2021 1:40 pm Hi,

I have compiled Midilink optimised for the rpi4. Please see refer to my post below:

https://misterfpga.org/viewtopic.php?p=17150#p17150
I know, thanks, but I was the one who asked you for it at that time, and I am using your optimized compile now, to no effect I'm afraid.
I seem to be missing the correct "interpreter" :? (I don't have /lib/ld-linux-armhf.so.3 on my rPi4, Debian 64bit)
dwmcqueen
Posts: 10
Joined: Tue Jan 05, 2021 8:01 pm
Has thanked: 1 time
Been thanked: 1 time

Re: MiSTer MidiLink

Unread post by dwmcqueen »

bbond007 wrote: Tue Feb 23, 2021 5:29 am
dwmcqueen wrote: Sun Feb 21, 2021 3:49 pm I figured out the issue - but not sure how to solve. Changing the baud rate in the C64 menu does not change the baud rate in MidiLink.INI and it stays at 2400 baud.
MidiLink.INI no longer defines the baud rate. It is now set by the OSD.
dwmcqueen wrote: Mon Feb 22, 2021 2:20 am You have to do the update and it works (sort of - having issues changing the baud rate).
With CCGMS I was able to change the modem to 300/1200/2400 BAUDs...

Looking at debug info everything seem to be working properly as far as BAUD rate change as far as I can tell...
Hmmm..maybe I just need to do a clean install. It sort of takes (sometimes) but usually I am just stuck on 2400 baud.
User avatar
ericgus09
Posts: 206
Joined: Mon May 25, 2020 2:47 am
Has thanked: 7 times
Been thanked: 26 times

Re: MiSTer MidiLink

Unread post by ericgus09 »

Humm

I have done the "linux_img_update.tar.gz" update and I still cant get UART mode to show MODEM .. just defaults to NONE .. userport set to UART

Ive run update and update_all so I am current and this is a brand new SD card with a fresh setup by MrFusion ...

Edit: never mind, I did it for a second time and it finally worked .. (no idea what the deal was)
cyb4
Posts: 9
Joined: Mon May 25, 2020 2:17 pm
Been thanked: 1 time

Re: MiSTer MidiLink

Unread post by cyb4 »

I have a RPi3b (running the latest Retropie) and a Mister (everything updated) and I'm stuck exactly with what Alkadian posted (page 1, last post) on the RPi3 side when I try to play Space Quest III on the AtariST core. I get the very same messages on the RPi3 side (Starting --> UDP Synth loop :)
LCD: MiSTer MidiLink! BB7). Sound from Mister is still no midi and my RPI3 doesn't output anything at all. Could it be related to the USB dac I'm using on my RPi3? It works fine with emulators. Not sure whether I should buy the dac you mentioned @bbond007, just to see if that's solving the problem lol :)

It's really annoying, I really want to use this feature :(
bbond007
Top Contributor
Posts: 519
Joined: Tue May 26, 2020 5:06 am
Has thanked: 85 times
Been thanked: 198 times

Re: MiSTer MidiLink

Unread post by bbond007 »

I did the original UDPMIDI.EXE in C# which was perhaps a bad choice as the MIDI API is using a lot of older (unmanaged) API's. As a result the code is pretty hacky.

The simpler approach is to redo the app in c/c++, so I have started to do that and have something working now if anyone wants to give it a try...

screen.png
screen.png (311.12 KiB) Viewed 8520 times
UDPMIDI22.zip
(11.95 KiB) Downloaded 13 times

EDIT: 2.2 now supports sending.

Shogun
Posts: 57
Joined: Wed Jun 24, 2020 7:41 pm
Location: Denver, CO
Has thanked: 28 times
Been thanked: 22 times

Re: MiSTer MidiLink

Unread post by Shogun »

Thanks bbond007 this is working great! As a side note it hadn't occured to me to use VSTs with mister. I'll have to look into that.
HarborSeal
Posts: 41
Joined: Sun Jul 12, 2020 6:54 am
Has thanked: 34 times
Been thanked: 14 times

Re: MiSTer MidiLink

Unread post by HarborSeal »

Thanks to UDPMIDI I'm able to use Virtualmidisynth, which uses the BASSMIDI library. My two preferred soundfonts work best with Virtualmidisynth/BASSMIDI and don't sound correct on fluidsynth for some reason.
Vaelenthior
Posts: 2
Joined: Wed Mar 09, 2022 4:32 pm

Re: MiSTer MidiLink

Unread post by Vaelenthior »

First of all, I would like to thank bbond007 for the MidiLink service. Working with USB MIDI devices from the ao486 core has been pretty much seamless for me so far.
ryanvb wrote: Tue Feb 23, 2021 4:49 pm I've been trying for 2 days to get Space Quest 1 VGA or SQ4 to work on my MT32 without generating a "Exc. Checksum Error" message on the MT32 at launch.

I do have "DELAYSYSEX = TRUE" set in /media/fat/linux/MidiLink.INI which I thought was supposed to avoid these presumably speed related issues. I'm using the official Roland USB cable and a first-gen MT32.
Unfortunately my experience was much the same on a Rev.0 MT-32. Looking at the code that is responsible for delaying the messages in MidiLink, the timings seem to be quite different from how e.g. DOSBox implements this.
ryanvb wrote: Tue Feb 23, 2021 4:49 pm DELAYSYSEX FALSE in MidiLink.ini. If it’s TRUE then music starts playing late, after the Sierra logo has displayed for a while. So there’s no need to have MidiLink slow down the transmission, disabling L1 cache already seems to do that well enough.

EMM386 MUST be enabled. With just HIMEM, the MT32 checksum error occurs at startup of both SQ1 and SQ4 (regardless of whether DELAYSYSEX is set in SoftMPU or MidiLink.INI, unfortunately).
Currently SoftMPU with DELAYSYSEX actually gets the job done for me, no need to limit the speed of the core or enabled the delay in MidiLink. The line I use to load it is simply:

Code: Select all

SOFTMPU.EXE /MPU:330 /DELAYSYSEX
The game not waiting until all of the patches have been loaded into the MT-32 seems to be an unfortunate side effect of buffering the data on the Linux side instead of in the actual core. When using SoftMPU it displays a waiting icon and the music starts playing as the Sierra logo appears. So with a Rev.0 MT-32 using SoftMPU seems to be the preferred option for now.
bbond007
Top Contributor
Posts: 519
Joined: Tue May 26, 2020 5:06 am
Has thanked: 85 times
Been thanked: 198 times

Re: MiSTer MidiLink

Unread post by bbond007 »

Vaelenthior wrote: Wed Mar 09, 2022 5:06 pm First of all, I would like to thank bbond007 for the MidiLink service
Unfortunately my experience was much the same on a Rev.0 MT-32. Looking at the code that is responsible for delaying the messages in MidiLink, the timings seem to be quite different from how e.g. DOSBox implements this.
I did not look at any existing code before implementing that DELAYSYSEX function. I simply added more delays to the sysex messages until the checksum errors quit occurring on my Rev0.

I have come to realize that my implementation is not without issues and apparently does not even work on all Rev0's.

Anyway, I apologize for that...

I think the SoftMPU MPU-401 implementation is based on the one in DOSBox, so maybe I'll have a look at that code.
Vaelenthior
Posts: 2
Joined: Wed Mar 09, 2022 4:32 pm

Re: MiSTer MidiLink

Unread post by Vaelenthior »

bbond007 wrote: Mon Mar 14, 2022 9:27 pm I have come to realize that my implementation is not without issues and apparently does not even work on all Rev0's.

Anyway, I apologize for that...
No need to apologize, I assume you wrote this in your spare time. :)
bbond007 wrote: Mon Mar 14, 2022 9:27 pm I think the SoftMPU MPU-401 implementation is based on the one in DOSBox, so maybe I'll have a look at that code.
I think that's correct. Also, the dosbox-staging source code mentions this original discussion thread on the implementation: https://sourceforge.net/p/dosbox/patches/241/

Unfortunately fixing this will not prevent the issue of games starting before all the SYSEX commands are loaded into the module. It's only really a problem at game startup, but do you think there is any way to propagate the delay back to the core, i.e. have blocking IO there until the SYSEX commands are forward to the MT-32? Is there some sort of ACK message back to the core that could be delayed?
mahen
Posts: 185
Joined: Sun May 24, 2020 8:25 pm
Has thanked: 19 times
Been thanked: 6 times

Re: MiSTer MidiLink

Unread post by mahen »

Hi bbond007 !

Sorry for asking this in several threads but I guess the other one is not watched anymore.

Before the update, I used to manually set a higher baudrate for the Minimig core, which did work and was very useful in my use case (I use imp3 to play random mods from the internet). Now my manual changes made to /sbin/uartmode don't seem to be taken in consideration anymore and in the Minimig OSD I only have one baudrate value.

Is there a way to work around this ? I used to be able to get my modules load twice as fast :)
best regards and thanks so much for your major contributions :)
mahen
thorr
Top Contributor
Posts: 1100
Joined: Mon Jul 06, 2020 9:37 pm
Has thanked: 537 times
Been thanked: 252 times

Re: MiSTer MidiLink

Unread post by thorr »

bbond007 wrote: Mon Mar 14, 2022 9:27 pm

Hi bbond007 - Just quoting to get your attention

I have this installed with the latest version of Raspian on a Pi 3B+ and an HDMI display. The sound is coming out the Pi instead of the display, but the desktop sound is coming out the HDMI device. Is there a way to launch midilink and make it use the HDMI device? Also, is the original tar file in this thread still what I should be using, or is there a newer version? Also, what performance settings for MidiLink do you recommend on the 3B+? This is on a new MiSTer setup using a Waveshare 11.9" screen which has an audio out jack on it that comes from the HDMI. In the Desktop, the audio device is called "HDMI". When I play youtube videos through it, it sounds choppy, so maybe MidiLink will too once it is working, and I might be better off with a DAC hat, but I want to try HDMI first. Thanks!

bbond007
Top Contributor
Posts: 519
Joined: Tue May 26, 2020 5:06 am
Has thanked: 85 times
Been thanked: 198 times

Re: MiSTer MidiLink

Unread post by bbond007 »

thorr wrote: Fri Apr 14, 2023 6:04 am

The sound is coming out the Pi instead of the display, but the desktop sound is coming out the HDMI device. Is there a way to launch midilink and make it use the HDMI device?

Its really been a while (and I was using RetroArch), but I thought that HDMI could be set it using the raspi-config utility. For my USB Turtle Beach and HiFiBerry I remember having to manually edit a file (maybe /etc/asound.conf)

https://linuxhint.com/configure-sound-raspberry-pi/

thorr
Top Contributor
Posts: 1100
Joined: Mon Jul 06, 2020 9:37 pm
Has thanked: 537 times
Been thanked: 252 times

Re: MiSTer MidiLink

Unread post by thorr »

bbond007 wrote: Fri Apr 14, 2023 7:00 pm

Its really been a while (and I was using RetroArch), but I thought that HDMI could be set it using the raspi-config utility. For my USB Turtle Beach and HiFiBerry I remember having to manually edit a file (maybe /etc/asound.conf)

https://linuxhint.com/configure-sound-raspberry-pi/

Thanks! I did try the Raspi-config utility actually and it ended up breaking the display output and I had to reload the OS from scratch - that or it was me trying to install the driver for the display that it did not need so maybe that broke it even though the script said it wasn't needed- not sure which caused the problem. I appreciate all the tips, and I will give everything a shot until I figure it out, and it is no big deal to reload again if necessary. Edit: looking at the article, I saw the Mai item in Raspi-config thinking it was my Chinese made display, so that is what I selected. HDMI was not listed there. Hopefully the /etc/asound.conf will work or HDMI will be listed next time since I didn't try to install the display driver. If not I will just get a hat. I am mounting the screen in my arcade cabinet above the main CRT screen and the pi mounts behind it so I don't want it to be too thick. I think it will be ok though. Thanks again!

thorr
Top Contributor
Posts: 1100
Joined: Mon Jul 06, 2020 9:37 pm
Has thanked: 537 times
Been thanked: 252 times

Re: MiSTer MidiLink

Unread post by thorr »

bbond007 wrote: Fri Apr 14, 2023 7:00 pm

Its really been a while (and I was using RetroArch), but I thought that HDMI could be set it using the raspi-config utility. For my USB Turtle Beach and HiFiBerry I remember having to manually edit a file (maybe /etc/asound.conf)

https://linuxhint.com/configure-sound-raspberry-pi/

Update: I got it working, but I ended up getting a HiFiBerry anyway for hopefully the best sound quality, and still had the issue. The issue was running it as root with the ./sudo midilink... The root user did not have the default audio device that the pi user did.

Here are all the fixes and enhancements that I did (for future reference and to anyone else that wants to do this)...

To get the list of devices, type aplay -l:

pi@raspberrypi:~ $ aplay -l
**** List of PLAYBACK Hardware Devices ****
card 0: Headphones [bcm2835 Headphones], device 0: bcm2835 Headphones [bcm2835 Headphones]
Subdevices: 8/8
Subdevice #0: subdevice #0
Subdevice #1: subdevice #1
Subdevice #2: subdevice #2
Subdevice #3: subdevice #3
Subdevice #4: subdevice #4
Subdevice #5: subdevice #5
Subdevice #6: subdevice #6
Subdevice #7: subdevice #7
card 1: vc4hdmi [vc4-hdmi], device 0: MAI PCM i2s-hifi-0 [MAI PCM i2s-hifi-0]
Subdevices: 1/1
Subdevice #0: subdevice #0
card 2: BossDAC [BossDAC], device 0: Boss DAC HiFi [Master] pcm512x-hifi-0 [Boss DAC HiFi [Master] pcm512x-hifi-0]
Subdevices: 1/1
Subdevice #0: subdevice #0

Then to set the default audio device for root edit /etc/asound.conf and specify the card number of the BossDAC (2 in this case):
pi@raspberrypi:~ $ sudo vi /etc/asound.conf

pcm.!default {
type hw
card 2
device 0
}

Then to get it to launch automatically with a reboot, edit /etc/rc.local

pi@raspberrypi:~ $ sudo vi /etc/rc.local

(at the end before the exit 0)

cd /home/pi
./midilink UDPMUNT QUIET &
exit 0 <-- already there

reboot to test and hopefully it works in the background

Be prepared to have your ears blown off because it is very loud. To fix this:
pi@raspberrypi:~ $ sudo alsamixer

Press F6 to select the sound card BossDAC
Press Right Arrow until you get to Digital and change the volume to 50 with the Down Arrow
Press Esc to exit

Save it permanently:
sudo alsactl store

reboot

Also, I was getting Munt performance issues so I did some performance enhancements:

pi@raspberrypi:~ $ sudo vi /sys/devices/system/cpu/cpufreq/ondemand/sampling_down_factor
100

pi@raspberrypi:~ $ sudo vi /sys/devices/system/cpu/cpufreq/ondemand/sampling_rate
50000

pi@raspberrypi:~ $ sudo vi /sys/devices/system/cpu/cpu0/cpufreq/scaling_governor
performance

pi@raspberrypi:~ $ vi /home/pi/MidiLink.INI
MUNT_OPTIONS = -i 30
(keep all the other lines)

Now on my Raspberry Pi 3b+ I get much better Munt performance without as many stutters and no overruns, at least in Monkey Island 2. Hopefully someday I can get a Pi 4. I still get a bit of stutter occasionally so maybe I will try overclocking. Probably first, I will try a lighter OS like Raspberry Pi OS Lite, or maybe I can disable unnecessary services on the OS I have now.

jaffa225man
Posts: 7
Joined: Wed Sep 27, 2023 6:41 am
Been thanked: 2 times

Re: MiSTer MidiLink

Unread post by jaffa225man »

I had previously used a windows emulator through wine (WinX68kHighSpeed_eng) and had beautiful output from the game Gemini Wing playing on my CM-64, since it has options to meld CM-32P PCM sounds with the CM-32L synth sounds.

Now, I've been trying to use USB-MIDI from the MiSTer's X68000 core and have been getting stuck notes galore in Gemini Wing with any of the CM-64 option keys F2-F4 held on game boot. This even happens when starting it in CM-32L/MT-32 mode by holding F1 while booting the game. The main synth sound freezes the moment it begins playing in the very first level, while the drums continue but otherwise only certain short tidbits are heard.

I haven't been at it long, but have tried turning off DELAYSYSEX in the linux/MIDILink.ini config file. It doesn't seem to change the MIDI output for Gemini Wing, although the CM-64 wouldn't ever need DELAYSYSEX set TRUE. I've also tried a couple Roland branded MIDI cables, as well as multiple USB adapters without any difference (Edirol UM-1S, Edirol UA-4FX, and Yamaha UW500). Finally, I've tested it with my CM-500 in its mode B (CM-64 simulation) too but it's the same.

The X68000 core is set through the OSD to use "USB" for the MIDILink option, and 31250 BAUD (with no other BAUD rate choices shown, but that should be correct for the X68000).

On the other hand, Acumajou Dracula sounds perfect, through all of these setups and cables.

A tip if you're trying this: Sharp X68000 games boot fast from .HDF SASI hard drive images.

Thanks for any further suggestions or solutions!

jaffa225man
Posts: 7
Joined: Wed Sep 27, 2023 6:41 am
Been thanked: 2 times

Re: MiSTer MidiLink

Unread post by jaffa225man »

I investigated the X68000 core's Gemini Wing MIDI output by running it through a computer running aseqdump, and I get drastically corrupted SysEx messages. During the initial loading of the F4-held SN-U110-07 mode which should have most SysEx messages as 256 bytes each (according to the emulator's output and verified CM-64 playback), from the MiSTer they are all 22 bytes each and they don't even appear to be messages for the MT-32 family, which should begin with "F0 41 10 16 12".

A few entire-message examples of these corrupted messages follow:
F0 41 10 20 00 32 06 0C 29 00 00 5A 5C 00 64 00 05 00 32 00 1B F7
F0 41 10 6E 00 32 00 0C 2E 32 00 52 61 00 00 00 00 00 32 00 0C F7
F0 41 10 61 3C 32 20 0C 49 32 64 3C 36 01 0F 64 32 3C 31 18 0C F7

An example good message (the first 256-byte Initial-SysEx message) from the emulator follows:
F0 41 10 16 12 08 00 00 52 45 45 44 31 20 20 20 20 20 00 00 03 00 24 37 0B 01 01 00 21 07 00 00 00 00 00 34 00 32 32 32 32 32 00 00 00 64 0A 01 27 08 18 64 00 00 06 14 21 4D 53 2D 45 4C 00 64 4A 59 0C 19 0C 00 00 00 00 00 00 2B 64 64 64 64 24 29 0B 01 01 00 00 07 00 00 00 00 00 34 00 32 32 32 32 32 40 00 00 64 10 0E 67 06 00 08 00 00 00 00 00 00 00 00 00 00 00 5A 46 5B 0C 1B 0C 00 00 09 05 0B 0E 0F 4D 5C 62 64 24 2F 0B 01 00 00 00 07 00 00 00 00 00 34 00 32 32 32 32 32 40 17 38 64 10 05 67 06 00 00 00 00 00 00 00 00 00 00 00 00 00 46 46 5B 0C 1B 0C 00 00 09 05 0B 0E 0F 4D 5C 62 64 24 2F 0B 01 00 00 00 07 00 00 00 00 00 34 00 32 32 32 32 32 40 17 38 64 10 05 67 06 00 00 00 00 00 00 00 00 00 00 00 00 00 46 46 5B 0C 1B 0C 00 00 09 05 0B 0E 0F 4D 5C 62 64 77 F7

But that's not all I noticed: After the game has been opened from the menu by selecting "Game Start", normally as the music starts for the first level there are a few SysEx messages in certain parts of that level's song which repeat when the song loops. They don't appear to play at all on the MiSTer's X68000 core.

That's the easily noticed corruption for me to see, but I suspect it may even be corrupting the note off messages as that's the reason I questioned it working in the first place as that aspect is obvious though audio.

EDIT: I created an issue at the github tracker: https://github.com/bbond007/MiSTer_MidiLink/issues/9

bbond007
Top Contributor
Posts: 519
Joined: Tue May 26, 2020 5:06 am
Has thanked: 85 times
Been thanked: 198 times

Re: MiSTer MidiLink

Unread post by bbond007 »

jaffa225man wrote: Tue Oct 03, 2023 5:18 am

I investigated the X68000 core's Gemini Wing MIDI output by running it through a computer running aseqdump, and I get drastically corrupted SysEx messages. During the initial loading of the F4-held SN-U110-07 mode which should have most SysEx messages as 256 bytes each (according to the emulator's output and verified CM-64 playback), from the MiSTer they are all 22 bytes each and they don't even appear to be messages for the MT-32 family, which should begin with "F0 41 10 16 12".

A few entire-message examples of these corrupted messages follow:
F0 41 10 20 00 32 06 0C 29 00 00 5A 5C 00 64 00 05 00 32 00 1B F7
F0 41 10 6E 00 32 00 0C 2E 32 00 52 61 00 00 00 00 00 32 00 0C F7
F0 41 10 61 3C 32 20 0C 49 32 64 3C 36 01 0F 64 32 3C 31 18 0C F7

An example good message (the first 256-byte Initial-SysEx message) from the emulator follows:
F0 41 10 16 12 08 00 00 52 45 45 44 31 20 20 20 20 20 00 00 03 00 24 37 0B 01 01 00 21 07 00 00 00 00 00 34 00 32 32 32 32 32 00 00 00 64 0A 01 27 08 18 64 00 00 06 14 21 4D 53 2D 45 4C 00 64 4A 59 0C 19 0C 00 00 00 00 00 00 2B 64 64 64 64 24 29 0B 01 01 00 00 07 00 00 00 00 00 34 00 32 32 32 32 32 40 00 00 64 10 0E 67 06 00 08 00 00 00 00 00 00 00 00 00 00 00 5A 46 5B 0C 1B 0C 00 00 09 05 0B 0E 0F 4D 5C 62 64 24 2F 0B 01 00 00 00 07 00 00 00 00 00 34 00 32 32 32 32 32 40 17 38 64 10 05 67 06 00 00 00 00 00 00 00 00 00 00 00 00 00 46 46 5B 0C 1B 0C 00 00 09 05 0B 0E 0F 4D 5C 62 64 24 2F 0B 01 00 00 00 07 00 00 00 00 00 34 00 32 32 32 32 32 40 17 38 64 10 05 67 06 00 00 00 00 00 00 00 00 00 00 00 00 00 46 46 5B 0C 1B 0C 00 00 09 05 0B 0E 0F 4D 5C 62 64 77 F7

But that's not all I noticed: After the game has been opened from the menu by selecting "Game Start", normally as the music starts for the first level there are a few SysEx messages in certain parts of that level's song which repeat when the song loops. They don't appear to play at all on the MiSTer's X68000 core.

That's the easily noticed corruption for me to see, but I suspect it may even be corrupting the note off messages as that's the reason I questioned it working in the first place as that aspect is obvious though audio.

EDIT: I created an issue at the github tracker: https://github.com/bbond007/MiSTer_MidiLink/issues/9

Have you (or perhaps someone else) tried it with an mt-32pi? I'm just wondering if that game has the same behavior with the X68000 core using an entirely different way of interfacing with MIDI (USER IO) which would let us know if MidiLink was at fault or if the problem is with the core itself...

I'm a complete X68000 nube...

jaffa225man
Posts: 7
Joined: Wed Sep 27, 2023 6:41 am
Been thanked: 2 times

Re: MiSTer MidiLink

Unread post by jaffa225man »

bbond007 wrote: Wed Oct 04, 2023 1:28 am
jaffa225man wrote: Tue Oct 03, 2023 5:18 am

I investigated the X68000 core's Gemini Wing MIDI output by running it through a computer running aseqdump, and I get drastically corrupted SysEx messages. During the initial loading of the F4-held SN-U110-07 mode which should have most SysEx messages as 256 bytes each (according to the emulator's output and verified CM-64 playback), from the MiSTer they are all 22 bytes each and they don't even appear to be messages for the MT-32 family, which should begin with "F0 41 10 16 12".

A few entire-message examples of these corrupted messages follow:
F0 41 10 20 00 32 06 0C 29 00 00 5A 5C 00 64 00 05 00 32 00 1B F7
F0 41 10 6E 00 32 00 0C 2E 32 00 52 61 00 00 00 00 00 32 00 0C F7
F0 41 10 61 3C 32 20 0C 49 32 64 3C 36 01 0F 64 32 3C 31 18 0C F7

An example good message (the first 256-byte Initial-SysEx message) from the emulator follows:
F0 41 10 16 12 08 00 00 52 45 45 44 31 20 20 20 20 20 00 00 03 00 24 37 0B 01 01 00 21 07 00 00 00 00 00 34 00 32 32 32 32 32 00 00 00 64 0A 01 27 08 18 64 00 00 06 14 21 4D 53 2D 45 4C 00 64 4A 59 0C 19 0C 00 00 00 00 00 00 2B 64 64 64 64 24 29 0B 01 01 00 00 07 00 00 00 00 00 34 00 32 32 32 32 32 40 00 00 64 10 0E 67 06 00 08 00 00 00 00 00 00 00 00 00 00 00 5A 46 5B 0C 1B 0C 00 00 09 05 0B 0E 0F 4D 5C 62 64 24 2F 0B 01 00 00 00 07 00 00 00 00 00 34 00 32 32 32 32 32 40 17 38 64 10 05 67 06 00 00 00 00 00 00 00 00 00 00 00 00 00 46 46 5B 0C 1B 0C 00 00 09 05 0B 0E 0F 4D 5C 62 64 24 2F 0B 01 00 00 00 07 00 00 00 00 00 34 00 32 32 32 32 32 40 17 38 64 10 05 67 06 00 00 00 00 00 00 00 00 00 00 00 00 00 46 46 5B 0C 1B 0C 00 00 09 05 0B 0E 0F 4D 5C 62 64 77 F7

But that's not all I noticed: After the game has been opened from the menu by selecting "Game Start", normally as the music starts for the first level there are a few SysEx messages in certain parts of that level's song which repeat when the song loops. They don't appear to play at all on the MiSTer's X68000 core.

That's the easily noticed corruption for me to see, but I suspect it may even be corrupting the note off messages as that's the reason I questioned it working in the first place as that aspect is obvious though audio.

EDIT: I created an issue at the github tracker: https://github.com/bbond007/MiSTer_MidiLink/issues/9

Have you (or perhaps someone else) tried it with an mt-32pi? I'm just wondering if that game has the same behavior with the X68000 core using an entirely different way of interfacing with MIDI (USER IO) which would let us know if MidiLink was at fault or if the problem is with the core itself...

I'm a complete X68000 nube...

Thanks for responding so quickly! Yes, I was considering that it could be the core too, but at least I know Akumajou Dracula is working (on both the X68000 core and MIDILink).

I'm a complete newbie with the X68000 too, and also the MiSTer, but had to try the system & game I wanted it for most, as soon as possible. I still have to try my long lost childhood system too: the Commodore Amiga.

And, although I don't know if anyone else has tested it with the mt32-pi, I don't have one to do it myself as I've been holding out for when it becomes possible to have a full MT-32 interface with all its buttons, encoder, LCD, and IN/OUT/THRU ports. For the interests of discovering this, though perhaps it will be worth buying one sooner... Of course, if there's a way to connect to the USER IO port to debug it without having an mt32-pi, I wouldn't mind trying that either. Would the "MiSTer MIDI" (1.4), which connects to the IO Board's USER port, work the same way but allow my real Roland devices to be used? I should probably just get one because I wasn't aware they existed until now, and am anticipating you'll say yes. It will be nice not tying up a normal USB port to MIDI usage too.

However, I won't mind if someone else who already does have the mt32-pi, tries running the X68000 core's Gemini Wing in MT-32 mode by booting the SASI .HDF image of the game while holding F1 on a connected USB keyboard. The music is pretty obviously wrong with the stuck notes if it isn't working on the core, and if it sounds good it must be working on the X68000 core.

Gryzor
Posts: 32
Joined: Wed May 27, 2020 2:51 pm
Has thanked: 2 times
Been thanked: 6 times

Re: MiSTer MidiLink

Unread post by Gryzor »

Hi there,

I'm also using a UM-ONE mk2 USB cable with my original Roland CM-32L device.
Gemini Wing and other Sharp games used to play Midi just fine on the X68000 core a couple years ago with my setup.
Seems Midi got messed up in most X68000 games by a newer version of the core.

bbond007
Top Contributor
Posts: 519
Joined: Tue May 26, 2020 5:06 am
Has thanked: 85 times
Been thanked: 198 times

Re: MiSTer MidiLink

Unread post by bbond007 »

jaffa225man wrote: Wed Oct 04, 2023 3:30 am

Would the "MiSTer MIDI" (1.4), which connects to the IO Board's USER port, work the same way but allow my real Roland devices to be used? I should probably just get one because I wasn't aware they existed until now, and am anticipating you'll say yes. It will be nice not tying up a normal USB port to MIDI usage too.

I'm pretty sure it would work. Would defiantly be nice to be able to use my MIDI modules and TCP/Modem simultaneously.

Gryzor wrote: Wed Oct 04, 2023 11:46 am

Seems Midi got messed up in most X68000 games by a newer version of the core.

It may not fix the issue with Gemini Wing though. I guess it depends if the core issue is isolated to using the UART for MIDI or if the exact same thing will happen with the "MiSTer MIDI" (1.4) interface.

jaffa225man
Posts: 7
Joined: Wed Sep 27, 2023 6:41 am
Been thanked: 2 times

Re: MiSTer MidiLink

Unread post by jaffa225man »

Gryzor wrote: Wed Oct 04, 2023 11:46 am

Hi there,

I'm also using a UM-ONE mk2 USB cable with my original Roland CM-32L device.
Gemini Wing and other Sharp games used to play Midi just fine on the X68000 core a couple years ago with my setup.
Seems Midi got messed up in most X68000 games by a newer version of the core.

Thanks for confirming that! I wonder what update specifically broke it, but maybe I can try some older versions in the meantime. I'm too lazy right now, though, and really enjoying reliving my Amiga 500/1000 days. I have ordered the MiSTer MIDI 1.4 to try later too.

bbond007 wrote: Wed Oct 04, 2023 5:17 pm

I'm pretty sure it would work. Would defiantly be nice to be able to use my MIDI modules and TCP/Modem simultaneously.

It may not fix the issue with Gemini Wing though. I guess it depends if the core issue is isolated to using the UART for MIDI or if the exact same thing will happen with the "MiSTer MIDI" (1.4) interface.

I don't know what I'd be using a modem for these days (BBSs maybe, but I only connected to our library once then). Anyway, yes, I can even see all 7 of the hub's USB ports getting used someday. This topic seems to be the origin of the MiSTer MIDI: viewtopic.php?t=910 and it seems to suggest it's connection is less abstracted than a USB-MIDI adapter. If I end up using this board for MIDI (which is great if it works with zero-latency), I feel another desire coming on: another USER PORT, but I know this is non-USB serial and a USB hub connected to it would be incompatible, useless, and worse - detrimentally destructive. SNAC for controllers might be nice someday, although I suppose, not for systems that use external MIDI thankfully. ;)

bbond007
Top Contributor
Posts: 519
Joined: Tue May 26, 2020 5:06 am
Has thanked: 85 times
Been thanked: 198 times

Re: MiSTer MidiLink

Unread post by bbond007 »

jaffa225man wrote: Thu Oct 05, 2023 4:08 am

I have ordered the MiSTer MIDI 1.4 to try later too.

Great, please report back if your results are different without using MIDI though USB. That information cold potentially help a developer identify the regression and fix the issue.

jaffa225man wrote: Thu Oct 05, 2023 4:08 am

This topic seems to be the origin of the MiSTer MIDI: viewtopic.php?t=910 and it seems to suggest it's connection is less abstracted than a USB-MIDI adapter.

Perhaps it does have less latency, but I can't tell the difference between USER IO, USB or even UDP(over WiFi) with my ears. I'm not a musician.

Post Reply