VOGONS

Common searches


First post, by MrFlibble

User metadata
Rank Oldbie
Rank
Oldbie

I've been wondering, is there any reliable way of inferring the maximum amount of CPU cycles DOSBox can emulate on a particular machine from its CPU clock rate?

I'm using cycles=max since this feature had been first introduced, but I've never given any thought to how many cycles this actually is on the hardware I use. The manual and wiki don't seem to have an answer to this, and neither have I found any way to look this up directly when DOSBox is running with the cycles=max setting.

I'm asking this in part because I've seen a source (the reliability of which cannot be attested) which suggested that the maximum possible cycles could be calculated (at least approximately) by simply multiplying the clock rate by some fixed value (which I cannot remember right now).

I've tried to find further information on the net, but without much success. This Wikipedia entry sort of suggests that the clock rate on its own may not be a sufficient parameter to take into account in this question. If this is really the case, then how, if at all, is it possible to determine the amount of cycles DOSBox can emulate on a machine?

Reply 2 of 14, by MrFlibble

User metadata
Rank Oldbie
Rank
Oldbie

Thanks for the swift reply.

I'd be grateful though if you elaborated a bit. If the cycles=max function does work, then it does return some estimate (or exact value maybe?) from the actual hardware to DOSBox to emulate a certain amount of cycles accordingly, right?

Or maybe there are rough estimates for more common CPU types, something like 1500 MHz = n cycles, 2100 MHz = m cycles etc.?

Basically, what parameters are to be taken into account to produce at least an approximate value for the max cycles depending on a particular CPU and/or PC configuration?

(I apologize for any possible mistakes and misconceptions in my posts, since I'm not exactly tech savvy in this respect.)

DOS Games Archive | Free open source games | RGB Classic Games

Reply 3 of 14, by Qbix

User metadata
Rank DOSBox Author
Rank
DOSBox Author

It depends on the game as well. (more precisely on the complexity of the instructions used by the game)

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

Reply 4 of 14, by MrFlibble

User metadata
Rank Oldbie
Rank
Oldbie
Qbix wrote:

It depends on the game as well. (more precisely on the complexity of the instructions used by the game)

Hmm, do you mean that the amount of emulated cycles varies according to what programme is loaded into memory inside DOSBox (on the cycles=max setting that is), or that the performance of the programme varies depending on its structure?

I've just run into this:

Bambo wrote:

But when I play above 12.000 cycles (12.000 cycles == 486DX 33 Mhz according to Norton Sysinfo 8.0) the game gets some serious glitches [source]

I don't think I've ever used Norton SysInfo (it's part of Norton Utilities, right?), is this kind of estimate even remotely reliable? If yes, maybe some other benchmarking/diagnostic software is available to get the max cycles value?

DOS Games Archive | Free open source games | RGB Classic Games

Reply 5 of 14, by Dominus

User metadata
Rank DOSBox Moderator
Rank
DOSBox Moderator

You cannot get it reliably. A complex benchmark might tax the host system in other ways than edit.com, so a result is likely to not correctly represent what cycles amount to...

Windows 3.1x guide for DOSBox
60 seconds guide to DOSBox
DOSBox SVN snapshot for macOS (10.4-11.x ppc/intel 32/64bit) notarized for gatekeeper

Reply 6 of 14, by MrFlibble

User metadata
Rank Oldbie
Rank
Oldbie

Well, what people do then to determine the maximum available amount of cycles?

One of the reasons I've started to wonder about this is the following: this Ancien DOS Games review states that to get a performance increase in Thor's Hammer, one needs to up the cycles to 50,000 or so. The author states however that at this setting, sound and music stuttering will occur in certain situations (e.g. during cutscenes). On the other hand, the comments in dosbox.conf indicate that "etting [CPU cycles] too high results in sound dropouts and lags", which might be the case of the symptoms with Thor's Hammer.

So I wonder if 50,000 cycles for example is an okay value for, say, a 1800 MHz CPU, or too high?

DOS Games Archive | Free open source games | RGB Classic Games

Reply 7 of 14, by Dominus

User metadata
Rank DOSBox Moderator
Rank
DOSBox Moderator

If your real cpu is maxed out your cycles is too high 😉
You have to experiment

Windows 3.1x guide for DOSBox
60 seconds guide to DOSBox
DOSBox SVN snapshot for macOS (10.4-11.x ppc/intel 32/64bit) notarized for gatekeeper

Reply 8 of 14, by VileR

User metadata
Rank l33t
Rank
l33t

I don't think there's a more reliable way than trial and error, for any particular game. Some games start to stutter on me above 15000 cycles, others have a sweet spot just under 40000, and others yet will run nicely at 80k.
Other factors and dosbox settings will influence the value as well (e.g. using a scaler).

[ WEB ] - [ BLOG ] - [ TUBE ] - [ CODE ]

Reply 9 of 14, by MrFlibble

User metadata
Rank Oldbie
Rank
Oldbie

Hmm, I haven't though that some games might be more demanding than others in this respect as well. Thanks guys!

But sound stuttering is a symptom of CPU overclocking, right?

I mean, if the sound begins to stutter this always means that cycles are too high, or not?

DOS Games Archive | Free open source games | RGB Classic Games

Reply 10 of 14, by Dominus

User metadata
Rank DOSBox Moderator
Rank
DOSBox Moderator

no, a good indication of your CPU being overused is the process manager showing a maxed out CPU 😀

Sound stuttering can have other reasons and again is on per game basis...

Windows 3.1x guide for DOSBox
60 seconds guide to DOSBox
DOSBox SVN snapshot for macOS (10.4-11.x ppc/intel 32/64bit) notarized for gatekeeper

Reply 11 of 14, by MrFlibble

User metadata
Rank Oldbie
Rank
Oldbie

I hope I'm not anooying you guys, but how does the max cycles function work then? Does it do some math to determine maximum cycles? Does it increase cycles until some feedback from the actual machine tells it to stop?

Oh, an by the way (hope this isn't considered off-topic): some earlier SVN builds of DOSBox (like Daum Cafe which I use) have the "timesynched" option which I first thought from its description in the conf file was to disallow real CPU overclocking, but the descriptions here in the forums it seems to have been used to match the amount of cycles to what was required by the running programme at any given time. Which sounds quite good. Why was this function dropped then? And also, does it work in tandem with cycles=max in the builds where it is implemented? Or do you need to give some numerical value for the cycles= for it to work?

DOS Games Archive | Free open source games | RGB Classic Games

Reply 12 of 14, by Qbix

User metadata
Rank DOSBox Author
Rank
DOSBox Author

max cycles:
It keeps track of the time required to run X amount of instructions and the actual time passed. It uses the ratio of those 2 times, to modify X to a new value.

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

Reply 13 of 14, by MrFlibble

User metadata
Rank Oldbie
Rank
Oldbie

Thanks for the explanation!

What about the timesynched feature? Was it dropped because it didn't work as intended? (Sorry if this is covered elsewhere, I dind't find anything on this topic as of yet.)

DOS Games Archive | Free open source games | RGB Classic Games