VOGONS


First post, by Yet41

User metadata
Rank Newbie
Rank
Newbie

I'm running Dosbox on linux (openSUSE 11). Whenever I run a game, the sound is behind, by maybe a second or so. As an example, Doom does this.

I followed this the advice from here:
http://bbs.archlinux.org/viewtopic.php?id=28672

It stopped the alsa and midi complaints that I was getting, but it really didn't do anything in regards to the lag in sound. Any advice?

Reply 1 of 8, by Raymond C. Glassford

User metadata
Rank Newbie
Rank
Newbie

If sound is lagging by one second or a bit more, that is probably the best you will be able to do.

I am running DOSBox 0.72 under Mandriva Linux 2007.0 and sound lags by about 1.5 seconds when running Doom II, for example. I have been unable to shorten sound lag by tweaking my .dosboxrc file any more than I have already done. The 1.5 second lag is not objectionable and, more importantly, I do not hear sound stuttering, which would be objectionable.

My system unit is a Compaq Deskpro EN, Pentium III, 933 MHz. My .dosboxrc file is copied below. It is the same as my dosbox.conf file. Note the "cycles" settings I have used to run various games. "Cycles" must be fine-tuned to a narrow range for some games, in order to avoid sound stuttering. Problems with slow performance are best dealt with by tweaking the "core" setting; "dynamic" works better than "auto" with some games. Also, notice that I use "output=surface", "aspect=false", and "scaler=none" to help speed-up performance.

My first preference for playing Doom, Doom II, Final Doom, Eternal Doom III, Eternal Doom IV, Heretic, Hexen, and Strife is now ZDoom 2.2.0 for Linux. It compiled with no problems and it fully supports the Open Sound System, which I prefer over ALSA. Best of all, game-speed is "full-throttle", fullscreen graphics are excellent, and there is no sound lag. I use DOSBox 0.72 to run non-ZDoom demos, other MS-DOS games, and miscellaneous MS-DOS utilities.
=================================================
=================================================
# This is the configuration file for DOSBox 0.72.
# Lines starting with a # are comment lines.
# They are used to (briefly) document the effect of each option.
# Recommended cycles: Amazon 1750; Blood 75000 nosound=true; Crusader max (performance slow); Darkseed 1000-1500; Doom 10000; Doom2 12500; Flashback 1750; Heretic 10000; Hexen 10000; Lost in Time max; Prisoner of Ice 4500; Shadow of the Comet 6500; Strife 10000; Tex Murphy 1 auto; Tex Murphy 2 core=dynamic cycles=8000 music=Adlib sound device=Realsound

[sdl]
# fullscreen -- Start dosbox directly in fullscreen.
# fulldouble -- Use double buffering in fullscreen.
# fullresolution -- What resolution to use for fullscreen: original or fixed size (e.g. 1024x768).
# windowresolution -- Scale the window to this size IF the output device supports hardware scaling.
# output -- What to use for output: surface,overlay,opengl,openglnb.
# autolock -- Mouse will automatically lock, if you click on the screen.
# sensitivity -- Mouse sensitivity.
# waitonerror -- Wait before closing the console if dosbox has an error.
# priority -- Priority levels for dosbox: lowest,lower,normal,higher,highest,pause (when not focused).
# Second entry behind the comma is for when dosbox is not focused/minimized.
# mapperfile -- File used to load/save the key/event mappings from.
# usescancodes -- Avoid usage of symkeys, might not work on all operating systems.

fullscreen=false
fulldouble=false
fullresolution=original
windowresolution=original
output=surface
autolock=true
sensitivity=100
waitonerror=true
priority=higher,normal
mapperfile=/home/rcglassford/MAPPER
usescancodes=true

[dosbox]
# language -- Select another language file.
# memsize -- Amount of memory DOSBox has in megabytes.
# machine -- The type of machine tries to emulate: hercules,cga,tandy,pcjr,vga.
# captures -- Directory where things like wave,midi,screenshot get captured.

language=
machine=vga
captures=/home/rcglassford/msdos/temp/
memsize=64

