Bochs config (ips)

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
Jane1991c
Posts: 22
Joined: Mon Oct 21, 2013 3:48 pm

Bochs config (ips)

Post 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 ?
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:

Re: Bochs config (ips)

Post 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).
"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 ]
Jane1991c
Posts: 22
Joined: Mon Oct 21, 2013 3:48 pm

Re: Bochs config (ips)

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