VOGONS


First post, by crazii

User metadata
Rank Newbie
Rank
Newbie

I've read some basics about FM synth and MIDI here: What's the difference between “FM synthesis” and “MIDI synthesis”?
I'm not quite familiar with this, maybe I'm totally talking about bullshit but I hope this is doable:

Background:
Win98 with WDM driver (especially AC97) has SB emulation and General MIDI MPU-401 synth, that works for late DOS games like Warcraft2, Doom. But old DOS games don't have GM MPU-401 driver or no sound driver setup, but only FM synth driver, i.e. Skyroads.

So now I wonder if it is possible to write a win98 driver to capture the register instruction & Music data from SB/Adlib port (i.e. default 220, 388 etc) and redirect it to win98's GM MPU401?
It is not a soft FM synthesizer, just a protocol translation software.
If it could be done, it will make a huge difference, I think.🤣

Toshiba Satellite Pro 4300 - Yamaha YMF744
Toshiba Satellite 2805-S501 - Yamaha YMF754
IBM Thinkpad A21p - Crystal Semiconductor CS4624
main: Intel NUC11PHKi7C Phantom Canyon: i7-1165G7 RTX2060 64G 2T760PSDD

Reply 1 of 15, by cyclone3d

User metadata
Rank l33t++
Rank
l33t++

Shouldn't be that difficult. The base work has already been done:
MIDIto - relocate hardcoded port 330h to somewhere else

Yamaha YMF modified setupds and drivers
Yamaha XG resource repository - updated November 27, 2018
Yamaha YMF7x4 Guide
AW744L II - YMF744 - AOpen Cobra Sound Card - Install SB-Link Header

Reply 2 of 15, by Falcosoft

User metadata
Rank Oldbie
Rank
Oldbie
cyclone3d wrote on 2021-11-22, 06:25:

Shouldn't be that difficult. The base work has already been done:
MIDIto - relocate hardcoded port 330h to somewhere else

It's much more difficult. That Midi port forwarding tool has nothing to do with what OP asked. Skyroads and other games that use OPL/FM synth do not use Midi commands when they use port 220h/388h etc. but sends native OPL commands.These cannot be simply forwarded to a real Midi port (e.g. to 300h/330h) since Midi devices do not understand OPL commands.
OPL to Midi conversion is next to impossible. At best case you would get something that Ensoniq/Creative audio PCI cards tried to achieve (emulate OPL/FM synth through Wavetable synthesis) .That is horrible:
https://www.youtube.com/watch?v=3AZI07_qts8

Website, Facebook, Youtube
Falcosoft Midi Player + Munt VSTi + BassMidi VSTi topic

Reply 3 of 15, by root42

User metadata
Rank Oldbie
Rank
Oldbie

