VOGONS


DOSbox Adlib sound regression?

Topic actions

First post, by jez

User metadata
Rank Member
Rank
Member

I think I may have noticed a regression in DOSbox. In Prince of Persia 1, my preferred combination for sound is Adlib for music and SoundBlaster for sound.

Let me state now that this issue really confuses me. I've always had trouble understanding WTF Adlib is, and any offers of clarity on this issue would be appreciated. Is it a unique soundcard, another name for the OPL chips, or something piggybacking on SoundBlaster sound cards that offered FM synthesis? 😕 So I'm apologising in advance for this rather long-winded explanation that would probably be a lot shorter if I understood it.

Anyway, in 0.61, the relevant section of my DOSBox.conf looks like this:

# sblaster -- Enable the soundblaster emulation.
# base,irq,dma -- The IO/IRQ/DMA address of the soundblaster.
# sbrate -- Sample rate of soundblaster emulation.
# adlib -- Enable the adlib emulation.
# adlibrate -- Sample rate of adlib emulation.
# cms -- Enable the Creative Music System/Gameblaster emulation.
# Enabling both the adlib and cms might give conflicts!
# cmsrate -- Sample rate of cms emulation.

sblaster=true
base=220
irq=7
dma=1
sbrate=22050
adlib=true
adlibrate=22050
adlibmode=adlib
cms=false
cmsrate=22050

'Adlib' is enabled, as is SoundBlaster. Unfortunately, this issue is also muddied by the fact that the word 'Adlib' was removed from DOSBox.conf in version 0.62. I've seen people previously claiming that 'Adlib' is the same thing as OPL, but I have no clue. As I said, clarification of this would be appreciated. If OPL is indeed the same thing as 'Adlib', It'd be nice to have a line of comment in the .conf file saying something along those lines; game setups don't tend to ask you whether you want to use OPL sound; rather Adlib sound.

The SET BLASTER env string in my 0.61 setup when the above config file is used has an argument T4, suggesting that it is emulating a Sound Blaster Pro 2.0 (which I believe has an OPL3 chip). Thus, I tried to achieve an identical setup with DOSBox 0.62 (even though I'm not sure what's going on with Adlib), and my .conf file looked like this:

# type -- Type of sblaster to emulate:none,sb1,sb2,sbpro1,sbpro2,sb16.
# base,irq,dma,hdma -- The IO/IRQ/DMA/High DMA address of the soundblaster.
# mixer -- Allow the soundblaster mixer to modify the dosbox mixer.
# oplmode -- Type of OPL emulation: auto,cms,opl2,dualopl2,opl3.
# On auto the mode is determined by sblaster type.
# oplrate -- Sample rate of OPL music emulation.

type=sbpro2
base=220
irq=7
dma=1
hdma=5
mixer=true
oplmode=auto
oplrate=22050

This produced an identical SET BLASTER env string to my 0.61 setup. Note that in both cases, all other things were identical. Core, frameskip, cycles, GUS emulation disabled, etc. It was just the SoundBlaster section that was different.

Anyway, this is where the problem is - with 0.61, Prince of Persia seems to be fine using Adlib for the music and SoundBlaster for the sound. However, with the setup in 0.62, I get no music. Just the sound. I have also tried the same thing with 0.63, as well as changing 'type' to all types of SB, but with no luck - I never get the Adlib sound and SoundBlaster FX that I got under 0.61. Is this a regression? Seems so to me.

Note that I am not using the version of PoP1 that has a setup.exe, it 'auto detects' sound setup. Yes, I've tried 'prince sblaster' and 'prince adlib', neither achieve my desired combination of Adlib sound with SB FX. I know PoP1 is a bit fussy in the way it accesses the sound, but I can get it to work in DOSBox 0.61 and I'd like to get it working the same way in later versions of DOSBox.

Comments/advice? 😀

== Jez ==

Reply 1 of 46, by Jiri

User metadata
Rank Member
Rank
Member

Try to lower the cycles. I have music with 0.62 / 0.63 only up to 4200 cycles. (You must have low cycles before starting the game, decreasing during playing will not help.)

Last edited by Jiri on 2004-12-05, 03:19. Edited 1 time in total.

Reply 2 of 46, by Snover

User metadata
Rank l33t++
Rank
l33t++

Sorry, yes, this can be understandably confusing if you don't understand all the OPL jazz.