[render]
# frameskip -- How many frames DOSBox skips before drawing one.
# aspect -- Do aspect correction, if your output method doesn't support scaling this can slow things down!.
# scaler -- Scaler used to enlarge/enhance low resolution modes.
# Supported are none,normal2x,normal3x,advmame2x,advmame3x,hq2x,hq3x,
# 2xsai,super2xsai,supereagle,advinterp2x,advinterp3x,
# tv2x,tv3x,rgb2x,rgb3x,scan2x,scan3x.
# If forced is appended (like scaler=hq2x forced), the scaler will be used
# even if the result might not be desired.

frameskip=0
aspect=false
scaler=none

[cpu]
# core -- CPU Core used in emulation: normal,simple,dynamic,auto.
# auto switches from normal to dynamic if appropriate.
# cycles -- Amount of instructions DOSBox tries to emulate each millisecond.
# Setting this value too high results in sound dropouts and lags.
# You can also let DOSBox guess the correct value by setting it to max.
# The default setting (auto) switches to max if appropriate.
# cycleup -- Amount of cycles to increase/decrease with keycombo.
# cycledown Setting it lower than 100 will be a percentage.

core=auto
cycles=12500
cycleup=500
cycledown=20

[mixer]
# nosound -- Enable silent mode, sound is still emulated though.
# rate -- Mixer sample rate, setting any devices higher than this will
# probably lower their sound quality.
# blocksize -- Mixer block size, larger blocks might help sound stuttering
# but sound will also be more lagged.
# prebuffer -- How many milliseconds of data to keep on top of the blocksize.

nosound=false
rate=22050
blocksize=2048
prebuffer=30

[midi]
# mpu401 -- Type of MPU-401 to emulate: none, uart or intelligent.
# device -- Device that will receive the MIDI data from MPU-401.
# This can be default,alsa,oss,win32,coreaudio,none.
# config -- Special configuration options for the device. In Windows put
# the id of the device you want to use. See README for details.

mpu401=intelligent
device=oss
config=

[sblaster]
# sbtype -- Type of sblaster to emulate:none,sb1,sb2,sbpro1,sbpro2,sb16.
# sbbase,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.
# All OPL modes are 'Adlib', except for CMS.
# oplrate -- Sample rate of OPL music emulation.

sbtype=sb16
sbbase=220
irq=7
dma=1
hdma=5
mixer=true
oplmode=auto
oplrate=22050

[gus]
# gus -- Enable the Gravis Ultrasound emulation.
# gusbase,irq1,irq2,dma1,dma2 -- The IO/IRQ/DMA addresses of the
# Gravis Ultrasound. (Same IRQ's and DMA's are OK.)
# gusrate -- Sample rate of Ultrasound emulation.
# ultradir -- Path to Ultrasound directory. In this directory
# there should be a MIDI directory that contains
# the patch files for GUS playback. Patch sets used
# with Timidity should work fine.

gus=false
gusrate=22050
gusbase=220
irq1=7
irq2=7
dma1=1
dma2=5
ultradir=/home/rcglassford/msdos/ultrasnd/

[speaker]
# pcspeaker -- Enable PC-Speaker emulation.
# pcrate -- Sample rate of the PC-Speaker sound generation.
# tandy -- Enable Tandy Sound System emulation (off,on,auto).
# For auto Tandysound emulation is present only if machine is set to tandy.
# tandyrate -- Sample rate of the Tandy 3-Voice generation.
# disney -- Enable Disney Sound Source emulation. Covox Voice Master and Speech Thing compatible.

pcspeaker=false
pcrate=22050
tandy=off
tandyrate=22050
disney=false

[joystick]
# joysticktype -- Type of joystick to emulate: auto (default), none,
# 2axis (supports two joysticks,
# 4axis (supports one joystick, first joystick used),
# 4axis_2 (supports one joystick, second joystick used),
# fcs (Thrustmaster), ch (CH Flightstick).
# none disables joystick emulation.
# auto chooses emulation depending on real joystick(s).
# timed -- enable timed intervals for axis. (false is old style behaviour).
# autofire -- continuously fires as long as you keep the button pressed.
# swap34 -- swap the 3rd and the 4th axis. can be useful for certain joysticks.
# buttonwrap -- enable button wrapping at the number of emulated buttons.

