From 06297a72aecd0c71fa2a05e77f80695cd1ecb745 Mon Sep 17 00:00:00 2001 From: Peter Veenstra Date: Mon, 10 Jul 2006 09:27:37 +0000 Subject: [PATCH] Don't raise irq 0 when programming a new timer instantatanously. Take in account that the hardware requires some time to be setup as well. Imported-from: https://svn.code.sf.net/p/dosbox/code-0/dosbox/trunk@2669 --- src/hardware/timer.cpp | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/src/hardware/timer.cpp b/src/hardware/timer.cpp index 7a214203..bc2a6763 100644 --- a/src/hardware/timer.cpp +++ b/src/hardware/timer.cpp @@ -16,7 +16,7 @@ * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ -/* $Id: timer.cpp,v 1.38 2006-05-19 10:34:02 qbix79 Exp $ */ +/* $Id: timer.cpp,v 1.39 2006-07-10 09:27:37 qbix79 Exp $ */ #include #include "dosbox.h" @@ -295,8 +295,11 @@ static void write_p43(Bitu /*port*/,Bitu val,Bitu /*iolen*/) { if (latch == 0) { PIC_RemoveEvents(PIT0_Event); - if (!counter_output(0) && mode) + if (!counter_output(0) && mode) { PIC_ActivateIRQ(0); + //Don't raise instantaniously. (Origamo) + if(CPU_Cycles < 25) CPU_Cycles = 25; + } if(!mode) PIC_DeActivateIRQ(0); }