Bochs runs too fast

Question about which tools to use, bugs, the best way to implement a function, etc should go here. Don't forget to see if your question is answered in the wiki first! When in doubt post here.
Post Reply
Lprogster
Member
Member
Posts: 174
Joined: Tue Nov 14, 2006 11:59 am

Bochs runs too fast

Post 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
Dragon_Hilord
Posts: 3
Joined: Tue Jan 02, 2007 2:21 pm
Location: Saint John, NB.

Post 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.
User avatar
Combuster
Member
Member
Posts: 9301
Joined: Wed Oct 18, 2006 3:45 am
Libera.chat IRC: [com]buster
Location: On the balcony, where I can actually keep 1½m distance
Contact:

Post 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
"Certainly avoid yourself. He is a newbie and might not realize it. You'll hate his code deeply a few years down the road." - Sortie
[ My OS ] [ VDisk/SFS ]
earlz
Member
Member
Posts: 1546
Joined: Thu Jul 07, 2005 11:00 pm
Contact:

Post 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...
Post Reply