OSDev.org

The Place to Start for Operating System Developers
It is currently Sat May 18, 2024 10:45 am

All times are UTC - 6 hours




Post new topic Reply to topic  [ 3 posts ] 
Author Message
 Post subject: counting seconds
PostPosted: Sun Feb 03, 2008 3:10 pm 
Offline
Member
Member

Joined: Fri Jul 13, 2007 6:37 am
Posts: 199
Location: Stuttgart/Germany
hi

if i set my clock to a rate generator and set the reload value to 0x91A7 and then increment the "number of seconds" counter on every 32nd clock interrupt, that should be correct, or am i doing some calculation wrong?

im running on bochs and to me it seems seconds are passing *way* to fast (maybe even twice as fast as they should)...is that due to some inaccuracy with bochs or are my calculations wrong?


Top
 Profile  
 
 Post subject:
PostPosted: Sun Feb 03, 2008 3:24 pm 
Offline
Member
Member
User avatar

Joined: Fri Aug 03, 2007 6:03 am
Posts: 536
Location: Cambridge, UK
bochs timer is always fast, you can sync it to real time and it should be normal.

Try it with another emulator

_________________
~ Lukem95 [ Cake ]
Release: 0.08b
Image


Top
 Profile  
 
 Post subject:
PostPosted: Mon Feb 04, 2008 9:40 am 
Offline
Member
Member
User avatar

Joined: Wed Oct 18, 2006 3:45 am
Posts: 9301
Location: On the balcony, where I can actually keep 1½m distance
bochs is by default set for speed and repeatability. i.e. time passes as fast as bochs can make it pass

to fix this, either use the realtime or the slowdown timer. The realtime one is faster, the slowdown is more accurate. check your bochs config for the IPS and clock lines and read the corresponding documentation

_________________
"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 ]


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 3 posts ] 

All times are UTC - 6 hours


Who is online

Users browsing this forum: Google [Bot] and 7 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group