From 613816e5a42da7cfd5f7bc9c224743acbcfefdfc Mon Sep 17 00:00:00 2001 From: Peter Veenstra Date: Tue, 16 Jun 2009 18:19:18 +0000 Subject: [PATCH] Turn rtc always running trick on. fixes Loadstar: The Legend of Tully Bodine. Imported-from: https://svn.code.sf.net/p/dosbox/code-0/dosbox/trunk@3426 --- src/hardware/cmos.cpp | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/src/hardware/cmos.cpp b/src/hardware/cmos.cpp index c26e1f51..26a0e79f 100644 --- a/src/hardware/cmos.cpp +++ b/src/hardware/cmos.cpp @@ -16,9 +16,10 @@ * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ -/* $Id: cmos.cpp,v 1.28 2009-05-27 09:15:41 qbix79 Exp $ */ +/* $Id: cmos.cpp,v 1.29 2009-06-16 18:19:18 qbix79 Exp $ */ #include +#include #include "dosbox.h" #include "timer.h" @@ -27,6 +28,7 @@ #include "mem.h" #include "bios_disk.h" #include "setup.h" +#include "cross.h" //fmod on certain platforms static struct { Bit8u regs[0x40]; @@ -64,8 +66,9 @@ static void cmos_checktimer(void) { cmos.timer.delay=(1000.0f/(32768.0f / (1 << (cmos.timer.div - 1)))); if (!cmos.timer.div || !cmos.timer.enabled) return; LOG(LOG_PIT,LOG_NORMAL)("RTC Timer at %.2f hz",1000.0/cmos.timer.delay); - PIC_AddEvent(cmos_timerevent,cmos.timer.delay); -// PIC_AddEvent(cmos_timerevent,(double)cmos.timer.delay-fmod(PIC_FullIndex(),(double)cmos.timer.delay)); //Should be more like a real pc. Check +// PIC_AddEvent(cmos_timerevent,cmos.timer.delay); + /* A rtc is always running */ + PIC_AddEvent(cmos_timerevent,(double)cmos.timer.delay-fmod(PIC_FullIndex(),(double)cmos.timer.delay)); //Should be more like a real pc. Check // status reg A reading with this (and with other delays actually) }