From 049c81dc1edeed45c13473eed326b447368d9e74 Mon Sep 17 00:00:00 2001 From: Dario Date: Mon, 11 Nov 2024 20:12:44 -0300 Subject: [PATCH] Database replacement version, F3DEX2 force matrix, big texture TMEM check. --- src/common/rt64_replacement_database.h | 2 +- src/gbi/rt64_gbi_f3dex2.cpp | 3 +-- src/hle/rt64_state.cpp | 4 ++-- 3 files changed, 4 insertions(+), 5 deletions(-) diff --git a/src/common/rt64_replacement_database.h b/src/common/rt64_replacement_database.h index 9d167a8..4a764ce 100644 --- a/src/common/rt64_replacement_database.h +++ b/src/common/rt64_replacement_database.h @@ -44,7 +44,7 @@ namespace RT64 { struct ReplacementConfiguration { ReplacementAutoPath autoPath = ReplacementAutoPath::RT64; uint32_t configurationVersion = 2; - uint32_t hashVersion = 2; + uint32_t hashVersion = 3; }; struct ReplacementHashes { diff --git a/src/gbi/rt64_gbi_f3dex2.cpp b/src/gbi/rt64_gbi_f3dex2.cpp index a99bf36..9f3a12c 100644 --- a/src/gbi/rt64_gbi_f3dex2.cpp +++ b/src/gbi/rt64_gbi_f3dex2.cpp @@ -40,8 +40,7 @@ namespace RT64 { state->rsp->setViewport((*dl)->w1); break; case F3DEX2_G_MV_MATRIX: - assert(false && "Unimplemented move matrix"); - *dl = *dl + 1; + state->rsp->forceMatrix((*dl)->w1); break; case F3DEX2_G_MV_LIGHT: { uint8_t offset = (*dl)->p0(8, 8) * 8; diff --git a/src/hle/rt64_state.cpp b/src/hle/rt64_state.cpp index a751267..f5d92a7 100644 --- a/src/hle/rt64_state.cpp +++ b/src/hle/rt64_state.cpp @@ -839,10 +839,10 @@ namespace RT64 { // FIXME: A safety check to only do this on textures that were determined to be big was added until the // correctness of the texcoord determination can be guaranteed to not cause issues elsewhere. const bool bigTextureCheck = (callTile.sampleWidth > 0x1000) || (callTile.sampleHeight > 0x1000); - if (bigTextureCheck && !TMEMHasher::requiresRawTMEM(callTile.loadTile, maxTexcoord.x, maxTexcoord.y)) { + if (bigTextureCheck) { callTile.sampleWidth = maxTexcoord.x; callTile.sampleHeight = maxTexcoord.y; - callTile.rawTMEM = false; + callTile.rawTMEM = TMEMHasher::requiresRawTMEM(callTile.loadTile, maxTexcoord.x, maxTexcoord.y); } }