Fix Ratchet & Clank 3 launch over SMB - #1761
Conversation
|
@AKuHAK @rickgaiser @sp193 @israpps @uyjulian @fjtrujy @Wolf3s @KrahJohlito @NathanNeurotic @F0bes I confirm that this PR fixes this issue and this one (more details here). |
|
|
||
| word1 = JAL((unsigned int)&RnC3_AlwaysAllocMem); | ||
| switch (config->GameMode) { | ||
| #ifndef _DTL_T10000 |
There was a problem hiding this comment.
If we now only need to left-shift by 1, it implies that there is an additional right-shift by 1 when using ETH mode today. So if built for the DTL-T10000, we should right-shift by 3 to keep things working.
|
If you needed to change the math, it probably means that the modules loaded changed ever since I originally contributed this. patch - which was built off crazyc's work. If you know why the math is now wrong and can explain why, that would be best. So that future readers can understand which change in OPL caused this patch to evolve in such a way. |
|
You are correct that applying the same one-bit difference to a DTL-T10000 build would change the SMB case from I originally included that case, but removed it from this PR because I do not own or have access to a DTL-T10000 development console and therefore cannot test it. This PR is intentionally limited to the configuration I could verify: I also traced the regression more precisely. Reports show that DB 792 works over SMB and DB 793 is the first broken build. The corresponding r793 change is commit The likely explanation is that loading this temporary IOP module changed the module list/layout inspected by the game's I have not instrumented the live IOP module list, so the |
|
Sounds plausible enough to me. Thank you for looking into this. This change is what we need. I would prefer including a change for the T10000 for completeness, but it is possible that I was always the only guy who got one. Yeah, it doesn't concern most people and I have no objections, even if you do not include a fix for this. |
What changed
Use an SMB-specific pointer recovery shift in the existing Ratchet & Clank 3: Up Your Arsenal patch for retail builds.
For
ETH_MODEoutside_DTL_T10000, the patch now usessll $v1, $v0, 1. The existing behavior remains unchanged for DTL-T10000 and every non-SMB backend.Why
The game derives an IOP memory pointer from the loaded module layout. Its
iop_stash_daemonshifts that pointer while scanning module names.The SMB module layout on the tested retail configuration causes one fewer right shift than the layouts handled by the existing default path. Recovering the pointer with the default two-bit retail shift therefore produces the wrong address and prevents the game from launching over SMB.
Testing
git diff --checkand the repository format check pass locally.A full local build was unavailable because the test workspace does not include PS2SDK; repository CI can provide the complete build matrix.