From 4d58ee6a75f2db18ef5e67fcb9f718df7a269c1c Mon Sep 17 00:00:00 2001 From: Liam Middlebrook Date: Sat, 13 Apr 2024 11:10:21 -0700 Subject: [PATCH] krnl386.exe: Start DOSVM timer on GET_SYSTEM_TIME. Start the DOSVM tick timer when the GET_SYSTEM_TIME interrupt (int 1a ah 00) is fired. This fixes a bug when running Sid Meier's CIVILIZATION for Windows 3.1 where the game would appear to hang at the launch screen (although sound would play as expected). This was due to the BIOSDATA.Ticks field never being updated. Signed-off-by: Liam Middlebrook --- dlls/krnl386.exe16/interrupts.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/dlls/krnl386.exe16/interrupts.c b/dlls/krnl386.exe16/interrupts.c index e062b497853..5087d1b7a03 100644 --- a/dlls/krnl386.exe16/interrupts.c +++ b/dlls/krnl386.exe16/interrupts.c @@ -549,6 +549,8 @@ static void WINAPI DOSVM_Int1aHandler( CONTEXT *context ) case 0x00: /* GET SYSTEM TIME */ { BIOSDATA *data = DOSVM_BiosData(); + + DOSVM_start_bios_timer(); SET_CX( context, HIWORD(data->Ticks) ); SET_DX( context, LOWORD(data->Ticks) ); SET_AL( context, 0 ); /* FIXME: midnight flag is unsupported */