VOGONS


IBM Music Feature Card/Yamaha FB-01

Topic actions

Reply 180 of 263, by Scali

User metadata
Rank l33t
Rank
l33t

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.

http://scalibq.wordpress.com/just-keeping-it- … ro-programming/

Reply 181 of 263, by Scali

User metadata
Rank l33t
Rank
l33t

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/nfeidh5eay8e609/FB0 … v2_fix.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.

http://scalibq.wordpress.com/just-keeping-it- … ro-programming/

Reply 182 of 263, by Scali

User metadata
Rank l33t
Rank
l33t

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).

http://scalibq.wordpress.com/just-keeping-it- … ro-programming/

Reply 184 of 263, by Scali

User metadata
Rank l33t
Rank
l33t
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.

http://scalibq.wordpress.com/just-keeping-it- … ro-programming/

Reply 185 of 263, by Scali

User metadata
Rank l33t
Rank
l33t

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...

http://scalibq.wordpress.com/just-keeping-it- … ro-programming/

Reply 187 of 263, by Scali

User metadata
Rank l33t
Rank
l33t
awgamer wrote:

Search didn't bring up any vogon discussions that mame has functioning FB-01 emulation now, how long it's been there I don't know but it's there.

Interesting, it seems they went down the road of running the actual FB-01 firmware on a Z80-emulation it seems.
Also, it appears there is no actual YM2164 implementation, and they just use the YM2151 emulation instead.
If their code actually works, that would imply that the chips are fully register-compatible, or at least, to the extent that the FB-01 requires.
My project also uses the YM2151 code for now, but I wasn't sure how register-compatible they would be.

If someone would make a standalone FB-01 MIDI module based on the MAME code, then I'd only have to worry about the IMFC itself, as in the host-to-MIDI interface.

http://scalibq.wordpress.com/just-keeping-it- … ro-programming/

Reply 189 of 263, by jal

User metadata
Rank Oldbie
Rank
Oldbie

Wikipedia says "Compared to the OPM, the OPP has the same pinout and functional features but some minor changes to control registers. Differences are the test register address (9), the timer B resolution (period doubled: 2048 clock cycles on OPP vs. 1024 on OPM), and 8 undocumented registers (0-7)[2]. Due to how the FB-01 and IBM MFC hardware use those registers, swapping an OPM into these hosts does not operate correctly."

Reply 191 of 263, by Scali

User metadata
Rank l33t
Rank
l33t
awgamer wrote:

so the question is whether the mame guys have accounted for the differences in their implementation or just have a "working" emulation.

Yea, timer B is not exposed on the host side anyway, so unless it is used directly by the Z80 firmware, it shouldn't be an issue.
As for the undocumented registers... perhaps a real chip crashes when you write certain values to the wrong registers, but the emulation core may just ignore it.

http://scalibq.wordpress.com/just-keeping-it- … ro-programming/

Reply 192 of 263, by Stiletto

User metadata
Rank l33t++
Rank
l33t++
awgamer wrote:

I don't know how functional but it runs without a doesn't work warning screen.

Speaking as a MAME dev, I'm not really sure either. What I can tell you is it was added to MESS on June 11, 2014 as GAME_NOT_WORKING (these days this flag would be called MACHINE_NOT_WORKING) and that flag was removed on June 14, 2014.
https://github.com/mamedev/mame/commits/87a57 … /drivers/fb01.c

It entered MESS as part of the MESS 0.154 release (July 27, 2014), survived the MESS -> MAME merger, and has remained ever since.
http://adb.arcadeitalia.net/dettaglio_mame.ph … =0&autosearch=1

"I see a little silhouette-o of a man, Scaramouche, Scaramouche, will you
do the Fandango!" - Queen

Stiletto

Reply 193 of 263, by Scali

User metadata
Rank l33t
Rank
l33t
Stiletto wrote:

Speaking as a MAME dev, I'm not really sure either. What I can tell you is it was added to MESS on June 11, 2014 as GAME_NOT_WORKING (these days this flag would be called MACHINE_NOT_WORKING) and that flag was removed on June 14, 2014.
https://github.com/mamedev/mame/commits/87a57 … /drivers/fb01.c

My impression is that it isn't quite finished.
It seems someone made a 'template' for the hardware: a Z80, which needs a ROM (the FB-01 firmware), and is connected to a YM2164 (actually YM2151 in the emulator).
But I don't see what actually makes it a working device. Where does it get its MIDI input from? Did anyone actually try to send it some (FB-01 specific) MIDI input? And did any sound come out? How does one even use this code?
I mean, it should be like MUNT: a MIDI device that can be installed on the system, and used by other applications, or routed to a physical MIDI port.

http://scalibq.wordpress.com/just-keeping-it- … ro-programming/

Reply 195 of 263, by awgamer

User metadata
Rank Oldbie
Rank
Oldbie

Mame apparently has VST plugin support for synths, one of the examples shown being the FB-01, posted August 2 2018. https://github.com/mamedev/mame/issues/3817

Edit: The VST synth fork project page: https://github.com/jariseon/amame

Attachments

Reply 196 of 263, by Stiletto

User metadata
Rank l33t++
Rank
l33t++
awgamer wrote:

Mame apparently has VST plugin support for synths, one of the examples shown being the FB-01, posted August 2 2018. https://github.com/mamedev/mame/issues/3817

Edit: The VST synth fork project page: https://github.com/jariseon/amame

It's technically a fork, but yeah:
https://github.com/jariseon/amame

"I see a little silhouette-o of a man, Scaramouche, Scaramouche, will you
do the Fandango!" - Queen

Stiletto

Reply 197 of 263, by awgamer

User metadata
Rank Oldbie
Rank
Oldbie

Being that it's VST, can play with it in DOSBox.

From the beginning of this thread:

ih8registrations wrote:

FB01KING.ZIP is a TSR, with the source, that "converts" an IMFC to an FB-01. http://cd.textfiles.com/swextrav1993/disk4/pcspkr/

can redirect IMFC output to it as well.

Reply 198 of 263, by Scali

User metadata
Rank l33t
Rank
l33t

That would be excellent, because I already have a patch for DOSBox that emulates the main IMFC MIDI interface, and allows games to detect it, and route the MIDI data to Windows. I've been testing it with a real IMFC connected to the MIDI out of my Windows machine, and that worked very well. Some others have tested with an FB-01, worked just as well (the DOSBox layer translates some IMFC-specific SysEx commands to FB-01 compatible ones). All games you threw at it, ran fine.
Ironically enough, the native FB-01 drivers from Sierra games are bugged, and didn't work properly with some games, where my emulator 'fixed' those issues 😀

If that VST works well enough, the emulation is basically done. I was working on my own FB-01 emulator, but didn't get too far yet, because of lack of documentation on the YM2164 chip.

http://scalibq.wordpress.com/just-keeping-it- … ro-programming/