VOGONS


First post, by Darkfalz

User metadata
Rank Member
Rank
Member

I'm sure somone will tell me "it's not that easy" but I'm just going to throw in an idea for auto cycles.

Every second or so that has happed, have dosbox check how much internal time that has passed. If it's also a second, then increase cycles a bit.

Keep doing this until it will be less than a second, then drop it down. It could afford to be a little conservative. But it could keep going up and down depending on the internal complexity of the game you are running.

A way to stick close to 100% CPU cycles all the time...

Just like how auto frameskip works in emulators, but this time in terms of lowering CPU cycles when you're not getting full internal speed, then increasing them back up again when you are.

Reply 3 of 7, by jal

User metadata
Rank Oldbie
Rank
Oldbie
avatar_58 wrote:

/\ hisssss 😦
He's right though. If you think you can do better by all means do.

He's not right. Darkfalz proposes a purely functional (as opposed to technical, not as opposed to broke) description how he thinks the cycles problem might be tackled. Why would someone with a good idea be obliged to build it first? Maybe he cannot program? Maybe he doesn't have time?

JAL

Reply 4 of 7, by Freddo

User metadata
Rank Oldbie
Rank
Oldbie
jal wrote:

He's not right. Darkfalz proposes a purely functional (as opposed to technical, not as opposed to broke) description how he thinks the cycles problem might be tackled. Why would someone with a good idea be obliged to build it first? Maybe he cannot program? Maybe he doesn't have time?

I agree 😀 Although, I do not care much if this idea gets into future DOSBox or not. I have 40 DOS games or so and giving each of them their own .conf file with a number of cycles that suits that specific game is good enough for me.

Reply 6 of 7, by user222

User metadata
Rank Member
Rank
Member
Darkfalz wrote:

It strikes me that the solution is pretty much exactly the same as autoframeskipping code in most emulators, just with cycles instead of frames per second and no cap.

How about throttling cycles combined with idle detection? That way, when the game doesn't need too many cycles, the CPU usage would be lower. However, there may be compatibiliy issues this way.

Reply 7 of 7, by jal

User metadata
Rank Oldbie
Rank
Oldbie
user222 wrote:

How about throttling cycles combined with idle detection? That way, when the game doesn't need too many cycles, the CPU usage would be lower. However, there may be compatibiliy issues this way.

There is no 'idle time' to detect for DOS programs. Since DOS is a single tasking OS, programs just run all the time. An exception would be waiting for a keypress, but since DOSbox aims mostly at playing games, it would be useless implementing that.

JAL