From 9ca15bb54bdf25f89f5770f45fd4c70198ec99f9 Mon Sep 17 00:00:00 2001 From: arbee Date: Sun, 23 Jun 2019 08:07:24 -0400 Subject: MIDI: fixed reception of several System Common messages [Golden Child, R. Belmont] --- src/osd/modules/midi/portmidi.cpp | 17 +++++++++++++++-- 1 file changed, 15 insertions(+), 2 deletions(-) diff --git a/src/osd/modules/midi/portmidi.cpp b/src/osd/modules/midi/portmidi.cpp index 699dbf2c9c2..418295a7a5c 100644 --- a/src/osd/modules/midi/portmidi.cpp +++ b/src/osd/modules/midi/portmidi.cpp @@ -237,13 +237,19 @@ int osd_midi_device_pm::read(uint8_t *pOut) { if (status & 0x80) // sys real-time imposing on us? { - if ((status == 0xf2) || (status == 0xf3)) + if (status == 0xf2) { *pOut++ = status; *pOut++ = Pm_MessageData1(rx_evBuf[msg].message); *pOut++ = Pm_MessageData2(rx_evBuf[msg].message); bytesOut += 3; } + else if (status == 0xf3) + { + *pOut++ = status; + *pOut++ = Pm_MessageData1(rx_evBuf[msg].message); + bytesOut += 2; + } else { *pOut++ = status; @@ -302,14 +308,21 @@ int osd_midi_device_pm::read(uint8_t *pOut) break; case 2: // song pos - case 3: // song select *pOut++ = status; *pOut++ = Pm_MessageData1(rx_evBuf[msg].message); *pOut++ = Pm_MessageData2(rx_evBuf[msg].message); bytesOut += 3; break; + case 3: // song select + *pOut++ = status; + *pOut++ = Pm_MessageData1(rx_evBuf[msg].message); + bytesOut += 2; + break; + default: // all other defined Fx messages are 1 byte + *pOut++ = status; + bytesOut += 1; break; } break; -- cgit v1.2.3