What would be much more feasible would be to incorporate an OPL2 emulator such as FMOPL (https://github.com/adplug/adplug/blob/master/src/fmopl.c) into a driver that intercepts writes to 0x388.

YouTube and Bonus
80486DX@33 MHz, 16 MiB RAM, Tseng ET4000 1 MiB, SnarkBarker & GUSar Lite, PC MIDI Card+X2+SC55+MT32, OSSC

Reply 4 of 15, by crazii

User metadata
Rank Newbie
Rank
Newbie
cyclone3d wrote on 2021-11-22, 06:25:

Shouldn't be that difficult. The base work has already been done:
MIDIto - relocate hardcoded port 330h to somewhere else

Thanks! Just read the post and it seems only a 'port remapping' TSR for DOS, but I believe except that the port is one obvious difference, the real hardwares(OPL/GM) have different registers with different meanings, i.e. writing 1 to port 220h is one command for hardware A, but maybe another command to hardware B, that's why different drivers are needed. On the other hand, if you just relocate MPU401 GM to port X, then that port X still be a MPU401 GM interface, Adlib or Soundblaster will fail. I'm not totally sure but it's an educated guess based on my knowledge about programming.

Toshiba Satellite Pro 4300 - Yamaha YMF744
Toshiba Satellite 2805-S501 - Yamaha YMF754
IBM Thinkpad A21p - Crystal Semiconductor CS4624
main: Intel NUC11PHKi7C Phantom Canyon: i7-1165G7 RTX2060 64G 2T760PSDD

Reply 5 of 15, by crazii

User metadata
Rank Newbie
Rank
Newbie
Falcosoft wrote on 2021-11-22, 08:19:
It's much more difficult. That Midi port forwarding tool has nothing to do with what OP asked. Skyroads and other games that us […]
Show full quote
cyclone3d wrote on 2021-11-22, 06:25:

Shouldn't be that difficult. The base work has already been done:
MIDIto - relocate hardcoded port 330h to somewhere else

It's much more difficult. That Midi port forwarding tool has nothing to do with what OP asked. Skyroads and other games that use OPL/FM synth do not use Midi commands when they use port 220h/388h etc. but sends native OPL commands.These cannot be simply forwarded to a real Midi port (e.g. to 300h/330h) since Midi devices do not understand OPL commands.
OPL to Midi conversion is next to impossible. At best case you would get something that Ensoniq/Creative audio PCI cards tried to achieve (emulate OPL/FM synth through Wavetable synthesis) .That is horrible:
https://www.youtube.com/watch?v=3AZI07_qts8

OKay, that really hurt my ears🤣. myabe a larger (8m) wavetable will help?

Toshiba Satellite Pro 4300 - Yamaha YMF744
Toshiba Satellite 2805-S501 - Yamaha YMF754
IBM Thinkpad A21p - Crystal Semiconductor CS4624
main: Intel NUC11PHKi7C Phantom Canyon: i7-1165G7 RTX2060 64G 2T760PSDD

Reply 6 of 15, by Falcosoft

User metadata
Rank Oldbie
Rank
Oldbie
crazii wrote on 2021-11-22, 09:09:

OKay, that really hurt my ears🤣. myabe a larger (8m) wavetable will help?

No. 😀
The problem is not the quality of the samples but the completely different methods of synthesis. FM synths are real programmable synthesizers. You cannot translate arbitrary FM generated sounds to fixed samples (whatever quality they are).
Samplers/Romplares/Wavetable synths are suitable for (GM) Midi since you know what kind of and how many instruments you have to implement beforehand. There are no such predefined instruments in case of OPL/FM synths. So the 'mapping' is not trivial at all.

Last edited by Falcosoft on 2021-11-22, 09:32. Edited 1 time in total.

Website, Facebook, Youtube
Falcosoft Midi Player + Munt VSTi + BassMidi VSTi topic

Reply 7 of 15, by crazii

User metadata
Rank Newbie
Rank
Newbie
root42 wrote on 2021-11-22, 08:42:

What would be much more feasible would be to incorporate an OPL2 emulator such as FMOPL (https://github.com/adplug/adplug/blob/master/src/fmopl.c) into a driver that intercepts writes to 0x388.

This code is a little familiar to me, I recall some SDL ported DOS games are using it.Maybe DOSBox is using it but I don't quite remember. If the CPU calculation is not intense, I think it will be a good option.

EDIT: Then it will be a soft FM synth driver. Now it seems that soft FM synth will be better.

Last edited by crazii on 2021-11-22, 09:40. Edited 1 time in total.

Toshiba Satellite Pro 4300 - Yamaha YMF744
Toshiba Satellite 2805-S501 - Yamaha YMF754
IBM Thinkpad A21p - Crystal Semiconductor CS4624
main: Intel NUC11PHKi7C Phantom Canyon: i7-1165G7 RTX2060 64G 2T760PSDD

Reply 8 of 15, by crazii

User metadata
Rank Newbie
Rank
Newbie
Falcosoft wrote on 2021-11-22, 09:20:
crazii wrote on 2021-11-22, 09:09:

OKay, that really hurt my ears🤣. myabe a larger (8m) wavetable will help?

No. 😀
The problem is not the quality of the samples but the completely different methods of synthesis. FM synths are real programmable synthesizers. You cannot translate arbitrary FM generated sounds to fixed samples (whatever quality they are).

Cool, new knowledge gotten. 😀

Toshiba Satellite Pro 4300 - Yamaha YMF744
Toshiba Satellite 2805-S501 - Yamaha YMF754
IBM Thinkpad A21p - Crystal Semiconductor CS4624
main: Intel NUC11PHKi7C Phantom Canyon: i7-1165G7 RTX2060 64G 2T760PSDD

Reply 9 of 15, by Falcosoft

User metadata
Rank Oldbie
Rank
Oldbie
root42 wrote on 2021-11-22, 08:42:

What would be much more feasible would be to incorporate an OPL2 emulator such as FMOPL (https://github.com/adplug/adplug/blob/master/src/fmopl.c) into a driver that intercepts writes to 0x388.

This is also open source now (Sound FX for Win 2000/XP):
http://www.softsystem.co.uk/products/soundfx.htm
Maybe it can be modified to work under Win9x when WDM drivers are used.

Website, Facebook, Youtube
Falcosoft Midi Player + Munt VSTi + BassMidi VSTi topic

Reply 10 of 15, by crazii

User metadata
Rank Newbie
Rank
Newbie
Falcosoft wrote on 2021-11-22, 09:40:
This is also open source now (Sound FX for Win 2000/XP): http://www.softsystem.co.uk/products/soundfx.htm Maybe it can be modifi […]
Show full quote
root42 wrote on 2021-11-22, 08:42:

What would be much more feasible would be to incorporate an OPL2 emulator such as FMOPL (https://github.com/adplug/adplug/blob/master/src/fmopl.c) into a driver that intercepts writes to 0x388.

This is also open source now (Sound FX for Win 2000/XP):
http://www.softsystem.co.uk/products/soundfx.htm
Maybe it can be modified to work under Win9x when WDM drivers are used.

Looks nice, unfortunately it only works on NT based system. Have you tried it? What's the difference from VDMSound (quality, performance, compatibility)?
Based on its driver nature I guess it's more convenient, but with less tunable options?

Toshiba Satellite Pro 4300 - Yamaha YMF744
Toshiba Satellite 2805-S501 - Yamaha YMF754
IBM Thinkpad A21p - Crystal Semiconductor CS4624
main: Intel NUC11PHKi7C Phantom Canyon: i7-1165G7 RTX2060 64G 2T760PSDD

Reply 11 of 15, by Falcosoft

User metadata
Rank Oldbie
Rank
Oldbie
crazii wrote on 2021-11-22, 11:16:
Falcosoft wrote on 2021-11-22, 09:40:
This is also open source now (Sound FX for Win 2000/XP): http://www.softsystem.co.uk/products/soundfx.htm Maybe it can be modifi […]
Show full quote
root42 wrote on 2021-11-22, 08:42:

What would be much more feasible would be to incorporate an OPL2 emulator such as FMOPL (https://github.com/adplug/adplug/blob/master/src/fmopl.c) into a driver that intercepts writes to 0x388.

This is also open source now (Sound FX for Win 2000/XP):
http://www.softsystem.co.uk/products/soundfx.htm
Maybe it can be modified to work under Win9x when WDM drivers are used.

Looks nice, unfortunately it only works on NT based system. Have you tried it? What's the difference from VDMSound (quality, performance, compatibility)?
Based on its driver nature I guess it's more convenient, but with less tunable options?

Honestly when I last used WDMSound it did not have OPL/FM emulation at all. I have just seen that OPL/FM emulation was added to last version. So I have just tested and the OPL/FM emulation seems to be more mature in SoundFX compared to last version of VDMSound (2.04).

Website, Facebook, Youtube
Falcosoft Midi Player + Munt VSTi + BassMidi VSTi topic

Reply 12 of 15, by crazii

User metadata
Rank Newbie
Rank
Newbie
Falcosoft wrote on 2021-11-22, 13:11:
crazii wrote on 2021-11-22, 11:16:
Falcosoft wrote on 2021-11-22, 09:40:

This is also open source now (Sound FX for Win 2000/XP):
http://www.softsystem.co.uk/products/soundfx.htm
Maybe it can be modified to work under Win9x when WDM drivers are used.

Looks nice, unfortunately it only works on NT based system. Have you tried it? What's the difference from VDMSound (quality, performance, compatibility)?
Based on its driver nature I guess it's more convenient, but with less tunable options?

Honestly when I last used WDMSound it did not have OPL/FM emulation at all. I have just seen that OPL/FM emulation was added to last version. So I have just tested and the OPL/FM emulation seems to be more mature in SoundFX compared to last version of VDMSound (2.04).

Same here, When I last use VDMSound that's 15y ago, when I was in college. A few days ago I checked the latest version and it has more features.

With the SoundFX source code I think it will be more easier to port it to win9x (mainly API & driver model adaption) than inventing another wheel using FMOPL source.
Maybe I would like to try it, I wish I have more spare time and energy and skill to do that.🤣

Toshiba Satellite Pro 4300 - Yamaha YMF744
Toshiba Satellite 2805-S501 - Yamaha YMF754
IBM Thinkpad A21p - Crystal Semiconductor CS4624
main: Intel NUC11PHKi7C Phantom Canyon: i7-1165G7 RTX2060 64G 2T760PSDD

Reply 13 of 15, by Plasma

User metadata
Rank Member
Rank
Member
crazii wrote on 2021-11-22, 05:58:
I've read some basics about FM synth and MIDI here: What's the difference between “FM synthesis” and “MIDI synthesis”? I'm not q […]
Show full quote

I've read some basics about FM synth and MIDI here: What's the difference between “FM synthesis” and “MIDI synthesis”?
I'm not quite familiar with this, maybe I'm totally talking about bullshit but I hope this is doable:

Background:
Win98 with WDM driver (especially AC97) has SB emulation and General MIDI MPU-401 synth, that works for late DOS games like Warcraft2, Doom. But old DOS games don't have GM MPU-401 driver or no sound driver setup, but only FM synth driver, i.e. Skyroads.

So now I wonder if it is possible to write a win98 driver to capture the register instruction & Music data from SB/Adlib port (i.e. default 220, 388 etc) and redirect it to win98's GM MPU401?
It is not a soft FM synthesizer, just a protocol translation software.
If it could be done, it will make a huge difference, I think.🤣

Ensoniq/Creative AudioPCI does exactly this and it sounds like absolute garbage. I had one back in the day and hated it.

Reply 14 of 15, by Falcosoft

User metadata
Rank Oldbie
Rank
Oldbie
crazii wrote on 2021-11-22, 13:28:

With the SoundFX source code I think it will be more easier to port it to win9x (mainly API & driver model adaption) than inventing another wheel using FMOPL source.
Maybe I would like to try it, I wish I have more spare time and energy and skill to do that.🤣

Since both Win98+ and WinXP can use WDM driver model it should not be that difficult E.g. you can use the same SB Live! WDM driver under both Win9x and WinXP.

Website, Facebook, Youtube
Falcosoft Midi Player + Munt VSTi + BassMidi VSTi topic

Reply 15 of 15, by cyclone3d

User metadata
Rank l33t++
Rank
l33t++
Falcosoft wrote on 2021-11-22, 08:19:
It's much more difficult. That Midi port forwarding tool has nothing to do with what OP asked. Skyroads and other games that us […]
Show full quote
cyclone3d wrote on 2021-11-22, 06:25:

Shouldn't be that difficult. The base work has already been done:
MIDIto - relocate hardcoded port 330h to somewhere else

It's much more difficult. That Midi port forwarding tool has nothing to do with what OP asked. Skyroads and other games that use OPL/FM synth do not use Midi commands when they use port 220h/388h etc. but sends native OPL commands.These cannot be simply forwarded to a real Midi port (e.g. to 300h/330h) since Midi devices do not understand OPL commands.
OPL to Midi conversion is next to impossible. At best case you would get something that Ensoniq/Creative audio PCI cards tried to achieve (emulate OPL/FM synth through Wavetable synthesis) .That is horrible:
https://www.youtube.com/watch?v=3AZI07_qts8

I was thinking of the opposite... using FM as a MIDI synth such as is built in in Windows 3.x and MIDIOX.

To get an acceptable OPL to MIDI implementation, it would probably be required to have a program that could re-ahead the music data and convert in real-time or have per-program profiles for the converter.

Edit:
It should be possible using DOSBOX with dro2midi and then adding in a layer that plays the resulting MIDI files realtime.

What would be sweet, is if the converter would have a way to automatically name the MIDI files so when the game is run again, it would auto detect if that song had already been converted and would then just play the MIDI file instead of converting it from scratch again.

Yamaha YMF modified setupds and drivers
Yamaha XG resource repository - updated November 27, 2018
Yamaha YMF7x4 Guide
AW744L II - YMF744 - AOpen Cobra Sound Card - Install SB-Link Header