VOGONS


IBM Music Feature Card/Yamaha FB-01

Topic actions

Reply 40 of 263, by Davis

User metadata
Rank Newbie
Rank
Newbie

Dear All,

First post here - after stalking around for years, I'd like to contribute!
I've recorded some tunes with Cloudschatze's modified dosbox build on a true FB-01. No issues, works like a charm.

http://www.youtube.com/playlist?list=PLwBf02p … LScwU9zYL7F2Rlh

Reply 42 of 263, by lchiocca

User metadata
Rank Newbie
Rank
Newbie

@Cloudschatze or @Davis: I've long been trying to get a dosbox with IMF emulation working. Since Davis was able to record the youtube videos, there must be a version available. The question is just: where?

Reply 43 of 263, by Great Hierophant

User metadata
Rank l33t
Rank
l33t
lchiocca wrote:

@Cloudschatze or @Davis: I've long been trying to get a dosbox with IMF emulation working. Since Davis was able to record the youtube videos, there must be a version available. The question is just: where?

There is no version of DOSBox with IMF emulation, Davis said he sent the MIDI data from DOSBox to a real FB-01 using Cloudschatze's modified DOSBox build.

http://nerdlypleasures.blogspot.com/ - Nerdly Pleasures - My Retro Gaming, Computing & Tech Blog

Reply 44 of 263, by Great Hierophant

User metadata
Rank l33t
Rank
l33t

If anyone cares, the variable that Cloudschatze identified in the previous page, SYSEX_SIZE, has been moved from midi.cpp to midi.h in the latest 0.74 SVN code.

http://nerdlypleasures.blogspot.com/ - Nerdly Pleasures - My Retro Gaming, Computing & Tech Blog

Reply 46 of 263, by Scali

User metadata
Rank l33t
Rank
l33t

I wonder how difficult it would be to at least add partial support for IMFC support to DOSBox.
If games mainly use it as a 'dumb/UART' device, then implementing its proprietary MIDI interface may just be handling two simple port writes.
I suppose I could create hooks for the respective ports in DOSBox and monitor what eg a Sierra game does to them.

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

Reply 47 of 263, by Scali

User metadata
Rank l33t
Rank
l33t

Here is a very VERY preliminary version of IMFC support in DOSBox-X: https://www.dropbox.com/s/dlk84chf35jzr2m/DOS … oxIMFC.zip?dl=0
It's a super-minimal version that I've only tested with Larry 3 so far, but basically it's enough to make the game detect the IMFC, and output MIDI data to it.
I then just write the raw MIDI data to the Windows MIDI Mapper, the same as MPU-401.
It seems to play the music. Now all we need is an FB-01 😀

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

Reply 49 of 263, by Scali

User metadata
Rank l33t
Rank
l33t
ripsaw8080 wrote:

Since DOSBox already supports the MPU-401 interface, why not simply use Sierra's FB-01 driver instead of their IMFC driver?

Well...
1) Not all Sierra games with support for the IMFC work with the FB-01 driver
2) There's also other software than Sierra, which may only have native IMFC support
3) The IMFC can also be used as a MIDI interface, so it could be connected to something other than the built-in FB-01
4) The IMFC is an awesome card, and needs to be emulated
5) We're already halfway there now

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

Reply 50 of 263, by ripsaw8080

User metadata
Rank DOSBox Author
Rank
DOSBox Author

I could understand IBM software supporting IMFC but neglecting FB-01, but Sierra had no incentive to do that when the music and patch maps apply equally to both. Maybe you have a copy of a game that lacks an FB-01 driver for whatever reason, but then it's usually just a matter of copying one in.

It would be great to have an external FB-01 emulation, which would of course be a big piece (surely more than half) of an IMFC emulation.

Reply 51 of 263, by Scali

User metadata
Rank l33t
Rank
l33t
ripsaw8080 wrote:

I could understand IBM software supporting IMFC but neglecting FB-01, but Sierra had no incentive to do that when the music and patch maps apply equally to both. Maybe you have a copy of a game that lacks an FB-01 driver for whatever reason, but then it's usually just a matter of copying one in.

That doesn't always work. Not to mention that even if they do, there are various versions of SCI interpreters and drivers around, and finding matching pairs can be difficult (often the games you find on Abandonware sites have been 'stripped' of drivers that people at some point considered 'unnecessary').
Great Hierophant made an overview of which games do or do not work with the FB-01 driver: http://nerdlypleasures.blogspot.nl/2015/02/th … overpriced.html

ripsaw8080 wrote:

It would be great to have an external FB-01 emulation, which would of course be a big piece (surely more than half) of an IMFC emulation.

Yes, but earlier in the thread, someone unearthed the sources for a Virtual FB-01: IBM Music Feature Card/Yamaha FB-01
It appears to include MIDI interpretation and an OPL emulator based on the YM2151 code from MAME (the YM2164 in the FB-01 and IMFC should be functionally equivalent).
In theory it should just be a case of taking the small patch I did to DOSBox to implement the IMFC MIDI interface, tie the MIDI data to the virtual FB-01, make the emulated FB-01 audio stream go out to the native hardware, and we're there.

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

Reply 52 of 263, by ripsaw8080

User metadata
Rank DOSBox Author
Rank
DOSBox Author

I'd like to see an external FB-01 emulation with MIDI input as a first step, much like MUNT. However, if the IMFC emulation you wish for is to be internal then you'll probably need to look at associating the FB-01 emulation's sound generation with a DOSBox mixer callback, for which I suppose the MUNT integration patch could be a useful example.

