IBM Music Feature Card/Yamaha FB-01

Developer's Forum, for discussion of bugs, code, and other developmental aspects of DOSBox.

Re: IBM Music Feature Card/Yamaha FB-01

Postby Scali » 2018-1-22 @ 16:17

Some more progress on the driver front: it was indeed quite easy to make a single MIDI driver act as both a MIDI in and MIDI out driver.
I've added the necessary export function (midMessage()), and it now shows up as a MIDI in device as well.
Now I need to find out how to actually send data to the application. Especially SysEx data seems somewhat complicated, since the application needs to prepare buffers, and my driver needs to keep track of them. I can't output any SysEx data if I don't get buffers from the application.
Scali
l33t
 
Posts: 3285
Joined: 2014-12-13 @ 14:24

Re: IBM Music Feature Card/Yamaha FB-01

Postby Scali » 2018-1-23 @ 14:27

In order to debug the upcoming feast of SysEx data, I figured I would go and look for an FB-01 instrument editor first.
I found an Open Source one: https://sourceforge.net/projects/fb01editor/
Sadly, it had a race condition on sending and receiving SysEx data, at least on some MIDI devices (apparently it is very sensitive to how the MIDI driver is implemented).
I have debugged it, and made a fixed version here: https://www.dropbox.com/s/nfeidh5eay8e6 ... x.zip?dl=0
It seems to work like a charm on my IBM Music Feature Card now. I can retrieve the configuration and instrument data, and modify all sorts of parameters in realtime.
It should also allow me to extract the data from my IMFC and upload it to my emulator, so I should have a good starting point.

From here on in, it will be mostly working on the MIDI-to-YM2164 interface, and also sending back the correct SysEx responses for MIDI dump requests.
Scali
l33t
 
Posts: 3285
Joined: 2014-12-13 @ 14:24

Re: IBM Music Feature Card/Yamaha FB-01

Postby Scali » 2018-1-23 @ 23:33

I've hacked up a quick-and-dirty system to buffer data and send it out to a MIDI in device with timestamps, so I think the plumbing is pretty much done at this point.
All that's left is the actual FB-01 emulator... and lots of cleaning up and bugfixing I suppose (the MIDI in-part of the driver isn't exactly thread-safe currently, but I should be able to get away with that, since we'll always have just a single FB-01 emulator, and a single application connected to its MIDI output).
Scali
l33t
 
Posts: 3285
Joined: 2014-12-13 @ 14:24

Re: IBM Music Feature Card/Yamaha FB-01

Postby jal » 2018-1-24 @ 09:20

Just letting you know I'm following this with great interest, so keep it coming :).


JAL
User avatar
jal
Member
 
Posts: 495
Joined: 2004-1-02 @ 15:30
Location: Amersfoort, Netherlands

Re: IBM Music Feature Card/Yamaha FB-01

Postby Scali » 2018-1-24 @ 12:43

jal wrote:Just letting you know I'm following this with great interest, so keep it coming :).


Excellent! :)

Anyway, I've just implemented the first SysEx response. Not enough to please the FB01 editor yet, but it's slowly getting there.
Scali
l33t
 
Posts: 3285
Joined: 2014-12-13 @ 14:24

Re: IBM Music Feature Card/Yamaha FB-01

Postby Scali » 2018-1-25 @ 19:14

Hum, interesting... I thought I had the voice bank SysEx working, because if I exported voice data from my IMFC and imported it into the FB-01 emulator, all data seemed to arrive correctly, all packets had the correct length and checksum was okay...
Then I started up Leisure Suit Larry 3, and it crashed my driver instantly.
Upon debugging, I found that it thought the voice bank had way larger packets than they really did... Which makes me wonder: why does it work fine on the real IMFC/FB-01? Did Yamaha just hardcode the length of the expected packets? Also, I'm reasonably sure that the checksums aren't correct either... so does the firmware not bother to check the checksums?

Anyway, for now I made my code support both ways: when decoding a packet you pass a length-parameter. If you pass 0, it will decode it from the packet. Else it takes the length you supplied, and ignores whatever is in the packet. This seems to make Larry 3 work, but I need to study it in some more detail.

The next puzzle is exporting the voice bank data back out through a set of packets in a SysEx message. I thought I had done it, but FB01 Editor doesn't like the checksums.

Devils in details...
Scali
l33t
 
Posts: 3285
Joined: 2014-12-13 @ 14:24

Previous

Return to DOSBox Development

Who is online

Users browsing this forum: No registered users and 3 guests