VOGONS


First post, by kekko

User metadata
Rank Oldbie
Rank
Oldbie

Hi,
I'm looking for a stand alone patch, compatible with current cvs, which simply shows the current cpu cycles in the titlebar when cycles=auto or max, once per second.
Does it exist?

Thanks 😀

Reply 1 of 4, by wd

User metadata
Rank DOSBox Author
Rank
DOSBox Author

There's no ready-to-use-patch, but check out GFX_SetTitle in sdlmain.cpp
(change it to display the value instead of auto) and Normal_Loop in dosbox.cpp
where you need to call GFX_SetTitle when CPU_CycleMax is changed due to
the max cycles code.
If you want it per-second only you need to add some more checkings though.

Reply 2 of 4, by kekko

User metadata
Rank Oldbie
Rank
Oldbie

Thanks, woody!
I removed the AutoAdjust check in GFX_SetTitle then I called the function inside normal_loop (executed on CPU_CycleMax change).

😀

Reply 3 of 4, by wd

User metadata
Rank DOSBox Author
Rank
DOSBox Author

In some cases (when always calling that function) it may slowdown the system,
don't know if this happens for windows/linux though.

Reply 4 of 4, by kekko

User metadata
Rank Oldbie
Rank
Oldbie

I put the call somewhere inside the
if (ticksScheduled >= 250 || ticksDone >= 250 || ...
I ran some benchmarks (quake timedemo, pcpbench) and it doesn't seem much slower compared to unmodified source.