VOGONS

Common searches


DOSBOX Speed on Mac

Topic actions

First post, by DJ_Mittens

User metadata
Rank Newbie
Rank
Newbie

Hello,

I did some searching, but couldn't find many details for people using Macs. I have a new iBook with a 1.33Ghz G4 processor. I've found that DOS emulators run rather slowly on this machine, both on Virtual PC and with DOSBOX. I find that the system is too laggy to run any DOS-based PC games (for names sake, such titles that come to mind are Dark Forces, Duke Nukem 3D, Rise Of The Triad). They all usually get 1-2fps. Raising the CPU cycles to about 10,000, when my CPU is maxxed out, only increases it to roughly 3-4fps.

I was wondering if this was a common issue (I'm aware of the inefficiencies of emulation), or of this level of performance was rather unusual. I'd like some ideas on how to get the performance up to 30+fps, but there doesn't seem to be many options. So, if you're using a Mac, please let me know what type of performance you commonly experience on classic DOS games, and let me know of any key performance enhancements I can make that aren't included in the readme or are only lightly touched upon.

P.S. I've read the Readme file included, but it commonly speaks about attributes applied to the executable (ie: -fullscreen). How are these applied to the Mac executable?

Thank you for your time.

Reply 1 of 23, by HunterZ

User metadata
Rank l33t++
Rank
l33t++

That sounds about right. Those games wouldn't be playable on my x86 PC that is 2.5 times as fast in terms of raw clock speed, except that DOSBox has a dynamic recompliation core (which probably only works on x86 - I'm not sure). You probably aren't going to get any first-person shooters working playably, except maybe for the oldest ones like Wolf3D.

Not sure about your last question as I have little experience with Macs. I'm sure someone else knows though.

Reply 2 of 23, by DJ_Mittens

User metadata
Rank Newbie
Rank
Newbie

The million dollar question is why wouldn't they even run on your machine? So, I try to get DOSBOX going on my XP machine, and I couldn't even get them going at that point? That's.... unfortunate, to say the least.

Reply 3 of 23, by HunterZ

User metadata
Rank l33t++
Rank
l33t++

I've been able to get Dark Forces running due to recent fixes in the CVS versions of DOSBox.

Duke Nukem 3D is way too new of a game to run under current DOSBox, and is a low priority due to the fact that the source code has been released to the public (allowing the creation of native ports of the game to any modern OS and platform that people take the effort to make).

Rise of the Triad should be possible to get working, although I haven't tried as I only enjoyed that game for its multiplayer.

Reply 4 of 23, by Freddo

User metadata
Rank Oldbie
Rank
Oldbie

The speed sounds about right. Pretty much how I can run DOSBox with my AMD 1800+ (1.5GHz).

HunterZ wrote:

Duke Nukem 3D is way too new of a game to run under current DOSBox, and is a low priority due to the fact that the source code has been released to the public (allowing the creation of native ports of the game to any modern OS and platform that people take the effort to make).

Yep.
http://www.macgamefiles.com/detail.php?item=18448

Reply 5 of 23, by swaaye

User metadata
Rank l33t++
Rank
l33t++

DJ_Mittens,

Dark Forces runs pretty well for me. Completely playable. I've tried it on 3 systems: AthlonXP 2.4GHz, Athlon64 1.8GHz, and a Pentium M 2.13GHz. So really fast machines. I think normal core is best for Dark Forces. Dynamic core doesn't seem totally stable with it and does not help with speed. Dark Forces has been said to use self-modifying code which the dynamic core can't help with apparently. You're stuck with normal core anyway though. You definitely want to try to get a CVS build, and a build that's compiled properly (I'm not sure how to do it).

Perhaps your problem is more to do with the display output mode? I think you should be able to get around 10fps... Try no sound and frameskip=2 perhaps. And try all the different display modes. I have no idea which ones work on Mac though. Using the wrong display mode will seriously impact performance. I've attached a old DOS VGA/SVGA benchmark called Chris's Bench (CBENCH). It's incredibly helpful for figuring out which display mode is optimal. Set the cycles to the same for each test and just vary DOSBOX's display output mode.

My Pentium M 2.13 here can run 20,000 cycles in normal and it is completely fluid. 20fps or more I'd guess. I don't know how to check. But it's as smooth as DF can get I think.... Here's my .conf

[sdl]
# output -- What to use for output: surface,overlay,opengl,openglnb,openglhq,ddraw,direct3d.
fullscreen=false
fulldouble=false
fullfixed=false
fullresolution=1440x900
output=direct3d
hwscale=2
autolock=true
sensitivity=100
waitonerror=true
priority=higher,normal
mapperfile=mapper.txt
pixelshader=scale2x.fx

