VOGONS

Common searches


What is the meaning of 'cycles'?

Topic actions

  • This topic is locked. You cannot reply or edit posts.

First post, by tjcbs

User metadata
Rank Newbie
Rank
Newbie

I read that it was supposed to be cycles per millisecond, which would imply 3mhz when cycles is set to the default of 3000. But games seem to run way faster than they would on a 3mhz machine when cycles is 3000. So what does cycles really mean? Is it actuallly instructions per millisecond?

Reply 2 of 17, by h-a-l-9000

User metadata
Rank DOSBox Author
Rank
DOSBox Author

3000 cycles = 3 million instructions per second. However the emulation makes most instructions in DOSBox take the same emulated time opposed to a real CPU where instructions take different time. That's why a real CPU's MIPS set in DOSBox may not give the same result.

1+1=10

Reply 3 of 17, by Sephiroth

User metadata
Rank Member
Rank
Member

I find that the cycles can sometimes vary across hardware as well, and have yet to understand what a "cycle" is. All I know is that higher cycles mean more speed. Changing cycles from 500 to 50,000 doesn't give you new hardware support however, whereas changing from a real 8086 to a Pentium class CPU would offer many new features, such as MMX support. My personal understanding is that some basic x86 chip is emulated, and cycles simply change the speed of the chip. This means that if MMX is emulated, you could emulate an 8086 with MMX support.

486 Launcher v2.0 is now under development!

Reply 5 of 17, by MiniMax

User metadata
Rank Moderator
Rank
Moderator

My question is: Why the obsession with cycles? If your game is running to fast, lower it. If it is running to slow, raise them. End of story, move on, life has more interesting things in store for you.

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 7 of 17, by Sephiroth

User metadata
Rank Member
Rank
Member

Yeah I know MMX isn't emulated, I just used it as an example because most people know about MMX and also know it wasn't around in the age of the 8086 machines. It'd be sweet if stuff like that was emulated or patched right through to the MMX support on your physical CPU though!

Max, cycles are how games are timed in DOSBox. If a game can't run properly with max cycles, and there are a TON that don't like max cycles, then you have to specify an amount so it runs properly, but if the cycles vary from hardware to hardware, it makes things odd, but that's another discussion. It's almost as simple as you put it. If it's slow, give it more cycles, unless it slows down more in which case reduce them until max performance is found. If it's too fast, lower the cycles until it runs properly.

486 Launcher v2.0 is now under development!

Reply 8 of 17, by wd

User metadata
Rank DOSBox Author
Rank
DOSBox Author

be sweet if stuff like that was emulated

What for? dos games/apps that really need mmx would be utterly slow when mmx instructions are emulated.

If it's slow, give it more cycles, unless it slows down more in which case reduce them until max performance is found. If it's too fast, lower the cycles until it runs properly.

That's what MiniMax said, and there's no real problem with that.
If you have some algorithm how to detect which game needs what
cycles setting, just post it.
Besides that a very large number of games run just fine with cycles=auto.

Reply 10 of 17, by Sephiroth

User metadata
Rank Member
Rank
Member

Automatic cycles kills most games prior to the 386 era. I know because I have a massive collection and every one that I have tried tends to die on auto, but run fine on 100~1000 cycles. If it's Doom-era or later, auto should work, but even games from the mid-90's fail on auto at times. For example, Daggerfall has a movie intro first, and it only requires 3k cycles, but then the game needs 20k~30k to run, and it never switches up.

Anyways the topic was the meaning of cycles. I am not sure if it relates to emulated instructions, spped in MHz/GHz, or anything else. That's what we need cleared up.

486 Launcher v2.0 is now under development!

Reply 11 of 17, by wd

User metadata
Rank DOSBox Author
Rank
DOSBox Author

Automatic cycles kills most games prior to the 386 era.

As they are realmode games the very most of them work fine with auto
(==3000 fixed cycles), only rarely you need to switch down to 1000 or
below when they use non-timer based timing schemes.

I am not sure if it relates to emulated instructions

Yes it does. Read hal's reply.

Reply 12 of 17, by general_vagueness

User metadata
Rank Member
Rank
Member

I think the issue is that he's curious about them, and so am I, so please, what is the definition of a cycle?

You cannot fall off the floor.
If you look hard enough, you'll find something you don't like.

How to ask questions the smart way
How to become a hacker
How to answer smart-alec questions

Reply 14 of 17, by general_vagueness

User metadata
Rank Member
Rank
Member

Oh, OK, thanks.
See? Asking nicely works.

You cannot fall off the floor.
If you look hard enough, you'll find something you don't like.

How to ask questions the smart way
How to become a hacker
How to answer smart-alec questions

Reply 17 of 17, by general_vagueness

User metadata
Rank Member
Rank
Member

whoops, I thought that was from someone else for some reason

DosFreak wrote:

and the cheese makers

yes, yes they are, and the ramen makers

You cannot fall off the floor.
If you look hard enough, you'll find something you don't like.

How to ask questions the smart way
How to become a hacker
How to answer smart-alec questions