oplmode when 'auto' is chosen depending on the type of Sound Blaster specified.
sb1,sb2 = opl2 (AdLib)
sbpro1 = dualopl2 (IIRC, this may be wrong)
sbpro2,sb16 = opl3 (AdLib Gold?)
All OPL are "AdLib" (actually it's the other way around; AdLib really just means FM synthesis), except 'cms' which is Creative Music System.

Try forcing 'oplmode' to something else.

Yes, it’s my fault.

Reply 3 of 46, by jez

User metadata
Rank Member
Rank
Member
Jiri wrote:

Try to lower the cycles. I have music with 0.62 / 0.63 only up to 4200 cycles. (You must have low cycles before starting the game, decreasing during playing will not help.)

Well I'll be. Lower CPU cycles to 3000, and the sound works fine. 😀 There must be some weird, crappy way PoP1 initializes the sound that relies on a really slow computer.

I'm still a bit confused by the 'Adlib' issue though. Why do I actually get a different kind of (non-PC speaker) music when I run prince, with OPL2 emulation, at 8000 cycles, and 3000 cycles? At 3000, I get the music I remember, which seems to be standard Adlib. But at 8000, there's this weird music in a higher key - what on Earth is that? Try it and see. 😀

So any OPL apart from CMS is Adlib? Then I have a few questions. Why does almost every game setup that uses OPL say that it's Adlib? And why was there a soundcard released called an 'Adlib Gold'? Did it just have an OPL chip in it and nothing else? Isn't that obsolete compared to the SoundBlaster, which supported OPL *and* SB sound effects?

In addition, where do I submit an RFE? Please put a comment line in the .conf file of the next DOSBox version clarifying that where a game/program specifies 'Adlib', it means any OPL other than CMS - as Snover said, this issue is confusing and there seems to be little to no documentation about it that I can find online.

== Jez ==

Reply 4 of 46, by eL_PuSHeR

User metadata
Rank l33t++
Rank
l33t++

ADLIB cards were one of the first ones featuring FM Synthesis to produce sound (mostly using OPL chips developed by Yamaha). When ADLIB came out, it used a Yamaha OPL-2 chip (which had just mono capabilities for FM music, I think). Later (and modern) cards like the ADLIB GOLD you mention (and newer SoundBlaster cards, -SBPRO2 and above-) used a newer Yamaha chip known as the OPL3, that featured FM STEREO music using two independent channels.

Reply 5 of 46, by jez

User metadata
Rank Member
Rank
Member
eL_PuSHeR wrote:

ADLIB cards were one of the first ones featuring FM Synthesis to produce sound (mostly using OPL chips developed by Yamaha). When ADLIB came out, it used a Yamaha OPL-2 chip (which had just mono capabilities for FM music, I think). Later (and modern) cards like the ADLIB GOLD you mention (and newer SoundBlaster cards, -SBPRO2 and above-) used a newer Yamaha chip known as the OPL3, that featured FM STEREO music using two independent channels.

So are you saying the Adlib and Adlib Gold cards were rendered 100% obsolete by the SoundBlaster cards, or did they have some kind of sound support that the SoundBlasters did not?

== Jez ==

Reply 6 of 46, by eL_PuSHeR

User metadata
Rank l33t++
Rank
l33t++

Sound blaster cards took the market by storm and buried the then obsolete ADLIB cards (which were older and had less capabilities). Anyway, ADLIB gold was a fairly decent card but came out too late and didn't catch up with market status.

Reply 7 of 46, by MiniMax

User metadata
Rank Moderator
Rank
Moderator

So jez, with your new-found knowledge, how about rewriting it into a nice summary for the rest of us?

Perhaps by starting here:
http://dosbox.sourceforge.net/wiki/index.php?page=Adlib

Instructions here:
http://dosbox.sourceforge.net/wiki/index.php?page=Sandbox

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 8 of 46, by robertmo

User metadata
Rank l33t++
Rank
l33t++
jez wrote:

I'm still a bit confused by the 'Adlib' issue though. Why do I actually get a different kind of (non-PC speaker) music when I run prince, with OPL2 emulation, at 8000 cycles, and 3000 cycles? At 3000, I get the music I remember, which seems to be standard Adlib. But at 8000, there's this weird music in a higher key - what on Earth is that? Try it and see. 😀

sb1 and sb2 had both opl2 and cms. That's why opl2 setting in dosbox has both too. You hear cms with 8000 cycles.

you can read about sound cards here
http://www.crossfire-designs.de/index.php?lan … icle=soundcards

Reply 10 of 46, by jez

User metadata
Rank Member
Rank
Member

Robertmo:
By the way, thanks for that link - fascinating, especially being able to directly listen to samples from all the different cards and eras of PC sound development. 😀 However my above two questions still stand; it appears PoP1 is exhibiting some very weird behaviour.

== Jez ==

Reply 11 of 46, by jez

User metadata
Rank Member
Rank
Member

Sorry to keep adding to this thread, but I've yet more questions after investigating sound in Simcity 2000. Why does the installer program give me a choice for music between AdLib, Sound Blaster, Sound Blaster Pro and Sound Blaster 16? Aren't these *all* either OPL2 or OPL3? Also, why does the music sound different (and better, in my opinion) when I choose AdLib for the music source, as opposed to Sound Blaster 16? If SB16 music is just OPL3, it shouldn't sound different to AdLib... should it? *shakes head*

== Jez ==

Reply 12 of 46, by robertmo

User metadata
Rank l33t++
Rank
l33t++
jez wrote:

But when I force OPL mode to cms, I don't get any music from PoP1...?

You do something wrong? Cause i hear cms music with 8000 cycles when i set
oplmode=cms
are you sure you use dosbox 0.63 and configure everything right?

The game somehow doesn't detect FM card when cycles are too high, but it detects other cards: pc speaker and cms. so it choose the best of those - cms.

Reply 13 of 46, by jez

User metadata
Rank Member
Rank
Member
robertmo wrote:

You do something wrong? Cause i hear cms music with 8000 cycles when i set
oplmode=cms
are you sure you use dosbox 0.63 and configure everything right?

Ah yes, it works with CMS now.

robertmo wrote:

The game somehow doesn't detect FM card when cycles are too high, but it detects other cards: pc speaker and cms. so it choose the best of those - cms.

Yes, so this is the weirdness going on with PoP1. Not detecting an FM card when the machine is too fast. Hmm.

== Jez ==

Reply 14 of 46, by Jiri

User metadata
Rank Member
Rank
Member
jez wrote:

Yes, so this is the weirdness going on with PoP1.

Yes, it is. I put an info about it some time ago to the DOSBox games database. It is always useful to read the games entries there. 😉

http://dosbox.sourceforge.net/comp_list.php?letter=a

Reply 15 of 46, by Snover

User metadata
Rank l33t++
Rank
l33t++

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.)