[dosbox]
language=
machine=vga
captures=capture
memsize=16

[render]
frameskip=1
aspect=false
scaler=normal2x

[cpu]
core=normal
cycles=20000
cycleup=500
cycledown=20
timesynched=false
showcycles=false

[mixer]
nosound=false
rate=22050
blocksize=2048
prebuffer=10

[midi]
mpu401=true
intelligent=true
device=default
mt32rate=22050
config=

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

[gus]
gus=false
rate=22050
Show last 37 lines
base=240
irq1=5
irq2=5
dma1=3
dma2=3
ultradir=C:\ULTRASND

[speaker]
pcspeaker=true
pcrate=22050
tandyrate=22050
disney=false

[bios]
joysticktype=2axis


[dos]
xms=true
ems=true

[directserial]
directserial=false
comport=1
realport=COM1
defaultbps=1200
parity=N
bytesize=8
stopbit=1

[autoexec]
# Lines in this section will be run at startup.
mount c ./drive
c:
cd dark
dark

This is my conf from Gulikoza's x86 build with D3D support. So you obviously can't use pixelshaders or direct3d output.

I also attached a program icon I made for DF. 😀

Attachments

  • Filename
    Cbench.zip
    File size
    124.56 KiB
    Downloads
    152 downloads
    File license
    Fair use/fair dealing exception

Reply 7 of 23, by DJ_Mittens

User metadata
Rank Newbie
Rank
Newbie

I agree with HunterZ on this. I could try some things, but the difference is that your CPU natively supports DOS code, while mine needs to emulate it, significantly increasing any latency on the system. I agree, it SHOULD be playable. By raw power, and even with emulating inefficiency, I should be able to run the game, but who can tell. I like the ideas you presented, but:

A) I have no idea how to setup the .conf file on my Mac (supposed to put it in my preferences folder, but should it be in a subfolder, and what is it supposed to be called).

B) I don't know anything about "cores". Emulation is a relatively new topic for me.

C) CVS build? What is that?

Reply 8 of 23, by HunterZ

User metadata
Rank l33t++
Rank
l33t++

Actually, with normal core (as swaaye is using in this case) emulates the CPU completely in software just as it would on a Mac.

DOSBox provides several methods of emulating the CPU of a DOS machine. These methods are referred to as "cores". Choices include simple, normal, full, and dynamic (but vary depending on version and host platform).

Find out about CVS builds in the development forum. Unfortunately those are all Windows versions. You'd probably have to compile the source code yourself, and I don't know if Mac is supported without patching (probably not).

Reply 9 of 23, by DJ_Mittens

User metadata
Rank Newbie
Rank
Newbie

If the source is clean, I can compile it myself. But I think there's only one build available for Mac at the moment, which is what I have anyway.

If the normal core is straight software, then there's no reason why it shouldn't work badly on my machine if it's fine on swaaye's. Unless there's problems with the video encoding, which should be passed off to the video card rather than the CPU, to help compatibility issues (though then it'll cause some driver issues, I'm sure - not too clear on the details here).

Reply 10 of 23, by neowolf

User metadata
Rank Member
Rank
Member

Some performance tips for DOSBox on a Mac, from another Mac user. First off, be sure you're using surface output AND full screen. The performance difference between surface in a window and at full screen is quite massive. Secondly, don't be afraid to use frameskips. Even a single extra skip has made a major difference between jerky sound and accurate sound. If you can, use roland or general midi for your music. I use the simple core myself. If you have to play in a window use OpenGL for your output; (though it IS still over all slower than surface fullscreen!) That being said I still don't get OMG amazing performance. However I can play most of the older games I desire to on my Mac mini (1.42 GHz G4).

As for compiling it yourself. Go for it. I get better performance and better compatibility running a CVS build myself. You need to have SDL installed, however I just take care of this (and lots of other ports I use) via Darwinports.

Reply 11 of 23, by swaaye

User metadata
Rank l33t++
Rank
l33t++

Yeah I'm sorry to lead you on about performance but I think with normal core you should still be able to get it playable. DOSBOX is tricky to configure and most of us don't have any Mac experience....

Good luck and let us know how it turns out!

Reply 12 of 23, by Guest

User metadata

