From c50e1800ec6ec34c2a2f668fe07c02389f678e7c Mon Sep 17 00:00:00 2001 From: refractionpcsx2 Date: Tue, 3 Jan 2023 17:03:22 +0000 Subject: [PATCH] SPU2: Allow loop rewrite of LOOPSTART if block header already passed --- bin/resources/GameIndex.yaml | 2 ++ pcsx2/SPU2/spu2sys.cpp | 4 ++-- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/bin/resources/GameIndex.yaml b/bin/resources/GameIndex.yaml index 4bbc951038..0bafd85334 100644 --- a/bin/resources/GameIndex.yaml +++ b/bin/resources/GameIndex.yaml @@ -19841,6 +19841,8 @@ SLES-54549: SLES-54550: name: "White Van Racer" region: "PAL-E" + gameFixes: + - InstantDMAHack # Fixes DMA timeout errors. SLES-54551: name: "Premier Manager 2006-2007" region: "PAL-G" diff --git a/pcsx2/SPU2/spu2sys.cpp b/pcsx2/SPU2/spu2sys.cpp index 17addfa678..bb90ff4b41 100644 --- a/pcsx2/SPU2/spu2sys.cpp +++ b/pcsx2/SPU2/spu2sys.cpp @@ -1208,7 +1208,7 @@ static void RegWrite_VoiceAddr(u16 value) case 2: { u32* LoopReg; - if ((Cycles - thisvoice.PlayCycle) < 4) + if ((Cycles - thisvoice.PlayCycle) < 4 && (int)(thisvoice.LoopCycle - thisvoice.PlayCycle) < 0) { LoopReg = &thisvoice.PendingLoopStartA; thisvoice.PendingLoopStart = true; @@ -1226,7 +1226,7 @@ static void RegWrite_VoiceAddr(u16 value) case 3: { u32* LoopReg; - if ((Cycles - thisvoice.PlayCycle) < 4) + if ((Cycles - thisvoice.PlayCycle) < 4 && (int)(thisvoice.LoopCycle - thisvoice.PlayCycle) < 0) { LoopReg = &thisvoice.PendingLoopStartA; thisvoice.PendingLoopStart = true;