It seems that you're using an outdated browser. Some things may not work as they should (or don't work at all).
We suggest you upgrade newer and better browser like: Chrome, Firefox, Internet Explorer or Opera

×
Hi, i’ve got a very weird question regarding how dosbox work.

I’ve got 2 PC’s with quad core i7 cpu, one is mobile with 2300mhz, and another one is desktop, with 3300mhz. I’m testing Daggerfall, on default settings, with 100% cycles my character won't run backwards and jump like a crippled guy, but when i lower cpu cycles in dosbox, all starts to work better.

Why it is so? What’s the reason and why dosbox can't calculate necessary cycles but himself?

Also! If i lower cpu frequency to 900mhz problem goes away. Why?

Reason for asking? When you see smth strange ingame its hard to understand (in games which you didn't play back then) either its a developers idea or its just an emulation bug.
Post edited September 11, 2014 by vorob
This question / problem has been solved by InfraSupermanimage
avatar
vorob: I’m testing Daggerfall, on default settings with 100% cycles my character won’t run backwards and jump like a crippled guy, but when i lower cpu cycles in dosbox, all starts to work better.

Why it is so? What’s the reason and why dosbox can’t calculate necessary cycles but himself?
Are you using the most current version of DOSBox (or DOSBox Turbo), or an old one? It used to be that emulators had a hard time on new machines because of how fast new computers are, but I haven't had that problem with DOSBox in a good while. Try starting DOSBox without forcing it to max cycles; the default should be about 3000 cycles. Then add in cycles to get up to whatever speed you need. It could just be that your new CPUs are so fast that when DOSBox runs at full speed, it loses synch with itself.
DosBox can either try automatically calculate the amount of cycles the app needs or you can edit the config file manually and make the app always start with a desired number of cycles.

Some older games can get a bit wonky if the amount of cycles is too high, as they were meant to be played on macines much slower than current CPU's are. So if the amount of cycles is too high, that can make the games themselves go a bit bonkers, just like they would do if you'd play them without emulation on a modern hardware.
avatar
vorob: Hi, i’ve got a very weird question regarding understanding how dosbox work. I’ve got 2 PC’s with quad core i7 cpu, one is mobile with 2300mhz, and another one is desktop, with 3300mhz. I’m testing Daggerfall, on default settings with 100% cycles my character won’t run backwards and jump like a crippled guy, but when i lower cpu cycles in dosbox, all starts to work better.

Why it is so? What’s the reason and why dosbox can’t calculate necessary cycles but himself?

Also! If i lover cpu frequency to 900mhz problem goes away. Why?

Reason for asking? Its hard to understand sometimes (in games which you didn't play back then) either its a developers idea or its just an emulation bug.
This problem occurs with Daggerfall when the cycles are set too high. The game's movement mechanics simply break, somehow. It's best to set the cycles to a fixed value rather than max. Just change the "cycles" setting in the Dosbox .conf file to fixed 50000, or simply type cycles=fixed 50000 in Dosbox's main screen each time before you run the game.
Here is the Daggerfall episode of "Ancient Dos Games", where I found this solution. I find that this series is pretty helpful in these matters all around.

The max setting, from what I understand, basically uses as much CPU as possible, which means that Daggerfall may work on slower (or slowed down) PCs even with max cycles, but it gets crippled on faster ones. Unfortunately, this "minor" issue with this game was also overlooked in the otherwise excellent "DaggerfallSetup", where the default setting is also "cycles=max". Hilariously, their setup for "Arena"does come with a fixed cycles setting, making it far too slow, as it works best on maximum.

A lot of DOS games are programmed to limit their speed and thus work fine with the "auto" or "max" settings, but those that aren't usually require fixed cycles, which is often a bit of experimentation and guesswork.
Post edited September 11, 2014 by InfraSuperman
My guess would be that such an old game calculates some movements on the assumption that the CPU will respond after a certain amount of time. Todays CPUs can respond in 1/10000 of that amount of time, so your click to move gets lost because 9999 cycles come right after your click. Have you ever set the speed of double-click to the fastest? It's basically the same thing. You have to have super-human reflexes to make it double click.
That's why older games use around 40%-50% cycles in DosBox (and they don't even need more). You can even play with your CPU clocked at less MHz (as you did) and this problem vanishes.

Remember "Grim Fandango" and the infamous Elevator Bug? You couldn't get on the secret floor because the elevator was moving too fast, on newer machines, and you didn't have time to get there.

As to why dosbox can’t calculate necessary cycles by itself, I think it would need a huge database to store the cycles needed by every *.exe that exists.
Post edited September 11, 2014 by phandom
avatar
vorob: Also! If i lover cpu frequency to 900mhz problem goes away. Why?
That'll be lowering the speed of the EMULATED CPU - the faster the CPU you're trying to emulate the more your physical CPU is going to struggle!
Post edited September 11, 2014 by Fever_Discordia
A similar problem occurs in some PC versions of games that were originally developed for consoles. For calculations which have a time component, such as physics calculations, you need some sort of clock to tell you how much time has elapsed since the last calculation. Since the framerate is usually fixed on consoles, using that is a tempting proposition, and many developers have done so. The problems then arise when the game is ported to PC where the framerate is not fixed.

I ran into this issue in the PC version of GTA: San Andreas, where one calculation seemingly uses the framerate as a clock. The result was that under certain circumstances, jumping up on a crate or over a small fence would instantly kill you. The solution? Switch on the frame limiter in the settings. As soon as the framerate was fixed, the issue went away.
DOSBox emulates the hardware of the time with its weird quirks, so if you had a theoretical DOS PC with hardware similarly strong to your real PC you would get the same effect. Back in the day many hard- and software features we take for granted today were not common place. Developers would roll their own and rely on hacks more than on clean implementations in order to make things work. Often it was good enough if the game ran on the target hardware, no one cared if there were some small bugs in the code as long as they never surfaced. You have run into one of those and there is nothing DOSBox can do other than to slow down the emulated CPU.
Guys, thank you VERY MUCH for such detailed explanation. You are the best.

And btw, fixed 50000 solved the problem :)