Yes, it’s my fault.

Reply 16 of 46, by jez

User metadata
Rank Member
Rank
Member
jez wrote:

Sorry to keep adding to this thread, but I've yet more questions after investigating sound in Simcity 2000. Why does the installer program give me a choice for music between AdLib, Sound Blaster, Sound Blaster Pro and Sound Blaster 16? Aren't these *all* either OPL2 or OPL3? Also, why does the music sound different (and better, in my opinion) when I choose AdLib for the music source, as opposed to Sound Blaster 16? If SB16 music is just OPL3, it shouldn't sound different to AdLib... should it? *shakes head*

I'm still interested in why this is... anyone know the answer to these questions?

== Jez ==

Reply 17 of 46, by canadacow

User metadata
Rank Member
Rank
Member

Its because Creative Labs changed some of the specifics regarding the interface for the Sound Blaster, Sound Blaster Pro and Sound Blaster 16 between versions.

Reply 18 of 46, by HunterZ

User metadata
Rank l33t++
Rank
l33t++

Some more background info, off the top of my head:

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!)

The Sound Blaster, SB 2.0, and Adlib all used an OPL2, which was used in many old games to produce music. The Sound Blaster cards also have separate hardware for playing 8-bit monophonic digitized (PCM) sound samples (e.g. WAV file sounds) that the Adlib did not have - this is what makes the SB better than the Adlib.

The SB Pro has two OPL2 chips so that it can produce stereo music (kind of a silly idea, but at least Creative was thinking of new ideas back then to try to keep an edge over the competition, which was stronger back then). It could also do stereo 8-bit PCM digitial sounds.

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. It was still backwards-compatable with a single OPL2 chip though, so the SB16 works with all the old games that use Adlib/SB music.

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).

About DOSBox: I've been playing with 0.63 a little since it was released, and I've noticed that if you leave the OPL mode set to "auto" it sometimes doesn't do OPL sound - I have to force it to a specific mode (sometimes trying several different ones) before it will work. I've always been able to get it to work though.

About CMS: I vaguely remember seeing the Game Blaster (with the Creative Music System chip) on store shelves back in the day (I was just a kid back then!). Never had one, nor knew anyone that did. I just tested some games with DOSBox's CMS emulation last night and found it interesting. 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)

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 😀)

Reply 19 of 46, by jal

User metadata
Rank Oldbie
Rank
Oldbie
jez wrote:
jez wrote:

Sorry to keep adding to this thread, but I've yet more questions after investigating sound in Simcity 2000. Why does the installer program give me a choice for music between AdLib, Sound Blaster, Sound Blaster Pro and Sound Blaster 16? Aren't these *all* either OPL2 or OPL3? Also, why does the music sound different (and better, in my opinion) when I choose AdLib for the music source, as opposed to Sound Blaster 16? If SB16 music is just OPL3, it shouldn't sound different to AdLib... should it? *shakes head*

I'm still interested in why this is... anyone know the answer to these questions?

AdLib was capable of only OPL2 music, it did not have digitized sound (speech, etc.). The Sound Blaster series of cards all do have digitized sound capabilities. SB and SBPro only 8 bit (although SBPro stereo and at a higher sample rate, IIRC), SB16 16 bit. Low-level programming (needed in DOS, since DOS never had a soundcard API, like Windows) required knowledge of each specific card, since each card had a different low-level register layout, etc. For example, the original AdLib card registers were accessed at addresses 0x388 an 0x389 (IIRC), while the SB series of cards used ranges in the 2x0 series (0x220, 0x240 etc.).

As for OPL3, it does sound slightly better than OPL2, when the game uses the OPL3 features (either better instruments or more instruments). However, not many games used these features, as OPL3 still doesn't sound to good.

JAL