joysticktype=none
timed=true
autofire=false
swap34=false
buttonwrap=true

[serial]
# serial1-4 -- set type of device connected to com port.
# Can be disabled, dummy, modem, nullmodem, directserial.
# Additional parameters must be in the same line in the form of
# parameter:value. Parameter for all types is irq.
# for directserial: realport (required), rxdelay (optional).
# for modem: listenport (optional).
# for nullmodem: server, rxdelay, txdelay, telnet, usedtr,
# transparent, port, inhsocket (all optional).
# Example: serial1=modem listenport:5000

serial1=dummy
serial2=dummy
serial3=disabled
serial4=disabled

[dos]
# xms -- Enable XMS support.
# ems -- Enable EMS support.
# umb -- Enable UMB support.
# keyboardlayout -- Language code of the keyboard layout (or none).

xms=true
ems=true
umb=true
keyboardlayout=US

[ipx]
# ipx -- Enable ipx over UDP/IP emulation.

ipx=false

[autoexec]
# Lines in this section will be run at startup.

Reply 2 of 8, by Qbix

User metadata
Rank DOSBox Author
Rank
DOSBox Author

no sound lags at my place. (Ubuntu 8.04)
It is probably something in your sound settings (or distro settings). DOSBox outputs the generated sound quite fast.

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

Reply 3 of 8, by ADDiCT

User metadata
Rank Oldbie
Rank
Oldbie
Raymond C. Glassford wrote:

My system unit is a Compaq Deskpro EN, Pentium III, 933 MHz.

This is more of a pocket calculator than a PC, especially if you're trying to run demanding emulation on it. The fact that you're trying to run the most CPU intensive games - first person shooters - on this very, very slow PC doesn't help at all. The machine is probably a business PC, which means it isn't "tuned" to speed, too.

Reply 4 of 8, by Raymond C. Glassford

User metadata
Rank Newbie
Rank
Newbie

This is more of a pocket calculator than a PC, especially if you're trying to run demanding emulation on it. The fact that you're trying to run the most CPU intensive games - first person shooters - on this very, very slow PC doesn't help at all. The machine is probably a business PC, which means it isn't "tuned" to speed, too.

True. The Compaq Deskpro EN is a used business machine bought for $60 U.S., far less than what a good graphing calculator costs, but it is performing in its second-life amazingly good. So, I am not concerned about the slight sound lag in FPS games. For adventure games, the sound lag is not an issue at all.

Reply 5 of 8, by ripa

User metadata
Rank Oldbie
Rank
Oldbie

This is more of a pocket calculator than a PC, especially if you're trying to run demanding emulation on it. The fact that you're trying to run the most CPU intensive games - first person shooters - on this very, very slow PC doesn't help at all.

My computer (Athlon XP 2400+) probably has about 2-3 times as much processing power as his compaq. Heretic works fine with dynamic core at cycles=10% (task manager shows 5% - 20% CPU usage) without any sound delay or stuttering. 933 MHz should be plenty for Dosbox.

Reply 6 of 8, by ADDiCT

User metadata
Rank Oldbie
Rank
Oldbie

That kind of comparison is not valid. You can't simply compare the Mhz of different CPU generations. And then there's other factors, like bus system, memory timings, etc. . It's not that easy. (;

Reply 7 of 8, by ripa

User metadata
Rank Oldbie
Rank
Oldbie

I did not just divide clock rate by clock rate. According to old reviews the ~1 GHz PIII Coppermine is roughly 2x slower than the Athlon XP Thoroughbred 2400. In addition, I overestimated the difference by setting cycles 10% instead of cycles 50%.

Reply 8 of 8, by Qbix

User metadata
Rank DOSBox Author
Rank
DOSBox Author

sorry. but taskmanagers aren't reliable especially with low numbers.
Try it for example with a AMD code analyzer or something like that. Those have decent timing.

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