Scali wrote on 2023-11-06, 10:41:You can use any individual FM channel as a pseudo-DAC in this way.
However, especially on the OPL2 the limiting factor is how qu […]
Show full quote
digger wrote on 2023-11-06, 10:24:
Does this take up all of the available "voices" of the FM synthesizer? Or is there a way to combine PCM sample output with FM music playback, albeit with fewer channels/voices? And are there any games that do that?
You can use any individual FM channel as a pseudo-DAC in this way.
However, especially on the OPL2 the limiting factor is how quickly you can write the volume commands to it. I worked out the limits of the OPL2 chip once, based on the timings, and I believe that 30 kHz was about the best you could get.
While it is possible in theory to reserve one channel as a DAC, and use the others for regular FM music, in practice you can only do that when you use relatively low sample rates (less than 15 kHz, to leave room for other commands), else there is no time to update the other channels between sample outputs.
I'm not sure if any software actually combines the two.
Interesting. Thanks for the info. 15 kHz would be fine, since most DOS games didn't have sound assets that were recorded at higher frequencies than 11 kHz anyway.
Only in MOD players would you want to have the highest possible sample frequency, and in such cases FM synthesis wouldn't be used for music anyway.
The OPL3 is much faster, so it can reach higher sample rates, and it would also be easier to combine sample output with FM channels.
Good point. Also, the OPL3 has twice as many FM channels, half of which went unused in games that only had OPL2-based FM music, which was the majority of games, right? So that would leave several channels available for this PCM trick alongside OPL2-compatible FM music playback.
Perhaps a version of ADLIPT and/or SBEMU could be developed that would combine OPL2-compatible FM playback with PCM output on an OPL3LPT. 🙂
Bondi wrote on 2023-11-06, 11:06:The games I could find that supported this trick. I believe some (all) of them were previously mentioned already.
- Sango Fighte […]
Show full quote
The games I could find that supported this trick. I believe some (all) of them were previously mentioned already.
- Sango Fighter (a new (version?)game from 2010)
- Stunt Driver
- Pinball fantasies
- F-15 Strike Eagle II
EDIT: - Fastdoom mod also supports FX sound via Adlib (with no music in the background, though)
The method itself is described here in all details https://github.com/leonardo-ono/Assembly8086P … dSoundAdlibOpl2
Thanks for the list, Bondi. Do you happen to know which of these also supported digital samples combined with FM music, using this method?
This would be an interesting case for viti95 to take a look at, maybe. 🙂