I am running a g4 1.67ghz PB 17" and I have increased the CPU Cycles up, but the sound is still very poor. My test is Full Throttle, barely playable. I figured out how to switch to full screen, using the Ctrl-Cmd-enter keys, but I dont think that the same as the the "surface output and full screen" that neowolf has described. How do you enter that mode?
Neowolf, how do you get decent performance with your G4?
Kevin

Reply 14 of 23, by HunterZ

User metadata
Rank l33t++
Rank
l33t++

You'll need to edit the DOSBox config file (don't know what or where it is on Mac) to set output=overlay.

I agree that SCUMMVM is worth checking out. I've used recent versions to play Full Throttle and it does a pretty good job now. I reported a few minor bugs a while back with FT in SCUMMVM that have probably been fixed by now.

Edit: Just checked sourceforge, and they fixed both bugs.

Reply 16 of 23, by DosFreak

User metadata
Rank l33t++
Rank
l33t++

Since those will be based on x86 then yes DosBox on OSX using x86 will be able to use Dynamic Core.

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

Reply 19 of 23, by neowolf

User metadata
Rank Member
Rank
Member

I'll just paste my config files. Keep in mind I'm running a recent cvs build myself. I also use two mini AppleScripts as launchers.

Windowed

[sdl]
# fullscreen -- Start dosbox directly in fullscreen.
# fulldouble -- Use double buffering in fullscreen.
# fullfixed -- Don't resize the screen when in fullscreen.
# fullresolution -- What resolution to use for fullscreen, use together with fullfixed.
# output -- What to use for output: surface,overlay,opengl,openglnb.
# hwscale -- Extra scaling of window if the output device supports hardware scaling.
# autolock -- Mouse will automatically lock, if you click on the screen.
# sensitiviy -- Mouse sensitivity.
# waitonerror -- Wait before closing the console if dosbox has an error.
# priority -- Priority levels for dosbox: lower,normal,higher,highest.
# Second entry behind the comma is for when dosbox is not focused/minimized.
# mapperfile -- File used to load/save the key/event mappings from.

fullscreen=false
fulldouble=false
fullfixed=false
fullresolution=1280x1024
output=openglnb
hwscale=1.00
autolock=true
sensitivity=100
waitonerror=true
priority=higher,higher
mapperfile=mapper.txt

