diff --git a/core/hw/sh4/modules/tmu.cpp b/core/hw/sh4/modules/tmu.cpp index fde9c9816..6e07b4c8a 100644 --- a/core/hw/sh4/modules/tmu.cpp +++ b/core/hw/sh4/modules/tmu.cpp @@ -233,7 +233,8 @@ 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, std::max((s32)(tcor + tcnt), 0)); + // Don't miss an underflow if tcor is less than -tcnt + write_TMU_TCNTch(ch, (u32)std::max((u64)tcor + (s32)tcnt, 0)); } else {