On Sun, Jan 17, 1999 at 04:14:05PM +0100, Hans Lermen wrote:
> > Sure. I take it that it worked for you, then? I never got any feedback
> > on it. It didn't make it into 98.5. Maintainers, what needs to be done
> > to get it in there?
>
> You should prove that it doesn't break socalled 'compatible' DOS behave;-)
> ( We had a lot of kludges for this thing in the past. )
> As it is currently, it servs the majority of DOS apps, with the patch
> the behave for those apps could change. The midnight flag thing is a
> design flaw of IBM (not dosemu) and you never can make happy all involved
> parties;-)
I don't think so... the problem is in INT 1A:00, and the midnight flag is
ALWAYS cleared when this function exits, when it calls set_ticks(). I
think the problem you are refering to is when the timer is read directly,
*without* using INT 1A.
The problem is that INT 1A, as it exists in 98.5, adjusts last_ticks
directly when the midnight overflow is set. usr_delta_ticks, which
contains the offset in ticks of the current time of day relative to
the start of the emulator, is not reset. So, the next tine INT 8 is
called, which is once every 20 seconds or so, it will reset the midnight
flag, causing the date to advance again.
The patch adjusts usr_delta_ticks INSTEAD of last_ticks, which seems to
be the right thing to do. It doesn't affect the loss of the midnight
flag directly; it just keeps it from getting reset after it is cleared.
> As I last checked it, waiting for the role-over at the DOS prompt
> doesn't show the bug. Polling the BIOS in the DOS application and
> bypassing DOS, however, will lead to problems _due_ to the design flaw.
It is DEFINATELY visable from DOS. Just start the emulator, set the clock
to 23:59 or so with the date command, then wait until after the rollover.
Type "time" to check the time. The first time, everything will seem fine.
Now, do it again. The day will have advanced by one. Each time you
do anything that calls INT1A:00, the day will advance by one. In fact,
if you just let the time command sit at it's prompt for a while, the
day will advance a few times, because time calls INT1A every few seconds
while it is running.
Programs that call INT1A many times per second, like in the busy loop of
a BBS, will appear to accelerate years at a time.
--
/// Stefan Hudson <[EMAIL PROTECTED]>
__ /// Senior Network Administrator - Monterey Bay Internet
\\\/// http://www.mbay.net/ - Email: [EMAIL PROTECTED]
\XX/ Voice: 831-642-6100 Fax: 831-642-6101 Modem: 831-642-6102