Reply 53 of 263, by Scali

User metadata
Rank l33t
Rank
l33t
ripsaw8080 wrote:

I'd like to see an external FB-01 emulation with MIDI input as a first step, much like MUNT.

Yea, that was my first idea as well... I'm thinking of 'gutting' the MUNT Win32 driver code, and putting the Virtual FB-01 in there instead.
That way it can double as a virtual FB-01 device, and connect to DOSBox via the IMFC MIDI interface I already have redirecting to the MIDI mapper.

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

Reply 54 of 263, by Great Hierophant

User metadata
Rank l33t
Rank
l33t

Hi Scali,

A very good first attempt, I hear music from the IMF.DRV and my FB-01. Unfortunately there are a couple of problems.

1st, the patches have a difficult time transmitting correctly in DOSBox, regardless of version. Ripsaw8080 made a patch for FB01.DRV, but not IMF.DRV, that allows successful patch transfers from DOSBox to the FB-01 via a USB. Every game has IMF/FB-01 patches, so to get a successful patch transfer, I have to transfer the patches via FB01.DRV and another version of DOSBox, then go back to yours to run the game. But this assumes that there is an FB01.DRV that works with the game, and not all games have an FB01 driver.

2nd, sounds are often, but not always, incorrect. Here is a recording of a real IMF vs. the emulated IMF. Note that there are percussion sounds heard with the IMF.DRV that are not transmitted via FB01.DRV.

Compare this (real IMF in a 486) :
http://www.mediafire.com/file/vfyy8dyyp6atals … l3realimfc.flac

against this (Scali's DOSBox emulation) :
http://www.mediafire.com/file/8kj7yomets7vyd4/lsl3imfc.flac

A great start however!

http://nerdlypleasures.blogspot.com/ - Nerdly Pleasures - My Retro Gaming, Computing & Tech Blog

Reply 55 of 263, by ripsaw8080

User metadata
Rank DOSBox Author
Rank
DOSBox Author

The fixed FB-01 driver is not specific to DOSBox; it corrects a bug that affects all systems, although the bad behavior can vary depending on the contents of memory. However, the IMFC driver does not appear to have the same bug.

BTW, Sierra writes the FB-01 patches as two large sysex messages, and a current source (or appropriately patched) build of DOSBox is needed to accomodate the large messages.

Reply 57 of 263, by Scali

User metadata
Rank l33t
Rank
l33t
ripsaw8080 wrote:

BTW, Sierra writes the FB-01 patches as two large sysex messages, and a current source (or appropriately patched) build of DOSBox is needed to accomodate the large messages.

Yes, I saw that somewhere, the buffer was set to 1024 bytes, while the FB-01 can take up to ~6k for certain SysEx messages.
I'll have to check the sources I built from.
Other than that, could the speed be an issue?
I read somewhere that early MT-32 devices can't handle fast MIDI transfers (as in the maximum speed that the MIDI standard supports), so pauses need to be inserted.
Could the FB-01 suffer from that as well?

In other news, I managed to compile the VFB-01 sources in Visual Studio 2017. Sadly, Munt uses Qt, and I can't get that to work on my PC. So I can't easily merge the two.
For now I may have to just make some kind of 'stub' to send it MIDI data, and send the output buffer back to waveOutWrite(). Then someone else would need to help to integrate it in some way.

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

Reply 58 of 263, by Scali

User metadata
Rank l33t
Rank
l33t
Scali wrote:

Yes, I saw that somewhere, the buffer was set to 1024 bytes, while the FB-01 can take up to ~6k for certain SysEx messages.
I'll have to check the sources I built from.

Yes, the code I'm using is somewhat outdated, and it still had the 1024 byte buffer.
I changed it to 8192 as per Cloudschatze's mod earlier in this thread, and re-built it: https://www.dropbox.com/s/dlk84chf35jzr2m/DOS … oxIMFC.zip?dl=0
I also use VS2017 now, so you may have to install the C++ redist for that, if this build doesn't work on your system.

The emulation is now also slightly more complete, enough to make the Voice Librarian tool detect the IMFC and run.
I got somewhat further with Playrec and its KAPI driver as well... but they start to program the timer now, and expect interrupts.
So I'd have to do a complete 8253 implementation for that, before it can take the next step. I think that is less interesting at this point than getting an FB-01 emulator working.

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

Reply 59 of 263, by Scali

User metadata
Rank l33t
Rank
l33t
Great Hierophant wrote:

2nd, sounds are often, but not always, incorrect. Here is a recording of a real IMF vs. the emulated IMF. Note that there are percussion sounds heard with the IMF.DRV that are not transmitted via FB01.DRV.

I'm not sure what you mean here. You mean the percussion sounds aren't transmitted at all when you use the FB-01 driver? Not even when you play it via an MPU-401 interface? So it always sounds different with the FB-01 than with the IMF driver?
Or did you just mean that it doesn't work when using the FB-01 unit with my IMFC driver, while it does work when using the FB-01 unit via MPU-401?

I don't do anything special to interpret any midi signals, channels, programs or anything. So I would expect that the game just sends the percussion notes to the unit (you might be able to tell if you were to record the data from the MIDI out, either via the DOSBox logging functionality, or by connecting a sequencer to the midi out).
In which case the percussion voices would just not be initialized properly, so although the notes are played, you're not hearing anything.

Great Hierophant wrote:

A great start however!

Yea, I'm surprised we got this far in such a short time 😀
Thanks for the help so far.
But the devil is in the details I suppose.

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