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 Davis » 2013-3-24 @ 08:58

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=PL ... 9zYL7F2Rlh
User avatar
Davis
Newbie
 
Posts: 25
Joined: 2006-8-29 @ 13:18
Location: Jakarta, Indonesia

Re: IBM Music Feature Card/Yamaha FB-01

Postby Mau1wurf1977 » 2013-3-24 @ 09:57

Very nice :)
User avatar
Mau1wurf1977
l33t++
 
Posts: 7652
Joined: 2010-8-27 @ 04:15
Location: Western Australia

Re: IBM Music Feature Card/Yamaha FB-01

Postby lchiocca » 2013-12-10 @ 14:45

@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?
lchiocca
Newbie
 
Posts: 17
Joined: 2006-9-17 @ 22:35

Re: IBM Music Feature Card/Yamaha FB-01

Postby Great Hierophant » 2013-12-10 @ 22:22

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
User avatar
Great Hierophant
l33t
 
Posts: 2398
Joined: 2003-4-27 @ 08:20

Re: IBM Music Feature Card/Yamaha FB-01

Postby Great Hierophant » 2014-4-14 @ 02:12

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
User avatar
Great Hierophant
l33t
 
Posts: 2398
Joined: 2003-4-27 @ 08:20

Re: IBM Music Feature Card/Yamaha FB-01

Postby sev7en » 2014-4-20 @ 04:17

Dear all,
it looks promising but about the audio quality, does it is better than MT-32?
sev7en
Newbie
 
Posts: 14
Joined: 2011-9-02 @ 12:42

Re: IBM Music Feature Card/Yamaha FB-01

Postby Scali » 2017-3-14 @ 12:43

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

Re: IBM Music Feature Card/Yamaha FB-01

Postby Scali » 2017-3-16 @ 23:43

Here is a very VERY preliminary version of IMFC support in DOSBox-X: https://www.dropbox.com/s/dlk84chf35jzr ... C.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 :)
Scali
l33t
 
Posts: 4364
Joined: 2014-12-13 @ 14:24

Re: IBM Music Feature Card/Yamaha FB-01

Postby ripsaw8080 » 2017-3-17 @ 03:00

Since DOSBox already supports the MPU-401 interface, why not simply use Sierra's FB-01 driver instead of their IMFC driver?
User avatar
ripsaw8080
DOSBox Author
 
Posts: 4403
Joined: 2006-4-25 @ 23:24

Re: IBM Music Feature Card/Yamaha FB-01

Postby Scali » 2017-3-17 @ 10:17

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

Re: IBM Music Feature Card/Yamaha FB-01

Postby ripsaw8080 » 2017-3-17 @ 14:21

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.
User avatar
ripsaw8080
DOSBox Author
 
Posts: 4403
Joined: 2006-4-25 @ 23:24

Re: IBM Music Feature Card/Yamaha FB-01

Postby Scali » 2017-3-17 @ 14:33

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 ... riced.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: viewtopic.php?f=32&t=9555&start=20#p145151
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.
Scali
l33t
 
Posts: 4364
Joined: 2014-12-13 @ 14:24

Re: IBM Music Feature Card/Yamaha FB-01

Postby ripsaw8080 » 2017-3-17 @ 14:56

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.
User avatar
ripsaw8080
DOSBox Author
 
Posts: 4403
Joined: 2006-4-25 @ 23:24

Re: IBM Music Feature Card/Yamaha FB-01

Postby Scali » 2017-3-17 @ 15:17

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

Re: IBM Music Feature Card/Yamaha FB-01

Postby Great Hierophant » 2017-3-18 @ 01:05

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/vfyy8dyyp ... limfc.flac

against this (Scali's DOSBox emulation) :
http://www.mediafire.com/file/8kj7yomet ... 3imfc.flac

A great start however!
http://nerdlypleasures.blogspot.com/ - Nerdly Pleasures - My Retro Gaming, Computing & Tech Blog
User avatar
Great Hierophant
l33t
 
Posts: 2398
Joined: 2003-4-27 @ 08:20

Re: IBM Music Feature Card/Yamaha FB-01

Postby ripsaw8080 » 2017-3-18 @ 04:11

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.
User avatar
ripsaw8080
DOSBox Author
 
Posts: 4403
Joined: 2006-4-25 @ 23:24

Re: IBM Music Feature Card/Yamaha FB-01

Postby awgamer » 2017-3-18 @ 07:50

On the first page of this thread there's the FB01KING.ZIP TSR for IMFC to appear as an FB-01.
awgamer
Oldbie
 
Posts: 568
Joined: 2014-7-26 @ 07:42

Re: IBM Music Feature Card/Yamaha FB-01

Postby Scali » 2017-3-18 @ 11:37

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

Re: IBM Music Feature Card/Yamaha FB-01

Postby Scali » 2017-3-18 @ 13:07

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

Re: IBM Music Feature Card/Yamaha FB-01

Postby Scali » 2017-3-18 @ 13:18

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

PreviousNext

Return to DOSBox Development

Who is online

Users browsing this forum: No registered users and 1 guest