Hi Arbee,

I was looking at how mame hooks up to the midi with portmidi src/osd/modules/midi/portmidi.cpp and it seems that it doesn't pass the 1 byte messages through like F8 (timing clock).


Code

int osd_midi_device_pm::read(uint8_t *pOut)

...

                                case 0xf:   // system common
                                        switch (status & 0xf)
                                        {
                                                case 0: // System Exclusive
                                                {
                                                        *pOut++ = status;   // this should be OK: the shortest legal sysex is F0 tt dd F7, I believe
                                                        *pOut++ = (rx_evBuf[msg].message>>8) & 0xff;
                                                        *pOut++ = (rx_evBuf[msg].message>>16) & 0xff;
                                                        uint8_t last = *pOut++ = (rx_evBuf[msg].message>>24) & 0xff;
                                                        bytesOut += 4;
                                                        rx_sysex = (last != MIDI_EOX);
                                                        break;
                                                }

                                                case 7: // End of System Exclusive
                                                        *pOut++ = status;
                                                        bytesOut += 1;
                                                        rx_sysex = false;
                                                        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;

                                                default:    // all other defined Fx messages are 1 byte

                                                        *pOut++ = status;             // shouldn't we pass the 1 byte messages along?
                                                        bytesOut += 1;
                                                        break;
                                        }




Also if I read it correctly, 0xF3 (song select) should only supply 2 bytes (status + 1 data byte).


http://www.personal.kent.edu/~sbirch/Music_Production/MP-II/MIDI/midi_protocol.htm
http://www.personal.kent.edu/~sbirch/Music_Production/MP-II/MIDI/midi_system_common_messages.htm
http://www.personal.kent.edu/~sbirch/Music_Production/MP-II/MIDI/midi_system_real.htm