VOGONS

Common searches


First post, by sehh

User metadata
Rank Newbie
Rank
Newbie

Here is a list of things i've discovered about dosbox and i'd like to share with others.

1) Under Fedora Core 4 Linux, which uses ALSA by default, dosbox will sometimes use alsa directly and other times it loads 'esd'. I dont know why or how come it switches between the two on the same system. Anyway, i'm forcing dosbox to use alsa via the "device=alsa" option, no reason for audio to go through esd, alsa does proper mixing.

2) Under both Linux and WinXP, the graphics look skewed/weird. I had to set "aspect=true" to enable aspect correction. Maybe that should be the default? All my dosbox installations require it.

3) I've tried all the different parameters for the "output=" option and never seen a difference, anyone care to share his experience?

4) I always use "scaler=advmame2x", i found that it looks waaay better than the default "normal2x" for very little cpu overhead. Anyone with a 1ghz cpu or faster should use it.

5) The default "cycles=3000" is a bit slow, especialy when running highly intensive games. I think most people will benefit if they tried 3500 or 4000.

6) I didn't like the default 22khz audio from dosbox. Most of my games have 44khz audio and i wanted to be able to hear it. Unfortunately, if i change to 44khz then the audio is delayed by a full second!! I looked at my cpu usage and it was rather low, so the problem must be within dosbox. I then doubled the blocksize and prebuffer options and that allowed 44khz audio at real-time without any delay or stutters!!! (i'm using blocksize=4096 and prebuffer=30).

I'd appriciate your comments on my findings.

--
sehh

Reply 1 of 18, by DosFreak

User metadata
Rank l33t++
Rank
l33t++

1.it's common to have to force SDL to use a specific sound system.
2. Nah, not everyone has an inferior LCD. 😉
3. There are alot of differences between them. It's dependant on what kind of graphics card you have, if you want to use scalers, if you want to use Smart Shaders, if you want DosBox to use more/less cycles, if one quality mode looks better than the other, etc etc. Some output modes are better on some OS/graphics card combinations that others.
4. Some people don't like scalers and scalers aren't good for every game. I preper hq2x myself it looks less blurry.
5. Who actually uses default cycles?
6. Depends on sound card/drivers. Most Dos games didn't even use 22khz audio so it would actually make DosBox less compatible to force 44hz. (more complaints from users about messed up audio.)

How To Ask Questions The Smart Way
Make your games work offline

Reply 2 of 18, by Guest

User metadata

1. ah.
2. i've got several, they are all superb. I think the problem is caused when the LCD is connected via DSUB cable instead of DVI-D.
3. is there a list of modes and their attributes/description?
4. fair enough.
5. those who don't change the default value. so whats the difference between 4000 and 10000 cycles? i played eye of the beholder 3 on both and didn't notice anything difference.
6.1. Why force a specific frequency? Why not just use whatever the game uses and send that to ALSA?
6.2 If a game uses 12khz, what makes that incompatible? the audio is just converted to 44khz and sounds exactly the same, the game won't even notice anything.

Reply 4 of 18, by DosFreak

User metadata
Rank l33t++
Rank
l33t++

2. Nah, I wasn't referring to an inferior LCD compared to a better LCD. I was referring to LCD's being inferior to CRT's generally. 😉 CRT's will let the application set the proper resolution whereas LCD's cannot which is why you need ASPECT and SCALERS.

3. Well the output methods are in DosBox.conf. I'm not sure if we have a writeup or the differences between them. Let's seee..

Surface - Cannot scale so if you use an LCD then you probably don't want to use this.
Overlay - Can scale and is not dependant on having to worry about installing latest drivers.
Opengl - Consumes more processor usage than overlay. Also if you have an ATI card don't use this. (Doesn't apply with kurnov's latest patch)
Openglnb - Less blurry than Opengl. Also if you have an ATI card don't use this. (Doesn't apply with Kurnov's latest patch).
Direct3D - Usefull if you have ****** OGL drivers (ATI). Can also use special scalers. Use this if you have an ATI card or other card with crappy OGL. It's possible that this mode also uses less processor so it may be better than OGL if you use Windows.
ddraw - (DirectDraw) Not sure what the difference between this and surface is. I suppose since it uses DirectDraw that it may be faster than surface. Of course ddraw can only be used with Windows.