[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,vga.
# captures -- Directory where things like wave,midi,screenshot get captured.

language=
machine=vga
captures=capture
memsize=8

[render]
# frameskip -- How many frames dosbox skips before drawing one.
# aspect -- Do aspect correction.
# scaler -- Scaler used to enlarge/enhance low resolution modes.
# Supported are none,normal2x,advmame2x,advmame3x,advinterp2x,interp2x,tv2x.

frameskip=1
aspect=false
scaler=normal2x


[cpu]
# core -- CPU Core used in emulation: simple,normal,full.
# cycles -- Amount of instructions dosbox tries to emulate each millisecond.
# Setting this higher than your machine can handle is bad!
# cycleup -- Amount of cycles to increase/decrease with keycombo.
# cycledown Setting it lower than 100 will be a percentage.

core=simple
cycles=3000
cycleup=500
cycledown=500

Show last 116 lines
[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=10


[midi]
# mpu401 -- Enable MPU-401 Emulation.
# intelligent -- Operate in Intelligent mode.
# 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.

mpu401=true
intelligent=true
device=default
config=

[sblaster]
# 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=sb16
base=220
irq=7
dma=1
hdma=5
mixer=true
oplmode=auto
oplrate=22050

[gus]
# gus -- Enable the Gravis Ultrasound emulation.
# base,irq1,irq2,dma1,dma2 -- The IO/IRQ/DMA addresses of the
# Gravis Ultrasound. (Same IRQ's and DMA's are OK.)
# rate -- 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=true
rate=22050
base=240
irq1=5
irq2=5
dma1=3
dma2=3
ultradir=C:\ULTRASND

[speaker]
# pcspeaker -- Enable PC-Speaker emulation.
# pcrate -- Sample rate of the PC-Speaker sound generation.
# tandyrate -- Sample rate of the Tandy 3-Voice generation.
# Tandysound emulation is present if machine is set to tandy.
# disney -- Enable Disney Sound Source emulation.

pcspeaker=true
pcrate=22050
tandyrate=22050
disney=true

[bios]
# joysticktype -- Type of joystick to emulate: none, 2axis, 4axis,
# fcs (Thrustmaster) ,ch (CH Flightstick).
# none disables joystick emulation.
# 2axis is the default and supports two joysticks.

joysticktype=2axis

[serial]
# serial1-4 -- set type of device connected to com port.
# Can be disabled, dummy, modem, directserial.
# Additional parameters must be in the same line in the form of
# parameter:value. Parameters for all types are irq, startbps, bytesize,
# stopbits, parity (all optional).
# for directserial: realport (required).
# for modem: listenport (optional).

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

[dos]
# xms -- Enable XMS support.
# ems -- Enable EMS support.
# umb -- Enable UMB support (false,true,max).

xms=true
ems=true
umb=true

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

ipx=false

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

mount c /Users/neowolf/Documents/DOSBox/C
c:

and full screen

[sdl]
# fullscreen -- Start dosbox directly in fullscreen.
# fulldouble -- Use double buffering in fullscreen.
# fullfixed -- Don't resize the screen when in fullscreen.
# fullresolution -- What resolution to use for fullscreen, use together with fullfixed.
# output -- What to use for output: surface,overlay,opengl,openglnb.
# hwscale -- Extra scaling of window if the output device supports hardware scaling.
# autolock -- Mouse will automatically lock, if you click on the screen.
# sensitiviy -- Mouse sensitivity.
# waitonerror -- Wait before closing the console if dosbox has an error.
# priority -- Priority levels for dosbox: lower,normal,higher,highest.
# Second entry behind the comma is for when dosbox is not focused/minimized.
# mapperfile -- File used to load/save the key/event mappings from.

fullscreen=yes
fulldouble=false
fullfixed=false
fullresolution=1280x1024
output=surface
hwscale=1.00
autolock=true
sensitivity=100
waitonerror=true
priority=higher,higher
mapperfile=mapper.txt

[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,vga.
# captures -- Directory where things like wave,midi,screenshot get captured.

language=
machine=vga
captures=capture
memsize=8

[render]
# frameskip -- How many frames dosbox skips before drawing one.
# aspect -- Do aspect correction.
# scaler -- Scaler used to enlarge/enhance low resolution modes.
# Supported are none,normal2x,advmame2x,advmame3x,advinterp2x,interp2x,tv2x.

frameskip=1
aspect=false
scaler=normal2x

[cpu]
# core -- CPU Core used in emulation: simple,normal,full.
# cycles -- Amount of instructions dosbox tries to emulate each millisecond.
# Setting this higher than your machine can handle is bad!
# cycleup -- Amount of cycles to increase/decrease with keycombo.
# cycledown Setting it lower than 100 will be a percentage.

core=simple
cycles=3000
cycleup=500
cycledown=500

[mixer]
Show last 115 lines
# 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=10


[midi]
# mpu401 -- Enable MPU-401 Emulation.
# intelligent -- Operate in Intelligent mode.
# 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.

mpu401=true
intelligent=true
device=default
config=

[sblaster]
# 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=sb16
base=220
irq=7
dma=1
hdma=5
mixer=true
oplmode=auto
oplrate=22050

[gus]
# gus -- Enable the Gravis Ultrasound emulation.
# base,irq1,irq2,dma1,dma2 -- The IO/IRQ/DMA addresses of the
# Gravis Ultrasound. (Same IRQ's and DMA's are OK.)
# rate -- 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=true
rate=22050
base=240
irq1=5
irq2=5
dma1=3
dma2=3
ultradir=C:\ULTRASND

[speaker]
# pcspeaker -- Enable PC-Speaker emulation.
# pcrate -- Sample rate of the PC-Speaker sound generation.
# tandyrate -- Sample rate of the Tandy 3-Voice generation.
# Tandysound emulation is present if machine is set to tandy.
# disney -- Enable Disney Sound Source emulation.

pcspeaker=true
pcrate=22050
tandyrate=22050
disney=true

[bios]
# joysticktype -- Type of joystick to emulate: none, 2axis, 4axis,
# fcs (Thrustmaster) ,ch (CH Flightstick).
# none disables joystick emulation.
# 2axis is the default and supports two joysticks.

joysticktype=2axis

[serial]
# serial1-4 -- set type of device connected to com port.
# Can be disabled, dummy, modem, directserial.
# Additional parameters must be in the same line in the form of
# parameter:value. Parameters for all types are irq, startbps, bytesize,
# stopbits, parity (all optional).
# for directserial: realport (required).
# for modem: listenport (optional).

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

[dos]
# xms -- Enable XMS support.
# ems -- Enable EMS support.
# umb -- Enable UMB support (false,true,max).

xms=true
ems=true
umb=true

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

ipx=false

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

mount c /Users/neowolf/Documents/DOSBox/C
c: