From cd6424040dbe939862be9b2462aa95eed16b206f Mon Sep 17 00:00:00 2001 From: LagoLunatic Date: Thu, 29 May 2025 18:38:34 -0400 Subject: [PATCH] Unlink JUTXfb, document the nondeterministic codegen problem instead --- configure.py | 2 +- include/global.h | 3 +-- src/JSystem/JUtility/JUTXfb.cpp | 6 ++++++ 3 files changed, 8 insertions(+), 3 deletions(-) diff --git a/configure.py b/configure.py index 4d648abc4..abc2d8430 100755 --- a/configure.py +++ b/configure.py @@ -947,7 +947,7 @@ config.libs = [ Object(Matching, "JSystem/JUtility/JUTDirectPrint.cpp"), Object(Matching, "JSystem/JUtility/JUTAssert.cpp"), Object(Matching, "JSystem/JUtility/JUTVideo.cpp"), - Object(MatchingFor("GZLJ01", "GZLE01", "GZLP01"), "JSystem/JUtility/JUTXfb.cpp"), + Object(Equivalent, "JSystem/JUtility/JUTXfb.cpp"), Object(Matching, "JSystem/JUtility/JUTFader.cpp"), Object(Matching, "JSystem/JUtility/JUTProcBar.cpp"), Object(Matching, "JSystem/JUtility/JUTConsole.cpp"), diff --git a/include/global.h b/include/global.h index 1dc605591..d7b4a30ee 100644 --- a/include/global.h +++ b/include/global.h @@ -41,11 +41,10 @@ #define WEAKFUNC #endif +#ifndef __MWERKS__ extern int __cntlzw(uint); extern int __rlwimi(int, int, int, int, int); extern void __dcbz(void*, int); - -#ifndef __MWERKS__ extern void __sync(); #endif diff --git a/src/JSystem/JUtility/JUTXfb.cpp b/src/JSystem/JUtility/JUTXfb.cpp index 29bdd55c0..789c48cb6 100644 --- a/src/JSystem/JUtility/JUTXfb.cpp +++ b/src/JSystem/JUtility/JUTXfb.cpp @@ -72,6 +72,12 @@ JUTXfb* JUTXfb::createManager(const GXRenderModeObj* pObj, JKRHeap* pHeap, JUTXf /* 802C8410-802C8468 .text destroyManager__6JUTXfbFv */ void JUTXfb::destroyManager() { + /* Nondeterministically nonmatching */ + // MWCC randomly picks between two different possible codegen patterns for converting sManager + // to a bool for this JUT_CONFIRM call. It usually picks the longer pattern, which is required + // to match on all 3 retail versions. But it sometimes picks the shorter pattern, which is + // required to match on the demo version. There seems to be no consistent way to get it to pick + // one or the other. JUT_CONFIRM(VERSION_SELECT(339, 339, 344, 344), sManager); delete sManager; sManager = NULL;