Page 1 of 1

Bochs config (ips)

Posted: Mon Nov 11, 2013 2:54 pm
by Jane1991c
Hey,
This thread is continue of http://forum.osdev.org/viewtopic.php?f= ... 8&p=229216 (using PIT Timer)
Please forgive me, creating new topic about same thing, but my code I have presented there seems to be OK, and it seems problem is with bochsrc config file.

First of all i want to say it's deafult with added config for floppy 1_44 reading.

I have found some quotes at internet and i found out that changing ips make interrupts working slower or faster
- if ips value is higher then interrupts become slower
- if ips value become lower then interrupts come faster

It doesnt make any sense

Can any one explain it for me ?

Re: Bochs config (ips)

Posted: Mon Nov 11, 2013 3:38 pm
by Combuster
The default setting for bochs is to run as fast as possible, regardless of actual time. If you increase the instructions per second, that means your real CPU needs to do more per second to emulate your machine, and therefore the amount of emulated seconds per real second decreases, and the observed timer interrupts do the same.

What you're probably looking for is either sync=slowdown (add delays so that emulated seconds match real seconds) or sync=realtime (ignore configured IPS, perform as many cycles such that emulated time matches real time.) I personally prefer the slowdown setting because you can realistically emulate slow computers and you get identical simulations on each run (if there's no user interaction involved).

Re: Bochs config (ips)

Posted: Mon Nov 11, 2013 3:52 pm
by Jane1991c
Combuster wrote:The default setting for bochs is to run as fast as possible, regardless of actual time. If you increase the instructions per second, that means your real CPU needs to do more per second to emulate your machine, and therefore the amount of emulated seconds per real second decreases, and the observed timer interrupts do the same.

What you're probably looking for is either sync=slowdown (add delays so that emulated seconds match real seconds) or sync=realtime (ignore configured IPS, perform as many cycles such that emulated time matches real time.) I personally prefer the slowdown setting because you can realistically emulate slow computers and you get identical simulations on each run (if there's no user interaction involved).

My current bochsrc for clock is:
clock: sync=none, time0=local, rtc_sync=0