From c0d27a9eb5f573d94b1404cf45998f0f8570e249 Mon Sep 17 00:00:00 2001 From: Floogle <18466542+skyfloogle@users.noreply.github.com> Date: Sun, 31 Mar 2024 19:27:36 +0200 Subject: [PATCH] improve nester's funky bowling speedhack --- source/common/drc_core.c | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/source/common/drc_core.c b/source/common/drc_core.c index 3b46e0d..6b8d4a3 100644 --- a/source/common/drc_core.c +++ b/source/common/drc_core.c @@ -383,9 +383,11 @@ static void drc_findLastConditionalInst(int pos) { break; case V810_OP_JAL: // nester's funky bowling calls a function to do its busywait read - // and it does this twice - if (tVBOpt.CRC32 == 0xDF4D56B4 && (inst_cache[i].PC == 0x700a01a || inst_cache[i].PC == 0x700a094)) - break; + // and it does this several times + if (tVBOpt.CRC32 == 0xDF4D56B4 && ( + inst_cache[i].PC + inst_cache[i].branch_offset == 0x07005326 || + inst_cache[i].PC + inst_cache[i].branch_offset == 0x07001f2c + )) break; case V810_OP_ADD: case V810_OP_OR: // only certain operators are ok for busywait here, otherwise fallthrough