VOGONS


DOSbox Adlib sound regression?

Topic actions

Reply 20 of 46, by jal

User metadata
Rank Oldbie
Rank
Oldbie
HunterZ wrote:

The OPLx chips were FM synthesis chips made by Yamaha. Variants can also be found in old arcade machines and video game consoles (I think the Sega Genesis uses an OPL4). I don't know what OPL stands for (Google would probably know!)

OPL stands for "(FM) Operator Type L". I think only the Japanese at Yamaha know what type "L" means. There also used to be a type "N", "LL", "L2" etc.

HunterZ wrote:

The Sound Blaster, SB 2.0, and Adlib all used an OPL2, which was used in many old games to produce music.

Many of the Yamaha chips were used in all kinds of home computers like Atari and MSX, and in many game consoles. An interesting overview can be found at:

http://members.chello.nl/h.otten/vortexion.htm

HunterZ wrote:

The SB 16 had an OPL3 chip, which was a single chip capable of producing stereo music - although apparently in a different enough way from the SB Pro that games using stereo music had to specifically support it.

The problem with the "stereo" was that per channel you could only choose between left, right and center, so real panning was impossible.

HunterZ wrote:

About CMS: (...) Definitely and improvment over the PC internal speaker, but not as good as the Adlib! For example, it doesn't seem to be able to do percussion sounds (which the OPL chips are actually decent at)

The CMS was basically a multi channel PC speaker. Really nasty sounds 😀.

HunterZ wrote:

EDIT: I'm also pretty sure that the SB 2.0 that was my first sound card had a socket and jumper for a CMS chip, but I never saw CMS chips for sale anywhere. I was always curious about how they sounded (until yesterday 😀)

They were on sale at least here in the Netherlands, a friend of mine actually bought them and installed them on his SB2. Some of the older games had GameBlaster support, but no AdLib/SB support.

JAL

Reply 21 of 46, by jal

User metadata
Rank Oldbie
Rank
Oldbie
Snover wrote:

AdLib cards have a severe problem if data is sent to them too quickly. CMS cards have a severe problem if data is sent to them too slowly. (The second is conjecture, the first is fact; AdLib cards freaked out if they were given data too fast; this is a major cause of headache for many games; as computers got faster AdLib changed their programming guide to have the programmers add wait operations.)

Well, "freaking out" isn't the right term. When data was fed to fast to the AdLib, the chip just didn't get (all of) the data send to it. Of course this could result in funny sound, but I never actually encountered a game with these problems. The "headache" didn't exist either: the trick (specified in the official programming manual I think, but also reverse-engineerable from the SOUND.COM driver) was to do a small series of "in" instructions (6) after address select, and a large series of "in"s after data set (35 or so). Since these ins were directed at the ISA bus, which runs at a standard speed, such a series caused a constant delay, even at, for that time, very fast PCs like 386s at 20MHz.

JAL

Reply 22 of 46, by jez

User metadata
Rank Member
Rank
Member

jal: About the Sound Blaster in SC2000 - I know SB had the ability to play digitized sounds - that's not what I'm talking about. I use the SB setting, of course, fordigitized sound effects in SC2000, it's the 'music source' setting that's interesting.

As an example of what I mean, here's some samples from different music source settings:
Ad Lib: http://www.game-point.net/misc/sc2000/adlib.wav
Sound Blaster: http://www.game-point.net/misc/sc2000/sb.wav
Sound Blaster 16: http://www.game-point.net/misc/sc2000/sb16.wav
Sound Blaster Pro 2: http://www.game-point.net/misc/sc2000/sbp2.wav
Sound Blaster Pro 1: http://www.game-point.net/misc/sc2000/sbp1.wav

I think Ad Lib and SB sound identical (OPL2?), SB16 and SBP2 sound identical (OPL3?), ironically worse than the first two, IMHO - but what's happening with SBP1? It sounds awful, nearly no high pitched melody. Could it be using some stereo feature of dualOPL2 where the melody is being played out of a speaker that isn't being emulated? Dunno.