5. Well the more cycles you give a program the faster it will run. (It's akin to upgrading your processor). If the game doesn't need a faster processor (cycles) then there's no point in increasing them. (Unless your a freak and like to upgrade your computer for fun.....)

6. Well as I said before. Not all sound cards are equal. You use a higher standard by default and you cut alot of people out. It's like designing a PC game for only people who use Creative X-FI soundcards....and then everyone else complains because their audio is of poor quality. Frankly, I'm of the opinion that DosBox should set audio to 11025 instead of 22050.......but these days integrated audio is pretty good so 22050 is probably good.

How To Ask Questions The Smart Way
Make your games work offline

Reply 5 of 18, by Guest

User metadata

3. Since i'm in linux, i've only got surface,overlay,opengl,openglnb. I've switched between them and didn't see a noticable difference. I'll leave the default surface i guess.

5. i'm a freak so i'd like a free cycle-upgrade please 😁 i'll try different values and see the results.

6. Wait a minute.. do you actualy know of a SINGLE audio card or onboard chipset that was made after '95 and has anything less than 44khz audio?!?!??! I dont think one exists these days...

Reply 6 of 18, by sehh

User metadata
Rank Newbie
Rank
Newbie

3. Since i'm in linux, i've only got surface,overlay,opengl,openglnb. I've switched between them and didn't see a noticable difference. I'll leave the default surface i guess.

5. i'm a freak so i'd like a free cycle-upgrade please 😁 i'll try different values and see the results.

6. Wait a minute.. do you actualy know of a SINGLE audio card or onboard chipset that was made after '95 and has anything less than 44khz audio?!?!??! I dont think one exists these days...

PS:
i promise, one of these days i'll log in first before posting 😠

--
sehh

Reply 7 of 18, by DosFreak

User metadata
Rank l33t++
Rank
l33t++

If the different output methods look the same to you then probably the only difference you'll see is if your running a highly demanding game. Some output methods are more processor intensive than others. For instance Opengl is more intensive than Surface/Overlay so is your say trying to run Duke3D/Quake under DosBox then you'll probably want to use surface/overlay instead.

It's not the fact of the specifications of the sound card it's the actual results that matter. Trust me Drivers/DX/whichever sound system you use in Linux has a major part in the handling of that sound data. There are tons of different sound cards/drivers/DX versions/Linux distros out there.....so setting DosBox to use a higher value could potentialy cause more trouble than it's worth....whereas currently most of the people who use DosBox probably don't even know the difference between 8/11/22/44khz audio.....

Also there's the fact that higher sampling rates may eat up more processor.....

How To Ask Questions The Smart Way
Make your games work offline

Reply 8 of 18, by Guest

User metadata
DosFreak wrote:

Trust me Drivers/DX/whichever sound system you use in Linux has a major part in the handling of that sound data. There are tons of different sound cards/drivers/DX versions/Linux distros out there.....so setting DosBox to use a higher value could potentialy cause more trouble than it's worth....

In other words, everyone who listens to CD audio (44khz), plays MP3/WAV/Ogg music files (44khz), plays DivX/Xvid videos (44khz or 48khz) and DVDs (48khz) are all having major trouble? 😁

or maybe we just have different oppinions about this.. 😎

Reply 9 of 18, by Guest

User metadata

Ah, but CD Audio/MP3/WAV/OGG/DIVX/XVid/DVD are played directly from the file on the host NOT under an emulator.

In DosBox most DOS games are below or at 11khz (I'm just guessing here I don't know the actual values but since most DOS games are from before the mid 90's I highly doubt that they use 22khz sound....), Like anything the less conversion from one format to another the less problems you have. You also have to worry about (as you had to do above) the blocksize and prebuffer sizes as well since your dealing with an emulator. These settings are also very much dependant upon your computer and the audio data that your trying to play in DosBox.

heh. If "everyone" was able to listen to their CD Audio/MP3/WAV/OGG/Divx/Xvid/DVD's on a computer without any audio troubles then it would be a perfect world....unfortunately it's not. Just read an ALSA or SDL changelog sometime or read a linux forum about sound problems (although admittedly alot of it's just setting up their sound)...fun reading.

I'm not real up on the audio conversion that DosBox does but say you have a DOS game that uses 11khz and your DosBox .conf is set to 44khz. DosBox will upsample this to 44khz. Now the question is......do all of the devices that are capable of using DosBox (Remember people are using DosBox on PDA's/Dreamcasts) have the capapbility to run 44khz Audio from an emulator including all of the other resources that the emulators is eating up? There's also the question of wether the host system will use that 44khz sound @ 44khz or if it will downsample that sound to a lower value like 22khz. Obviously the less up/down sampling done to the original source the better.

Reply 10 of 18, by neowolf

User metadata
Rank Member
Rank
Member
Anonymous wrote:

5. those who don't change the default value. so whats the difference between 4000 and 10000 cycles? i played eye of the beholder 3 on both and didn't notice anything difference.
6.1. Why force a specific frequency? Why not just use whatever the game uses and send that to ALSA?
6.2 If a game uses 12khz, what makes that incompatible? the audio is just converted to 44khz and sounds exactly the same, the game won't even notice anything.

I'm pretty sure the default settings are *meant* to be tame. The higher the mixer value the more processing power it takes up, and as for cycles, not everyone can use the dynamic core and without that cycles are extremely CPU expensive. Further more the default values are fine for many old DOS games. If you want more you should be smart enough to read the readme and up it yourself.

Reply 11 of 18, by `Moe`

User metadata
Rank Oldbie
Rank
Oldbie
DosFreak wrote:

For instance Opengl is more intensive than Surface/Overlay so is your say trying to run Duke3D/Quake under DosBox then you'll probably want to use surface/overlay instead.

Why do people repeat this again and again, while it is not true, at least not generically? Especially on linux, OpenGL is faster than surface, and this is an ATI box. Please tell people the truth, i.e. that the output modes are a matter of performance and (sometimes) appearance, but no output mode is best - each hardware/OS combination has different behaviour (otherwise there wouldn't be different output modes).

Regarding sound: I think 22kHz is a good default choice, because (for example) adlib emulation is very cpu-intensive depending on sampling rate. And all of them go through the mixer, through your OS drivers and then to your hardware. Each step uses resources directly proportional to the sampling rate. On bad chipsets and lower-end machines, the driver alone can easily swallow 50% of CPU time at 44kHz, and sound emulation inside DOSBox easily amounts to 80% of the CPU time DOSBox uses. It's not always that bad, and on faster machines it has less effect, but the problem exists. I have gathered these numbers with a system profiler which also profiled drivers. That said, I run at 48kHz, because I have a fast box and a crappy onboard sound, and with 48kHz my driver at least doesn't need to convert sampling rates to the only rate supported by the hardware. As with many other issues, due to the massive amount of emulation involved, there is no single "best" choice.

Reply 12 of 18, by sehh

User metadata
Rank Newbie
Rank
Newbie

Just out of curiosity, this "mixer" we are talking about in dosbox. Is that just a software mixer for different audio sources within the game? (emulating channels or whatever?).

Can this be replaced by sending all streams, irrelevant of frequency, to ALSA? Since ALSA will use hardware mixing on supported hardware. Wouldn't that solve all problems with frequencies and CPU usage by the software mixer in dosbox?

--
sehh

Reply 13 of 18, by DosFreak

User metadata
Rank l33t++
Rank
l33t++

That would go against SDL.....your not supposed to program specifically to the system, just to SDL for cross-platform capability.

Some problems with DosBox could be fixed by programming for one specific system to the best of it's capability.....fortunately that's not DosBox's goal.

How To Ask Questions The Smart Way
Make your games work offline

Reply 14 of 18, by `Moe`

User metadata
Rank Oldbie
Rank
Oldbie

Additionally it won't make much difference, because those chipsets that benefit from that are already those which are unproblematic. The troublesome chips won't gain anything.

Reply 15 of 18, by sehh

User metadata
Rank Newbie
Rank
Newbie

I see what you mean.

Maybe it would be worth your trouble to reconsider. Just imagine dosbox using DirectX under winxp for audio and ALSA under linux, even OS/2 would benefit by using DART or UNIAUD (port of alsa for os/2).

Ofcourse the complexity of the code would skyrocket... but this is just a suggestion 😀

--
sehh

Reply 16 of 18, by `Moe`

User metadata
Rank Oldbie
Rank
Oldbie

If at all, that should be done in SDL. DOSBox is not a cross-platform toolkit, SDL is. Add a mixer/multiple audio streams API there, and DOSBox could use that.

Reply 18 of 18, by neowolf

User metadata
Rank Member
Rank
Member
sehh wrote:

I see what you mean.

Maybe it would be worth your trouble to reconsider. Just imagine dosbox using DirectX under winxp for audio and ALSA under linux, even OS/2 would benefit by using DART or UNIAUD (port of alsa for os/2).

Ofcourse the complexity of the code would skyrocket... but this is just a suggestion 😀

And if you chance something major recording sound output you have to rewrite the output for each platform. Since you're including a fringe enough thing like OS/2 then I hope you can realize how bad this could be. Windows, Mac OS X, ALSA, OSS, BeOS, OS/2, Amiga, etc. It's just a damn mess. The benefits wouldn't even be that great. SDL's pretty good for a cross-platform API and only continues to get better.