diff --git a/core/hw/sh4/modules/tmu.cpp b/core/hw/sh4/modules/tmu.cpp index c5da0f3f3..fde9c9816 100644 --- a/core/hw/sh4/modules/tmu.cpp +++ b/core/hw/sh4/modules/tmu.cpp @@ -233,7 +233,7 @@ static int sched_tmu_cb(int ch, int sch_cycl, int jitter) //schedule next trigger by writing the TCNT register u32 tcor = TMU_TCOR(ch); - write_TMU_TCNTch(ch, tcor + tcnt); + write_TMU_TCNTch(ch, std::max((s32)(tcor + tcnt), 0)); } else { @@ -307,7 +307,6 @@ void tmu_reset(bool hard) } TMU_TOCR=TMU_TSTR=0; TMU_TCOR(0) = TMU_TCOR(1) = TMU_TCOR(2) = 0xffffffff; -// TMU_TCNT(0) = TMU_TCNT(1) = TMU_TCNT(2) = 0xffffffff; TMU_TCR(0) = TMU_TCR(1) = TMU_TCR(2) = 0; UpdateTMUCounts(0);