jal wrote:

Well, "freaking out" isn't the right term. When data was fed to fast to the AdLib, the chip just didn't get (all of) the data send to it. Of course this could result in funny sound, but I never actually encountered a game with these problems.

Heh, try running Prince of Persia 1 at a high speed - you won't get any Adlib sound at all.

== Jez ==

Reply 23 of 46, by gulikoza

User metadata
Rank Oldbie
Rank
Oldbie
HunterZ wrote:

The OPL chips stopped appearing on Creative cards with the AWE series, which use a sample-based synthesizer (just like all modern hardware and software MIDI synthesizers for the PC).

I'm sorry to nitpick, but I'm pretty sure AWE32 had OPL3. Infact AWE32 was SB16 + EMU8K wavetable chip. Not sure about AWE64 though...that card was a bit strange (or I never took a good look at it) - most of the advertised wavetable (supposedly sounding better than AWE32) was just software synthesizer which you could run with any card if you had the AWE64 CD. But the hardware was still SB16 compatible so it had to have OPL3. It was the newer PCI cards (SB128 and on) that were without OPL chips and had software SB16 compatibility only (via emulation).

Reply 24 of 46, by robertmo

User metadata
Rank l33t++
Rank
l33t++

I suppose you have recorded all this wavs with dosbox set to oplmode=opl3

