Page 1 of 1

Bochs runs too fast

Posted: Sun Jan 07, 2007 11:13 am
by Lprogster
Hi, simple question here:

My OS is working fine on a disk, but when I run it on Bochs it seems to speed up. I guess there is some command i can add to bochsrc.txt file (or something) to make it run at the real speed.

Thanks,
Lprogster

Posted: Sun Jan 07, 2007 11:46 am
by Dragon_Hilord
Taken and cleaned up (for relevance) from the BOCHS example bochsrc:
#=======================================================================
# CPU:
# This defines cpu-related parameters inside Bochs:
#

# IPS:
# Emulated Instructions Per Second. This is the number of IPS that bochs
# is capable of running on your machine. You can recompile Bochs with
# --enable-show-ips option enabled, to find your workstation's capability.
# Measured IPS value will then be logged into your log file or status bar
# (if supported by the gui).
#
# IPS is used to calibrate many time-dependent events within the bochs
# simulation. For example, changing IPS affects the frequency of VGA
# updates, the duration of time before a key starts to autorepeat, and
# the measurement of BogoMips and other benchmarks.
#
# Examples:
#
# Bochs Machine/Compiler Mips
# ____________________________________________________________________
# 2.2.6 2.6Ghz Intel Core 2 Duo with WinXP/g++ 3.4 21 to 25 Mips
# 2.2.6 2.1Ghz Athlon XP with Linux 2.6/g++ 3.4 12 to 15 Mips
# 2.0.1 1.6Ghz Intel P4 with Win2000/g++ 3.3 5 to 7 Mips
# 1.4 650Mhz Athlon K-7 with Linux 2.4.4/egcs-2.91.66 2 to 2.5 Mips
# 1.4 400Mhz Pentium II with Linux 2.0.36/egcs-1.0.3 1 to 1.8 Mips
#=======================================================================
Simply put, you gotta mod your IPS count :wink:

Cheers, DH.

Posted: Sun Jan 07, 2007 11:52 am
by Combuster
More effective: you can set the clock to the slowdown timer which will add delays in execution to match real time, without changing other behaviour.

Code: Select all

clock: sync=slowdown, time0=local

Posted: Fri Jan 12, 2007 9:31 pm
by earlz
thing that is annoying with bochs ips count, is when debugging it's useful to set ips to something like 1000 or 100, or even 1 or 10, but the thing is that it could take hours to get through all of the bios startup code...