First post, by IBM Portable PC
For applications that utilize the time, like BBS software, how accurate can the RTC emulation be?
How many seconds or minutes per hour will generally be lost?
Are there any ways to improve emulated RTC accuracy?
For applications that utilize the time, like BBS software, how accurate can the RTC emulation be?
How many seconds or minutes per hour will generally be lost?
Are there any ways to improve emulated RTC accuracy?
DOSBox is intended for running DOS games, and support for applications is incidental at best. You should consider a different virtualization for your BBS software, more so if you're concerned about issues of accuracy. That said, here's some information about time handling:
DOSBox uses the date and time from the host system when the emulated RTC registers are read directly or through INT 1Ah functions, so it's as accurate as the host.
The BIOS timer ticks, which are separate from the RTC and used by DOS time functions, are initially set to the host time when DOSBox starts up and can drift out of sync with the host as the session goes on. Software running within the emulation can affect the amount/rate of drift. Some unofficial builds have a patch which tries to keep the timer synced with the host.
I would like to add that the RTC was not available on the PC and XT models, and was introduced on the AT.
So there's a good chance that software doesn't try to read the RTC directly, but uses DOS time functions instead, because this is the more compatible and common way to handle time in DOS (in that case, the RTC is only used on startup by DOS to set the initial time, after which it continues keeping time with BIOS ticks).
In other words, you probably aren't looking for good RTC accuracy, but for good timer tick accuracy.
wrote:I would like to add that the RTC was not available on the PC and XT models, and was introduced on the AT.
So there's a good chance that software doesn't try to read the RTC directly, but uses DOS time functions instead, because this is the more compatible and common way to handle time in DOS (in that case, the RTC is only used on startup by DOS to set the initial time, after which it continues keeping time with BIOS ticks).
In other words, you probably aren't looking for good RTC accuracy, but for good timer tick accuracy.
Ah yes, thank you for refreshing my memory from my PCDOS days.....
I spent a few hours with Google and found: http://ansis.lv/uptimer/index.en.php
Uptimer appears to work well with DOSBox, however I have only used it for about one hour. I will update this thread in a few days time once I have time to test further.
wrote:Ah yes, thank you for refreshing my memory from my PCDOS days.....
I spent a few hours with Google and found: http://ansis.lv/uptimer/index.en.php
Uptimer appears to work well with DOSBox, however I have only used it for about one hour. I will update this thread in a few days time once I have time to test further.
I have now tested Uptimer for several hours, over a few days, and have not experienced any issues.
Uptimer keeps the time accurate to at least within a minute or less, likely within about 10 seconds of the hosts clock.
I don't mind using a TSR to correct the time, however I am open to all other suggestions.