adlib and sb seems to be just less louder than sbpro2 and sb16
sbpro1 seems to be played on opl3 setting (opl3 i think is not compatible with dualopl2 and that's why it is mono) you should play it with oplmode=dualopl2.

Actually you should record all this files with adequate oplmode set in dosbox 😀

Reply 25 of 46, by Snover

User metadata
Rank l33t++
Rank
l33t++

I've got an AWE64 in my hand right now and it has no Yamaha chips.
The most obvious chips are (sorted from largest to smallest):
Creative CT8903-DAQ
Creative CT1745A-TBP
EMU EMU8011-01/CT1972-NAS
NPN NN514265J-60
HY534256ALJ-60
Philips TDA1517P

Yes, it’s my fault.

Reply 26 of 46, by robertmo

User metadata
Rank l33t++
Rank
l33t++

jal: what was SOUND.COM made for? was it used or required by any game? (i have V.1.51 of the driver but couldn't find any use for it)

Reply 27 of 46, by gulikoza

User metadata
Rank Oldbie
Rank
Oldbie

Well...google does wonders 😁

"The boards from 1996 on didn´t use Yamaha chips for OPL2/3 anymore because this functionality had been integrated into the CL chipset (but poorly)." So...AWE32 has an OPL chip, AWE64 does not.

Reply 28 of 46, by jez

User metadata
Rank Member
Rank
Member
robertmo wrote:
I suppose you have recorded all this wavs with dosbox set to oplmode=opl3 […]
Show full quote

I suppose you have recorded all this wavs with dosbox set to oplmode=opl3

adlib and sb seems to be just less louder than sbpro2 and sb16
sbpro1 seems to be played on opl3 setting (opl3 i think is not compatible with dualopl2 and that's why it is mono) you should play it with oplmode=dualopl2.

Actually you should record all this files with adequate oplmode set in dosbox 😀

It's true, it was set to OPL3 for all the recordings, but the point is I don't actually know WHAT SC2000 is trying to use. 😀 The point of my post is that I don't know why all those different sound cards are specified; I thought the only real differences were Adlib, Adlob Gold (OPL3) and dualOPL2, whatever supported that. The long list of soundcards for music is weird.

== Jez ==

Reply 29 of 46, by wd

User metadata
Rank DOSBox Author
Rank
DOSBox Author

> but the point is I don't actually know WHAT SC2000 is trying to use

Maybe because people know what soundcard is in their pc
but not what chips that thing uses?
You could debug the sc2000 setup to see how many paths
there are after the selection.

wd

Reply 30 of 46, by jal

User metadata
Rank Oldbie
Rank
Oldbie
robertmo wrote:

jal: what was SOUND.COM made for? was it used or required by any game? (i have V.1.51 of the driver but couldn't find any use for it)

SOUND.COM provided a kind of API that was made for software developers that wanted to easily support the AdLib. The only programs I know that use it are the AdLib music composers and instrument maker tools, and the only game I know is Rick Dangerous 2. Since programming information for the OPL2 was freely available (and for SOUND.COM was not, you probably had to buy a license), almost all games use their own driver.

JAL

Last edited by jal on 2004-12-08, 11:04. Edited 1 time in total.

Reply 31 of 46, by jal

User metadata
Rank Oldbie
Rank
Oldbie
jez wrote:

Heh, try running Prince of Persia 1 at a high speed - you won't get any Adlib sound at all.

You mean inside DOSbox? DOSbox doesn't emulate hardware on a timing level, I think, so that might be an interaction between DOSbox and the AdLib emulation (which is taken from Mame).

JAL

Reply 32 of 46, by jez

User metadata
Rank Member
Rank
Member

By the way, I've had a go at rewriting the DOSbox wiki article on Adlib here http://dosbox.sourceforge.net/wiki/index.php?page=Adlib. Think it's ok, the only thing I'm slightly confused about is, why is CMS not in a seperate setting from oplmode? I thought CMS was *not* OPL, and hence not Adlib-compatible? Surely there should be a seperate cmsmode=(cms,none) setting? Why lump CMS in with OPL which is, as far as I can see, a completely seperate technology?

Oh, and also, what should I put for the 'Add document to category' setting? Is there some list of categories anywhere? And should this article be linked from other pages on the wiki?

== Jez ==

Reply 33 of 46, by MiniMax

User metadata
Rank Moderator
Rank
Moderator

@jez: Thanks for editing the Adlib page. The Category setting is not really used at the moment, so just forget about it. About the linking: I think it is already linked in a couple of places. If you click on the generated page title (Adlib - uppermost left corner), the Wiki-server will generate a reverse-link page.

DOSBox 60 seconds guide | How to ask questions
_________________
Lenovo M58p | Core 2 Quad Q8400 @ 2.66 GHz | Radeon R7 240 | LG HL-DT-ST DVDRAM GH40N | Fedora 32

Reply 34 of 46, by HunterZ

User metadata
Rank l33t++
Rank
l33t++

I think CMS is usually mentioned in the same breath as Adlib/OPL is that they use very similar interfaces between the computer and sound card. You actually can't have a sound card with both a CMS and OPL chip on it (unless, like some old Creative cards, it has a jumper letting you choose which to use) because software talks to them via the same ports.

That's just my impression of things - I really don't know much about the CMS/Game Blaster that hasn't already been mentioned in this thread.

Reply 35 of 46, by jal

User metadata
Rank Oldbie
Rank
Oldbie
HunterZ wrote:

I think CMS is usually mentioned in the same breath as Adlib/OPL is that they use very similar interfaces between the computer and sound card. You actually can't have a sound card with both a CMS and OPL chip on it (unless, like some old Creative cards, it has a jumper letting you choose which to use) because software talks to them via the same ports.

That's just my impression of things - I really don't know much about the CMS/Game Blaster that hasn't already been mentioned in this thread.

Don't you love when your impressions are wrong? 😀 Yes, there's a jumper on the SB 1.0 card, but that's to activate the CMS chips, if you happen to have them. Once enabled, the SB 1.0 is GameBlaster compatible. The GameBlaster's ports are 2x1 through 2x3, and I bet you always wondered why the SB's ports start at 2x4? Well, that's why.

Imho, "oplmode=cms" is both functionally and technically wrong: functionally since cms is no variety of opl, and technically because it disallows the use of cms and opl2 at the same time, a combination that, although I'm not aware of any program ever using it, is possible when having an SB 1.0 with CMS chips installed.

JAL

Reply 36 of 46, by Qbix

User metadata
Rank DOSBox Author
Rank
DOSBox Author

as there are many discussions about it.

I will post the code that determines which and what gets activated.

        const char * omode=section->Get_string("oplmode");
Bitu oplrate=section->Get_int("oplrate");
OPL_Mode opl_mode;
if (!strcasecmp(omode,"none")) opl_mode=OPL_none;
else if (!strcasecmp(omode,"cms")) opl_mode=OPL_cms;
else if (!strcasecmp(omode,"opl2")) opl_mode=OPL_opl2;
else if (!strcasecmp(omode,"dualopl2")) opl_mode=OPL_dualopl2;
else if (!strcasecmp(omode,"opl3")) opl_mode=OPL_opl3;
/* Else assume auto */
else {
switch (sb.type) {
case SBT_NONE:opl_mode=OPL_none;break;
case SBT_1:opl_mode=OPL_opl2;break;
case SBT_2:opl_mode=OPL_opl2;break;
case SBT_PRO1:opl_mode=OPL_dualopl2;break;
case SBT_PRO2:
case SBT_16:
opl_mode=OPL_opl3;break;
}
}
switch (opl_mode) {
case OPL_none:
IO_RegisterWriteHandler(0x388,adlib_gusforward,IO_MB);
break;
case OPL_cms:
IO_RegisterWriteHandler(0x388,adlib_gusforward,IO_MB);
CMS_Init(section,sb.hw.base,oplrate);
break;
case OPL_opl2:
CMS_Init(section,sb.hw.base,oplrate);
case OPL_dualopl2:
case OPL_opl3:
OPL_Init(section,sb.hw.base,opl_mode,oplrate);
break;
}

When you read the code you will notice at the last switch that if you have OPL_opl2: then CMS is active as welll.
It's off when you have dualopl2 or opl3
so that is' sbpro and upwards in dosbox"

CMS on when you soundblaster 1 or soundblaster 2

Enjoy this knowlegde

Water flows down the stream
How to ask questions the smart way!

Reply 37 of 46, by jal

User metadata
Rank Oldbie
Rank
Oldbie
Qbix wrote:
as there are many discussions about it. I will post the code that determines which and what gets activated. (...) Enjoy this kno […]
Show full quote

as there are many discussions about it.
I will post the code that determines which and what gets activated.
(...)
Enjoy this knowlegde

Thanx Qbix, at least technically it's not wrong. I still think it's functionally wrong though 😉.

JAL

Reply 38 of 46, by jez

User metadata
Rank Member
Rank
Member

Qbix: Which finally explains the bizarre behaviour whereby, when you set SB mode to sb1 or sb2, you get CMS with PoP1 at 8000 cycles and Adlib at 3000 cycles, but other SB settings only give you the Adlib at 3000 cycles and nothing at 8000. 😀 However, don't you think it'd be a bit nicer to somehow clarify this in the settings, putting in a cmsmode= setting or some comment that notes this? Or is the dosbox philosophy that people should have to read through a few hundred posts in the forums to understand what turns out to be a relatively simple issue?

Alternatively, I've just thought of a better idea. Provide links to URLs that explain the config file in much more detail, at relevant places. Here's perhaps one to place for the sblaster section:
http://dosbox.sourceforge.net/wiki/index.php?page=Adlib

Or the SoundBlaster article could be developed, and the .conf comment linked to that Wiki page.

Well, it's more user-friendly than not bothering!!

== Jez ==

Reply 39 of 46, by robertmo

User metadata
Rank l33t++
Rank
l33t++
jal wrote:

SOUND.COM provided a kind of API that was made for software developers that wanted to easily support the AdLib. The only programs I know that use it are the AdLib music composers and instrument maker tools, and the only game I know is Rick Dangerous 2. Since programming information for the OPL2 was freely available (and for SOUND.COM was not, you probably had to buy a license), almost all games use their own driver.

Another game that uses adlib's sound.com is The Punisher (it also needs a specified buffer size to play all the sounds)
Re: The Punisher: Sound Problems