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: 4365
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: 4365
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: 4365
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: 497
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: 4365
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: 4365
Joined: 2014-12-13 @ 14:24

Re: IBM Music Feature Card/Yamaha FB-01

Postby awgamer » 2019-1-24 @ 17:51

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.
awgamer
Oldbie
 
Posts: 568
Joined: 2014-7-26 @ 07:42

Re: IBM Music Feature Card/Yamaha FB-01

Postby Scali » 2019-1-24 @ 17:57

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.
Scali
l33t
 
Posts: 4365
Joined: 2014-12-13 @ 14:24

Re: IBM Music Feature Card/Yamaha FB-01

Postby awgamer » 2019-1-24 @ 18:06

I don't know how functional but it runs without a doesn't work warning screen.
awgamer
Oldbie
 
Posts: 568
Joined: 2014-7-26 @ 07:42

Re: IBM Music Feature Card/Yamaha FB-01

Postby jal » 2019-1-24 @ 18:10

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."
User avatar
jal
Member
 
Posts: 497
Joined: 2004-1-02 @ 15:30
Location: Amersfoort, Netherlands

Re: IBM Music Feature Card/Yamaha FB-01

Postby awgamer » 2019-1-24 @ 18:13

so the question is whether the mame guys have accounted for the differences in their implementation or just have a "working" emulation.
awgamer
Oldbie
 
Posts: 568
Joined: 2014-7-26 @ 07:42

Re: IBM Music Feature Card/Yamaha FB-01

Postby Scali » 2019-1-24 @ 18:28

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.
Scali
l33t
 
Posts: 4365
Joined: 2014-12-13 @ 14:24

Re: IBM Music Feature Card/Yamaha FB-01

Postby Stiletto » 2019-1-25 @ 23:22

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 ... ers/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_m ... tosearch=1
"I see a little silhouette-o of a man, Scaramouche, Scaramouche, will you
do the Fandango!" - Queen

Stiletto
User avatar
Stiletto
l33t
 
Posts: 4364
Joined: 2002-7-01 @ 21:57

Re: IBM Music Feature Card/Yamaha FB-01

Postby Scali » 2019-1-26 @ 19:17

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 ... ers/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.
Scali
l33t
 
Posts: 4365
Joined: 2014-12-13 @ 14:24

Re: IBM Music Feature Card/Yamaha FB-01

Postby crazyc » 2019-2-03 @ 13:44

I don't know if it works or not but the midi ports are connected. Here's some info on how to configure it https://forums.bannister.org/ubbthreads ... ber=100135
crazyc
Member
 
Posts: 143
Joined: 2013-2-02 @ 16:17

Re: IBM Music Feature Card/Yamaha FB-01

Postby awgamer » 2019-2-24 @ 23:09

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
43581262-fb67c3ca-9660-11e8-9b16-8f4b0789199c.png
awgamer
Oldbie
 
Posts: 568
Joined: 2014-7-26 @ 07:42

Re: IBM Music Feature Card/Yamaha FB-01

Postby Stiletto » 2019-2-25 @ 00:28

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
User avatar
Stiletto
l33t
 
Posts: 4364
Joined: 2002-7-01 @ 21:57

Re: IBM Music Feature Card/Yamaha FB-01

Postby awgamer » 2019-2-25 @ 02:01

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.
awgamer
Oldbie
 
Posts: 568
Joined: 2014-7-26 @ 07:42

Re: IBM Music Feature Card/Yamaha FB-01

Postby Scali » 2019-2-25 @ 08:19

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.
Scali
l33t
 
Posts: 4365
Joined: 2014-12-13 @ 14:24

Re: IBM Music Feature Card/Yamaha FB-01

Postby awgamer » 2019-2-25 @ 08:46

Project is only source code, probably better chance of compiling clean in linux. Curious how the output will compare to the real imfc you have along with the real fb-01.
awgamer
Oldbie
 
Posts: 568
Joined: 2014-7-26 @ 07:42

PreviousNext

Return to DOSBox Development

Who is online

Users browsing this forum: No registered users and 2 guests