Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

PPU LLVM Precomp not working properly if MGS4 is updated to 2.00 #12320

Closed
ItsLaguna opened this issue Jul 7, 2022 · 16 comments · Fixed by #14090 or #16764
Closed

PPU LLVM Precomp not working properly if MGS4 is updated to 2.00 #12320

ItsLaguna opened this issue Jul 7, 2022 · 16 comments · Fixed by #14090 or #16764

Comments

@ItsLaguna
Copy link

ItsLaguna commented Jul 7, 2022

Quick summary

PPU LLVM Precompilation doesn't work correctly if the game is updated to ver 2.00

Details

PPU LLVM Precompilation works correctly in the disc version (v1.00), this means that after going through the whole process you won't compile in loading screens, but if it's updated to v2.00 and precompiled, you'll have to compile modules in each loading screen. Can't be reproduced in 25th Anniversary version or Digital version (as both already come as 2.00 and they can't be updated).

Before finding out what it seems to be an issue exclusive to disc versions (which contain the 1.00 data and can be updated) I tried older versions of the emulator in case it was a regression to no avail (will attach some of the logs).

Please provide your system configuration:

  • OS: Windows 10 Pro
  • CPU: Ryzen 7 5800X
  • GPU: Nvidia RTX 2060
  • Driver version: 516.40.0.0
  • RPCS3 version: happens on any version.

Please include.

  • Anything else you deem to be important

Sadly I don't have 25th Anniversary and haven't dumped my digital version of the game, had 2 friends test for me. Luckily it's easy to replicate but kind of time-consuming. Someone else in the discord did it too and also noticed the SELF files weren't being decrypted, but I don't know if it's related.

RPCS3 v0.0.15-12071-5ca63816.log
RPCS3 v0.19-13069-0ab36ef4.log
RPCS3 vv0.0.18-12860-02e1c498.log
RPCS3 vv0.0.23-13857-3840015e.log

@elad335
Copy link
Contributor

elad335 commented Jul 7, 2022

It's because non-EBOOT.BIN ELF file and encrypted file precompilation is not implemented.

@ItsLaguna
Copy link
Author

Are there other games affected by this? I only noticed this game in particular, but glad to see it's a known issue.

@Darkhost1999
Copy link
Contributor

Yea there are other games effected and it's not exactly an issue just an unimplemented feature. I got plenty of games I batch compile all of my PPU modules and then launch them and have to wait for the update files or dlc to also compile.
A game like shadow of mordor just does absolutely nothing to precompile in the batch compiler. But it precompiles just fine before I actually get in game.

Cause the loading screens you're refering to are the ones immediately after booting a game and before the game goes into the menus right?

@ItsLaguna
Copy link
Author

ItsLaguna commented Jul 7, 2022

It's also "in-game", most of the time when loading a new area.

For example, in Act 2 there's a cutscene that happens when you get close to a vehicle, iirc it goes: compiles first loading screen, cutscene and a last loading screen before you go back in-game, it won't compile the area because you already did that when you entered.

(Wish I could explain it any better, might as well just record it and link it here if needed)
https://streamable.com/tfr7y2 / Start to 1:00 Compiling area - 2:16 to 3:22 again compiling modules

@Snakeskiin
Copy link

Snakeskiin commented Oct 10, 2022

I had the same issue on my copy BLUS30109. I found that if I cleared all caches and then launched the game with ppu precompilation selected it would pre-load all modules for the entire game. You might try clearing profile (save games - system data) before launching as well because that setting might affect the "installation act by act" or "total installation" feature in-game. I can't remember if this process broke my save or not so be cautious. I found that launching the game even once without ppu precompilation selected would make precompilation impossible without doing the above process. The precompilation process takes a while as well, the developers put a ton of modules in this game, for me it was about 30-40 minutes, maybe more.

Basically if you want to precompile and cache the whole game's modules the caches need to be 100% clear before launching the game WITH precompilation selected. If the game is loaded without precompilation selected with the caches clear it will only load necessary modules and the game will compile load screen by load screen even if you turn the setting back on.

@ItsLaguna
Copy link
Author

I had the same issue on my copy BLUS30109. I found that if I cleared all caches and then launched the game with ppu precompilation selected it would pre-load all modules for the entire game. You might try clearing profile (save games - system data) before launching as well because that setting might affect the "installation act by act" or "total installation" feature in-game. I can't remember if this process broke my save or not so be cautious. I found that launching the game even once without ppu precompilation selected would make precompilation impossible without doing the above process. The precompilation process takes a while as well, the developers put a ton of modules in this game, for me it was about 30-40 minutes, maybe more.

Basically if you want to precompile and cache the whole game's modules the caches need to be 100% clear before launching the game WITH precompilation selected. If the game is loaded without precompilation selected with the caches clear it will only load necessary modules and the game will compile load screen by load screen even if you turn the setting back on.

Did you read anything in the first post? xD

@Snakeskiin
Copy link

I had the same issue on my copy BLUS30109. I found that if I cleared all caches and then launched the game with ppu precompilation selected it would pre-load all modules for the entire game. You might try clearing profile (save games - system data) before launching as well because that setting might affect the "installation act by act" or "total installation" feature in-game. I can't remember if this process broke my save or not so be cautious. I found that launching the game even once without ppu precompilation selected would make precompilation impossible without doing the above process. The precompilation process takes a while as well, the developers put a ton of modules in this game, for me it was about 30-40 minutes, maybe more.
Basically if you want to precompile and cache the whole game's modules the caches need to be 100% clear before launching the game WITH precompilation selected. If the game is loaded without precompilation selected with the caches clear it will only load necessary modules and the game will compile load screen by load screen even if you turn the setting back on.

Did you read anything in the first post? xD

Was trying to help, what did I miss?

@ItsLaguna
Copy link
Author

ItsLaguna commented Oct 10, 2022

Was trying to help, what did I miss?

Main post and elad's reply.

PPU LLVM Precompilation works correctly in the disc version (v1.00), this means that after going through the whole process you won't compile in loading screens, but if it's updated to v2.00 and precompiled, you'll have to compile modules in each loading screen.

It's my bad that I didn't explicitly state that the tests were done by completely compiling, opening the game to check and then removing the cache before precompiling again. But I considered it was obvious, so omitted it.

mb if I sounded mad or something, just found the situation funny xD

@Snakeskiin
Copy link

Was trying to help, what did I miss?

Main post and elad's reply.

PPU LLVM Precompilation works correctly in the disc version (v1.00), this means that after going through the whole process you won't compile in loading screens, but if it's updated to v2.00 and precompiled, you'll have to compile modules in each loading screen.

It's my bad that I didn't explicitly state that the tests were done by completely compiling, opening the game to check and then removing the cache before precompiling again. But I considered it was obvious, so omitted it.

mb if I sounded mad or something, just found the situation funny xD

All good for real I'm also new and I don't wanna make anyone mad either xD. That really sucks because I had to do the same thing with my copy since I was having the same issue and it worked. The only other thing I could think of that I did was backup/delete/remove the system data and save game in save games which would force the game to open like brand new, maybe that could work? If that's useless I'm so sorry haha.

@ItsLaguna
Copy link
Author

ItsLaguna commented Oct 10, 2022

Was trying to help, what did I miss?

Main post and elad's reply.

PPU LLVM Precompilation works correctly in the disc version (v1.00), this means that after going through the whole process you won't compile in loading screens, but if it's updated to v2.00 and precompiled, you'll have to compile modules in each loading screen.

It's my bad that I didn't explicitly state that the tests were done by completely compiling, opening the game to check and then removing the cache before precompiling again. But I considered it was obvious, so omitted it.
mb if I sounded mad or something, just found the situation funny xD

All good for real I'm also new and I don't wanna make anyone mad either xD. That really sucks because I had to do the same thing with my copy since I was having the same issue and it worked. The only other thing I could think of that I did was backup/delete/remove the system data and save game in save games which would force the game to open like brand new, maybe that could work? If that's useless I'm so sorry haha.

Np man, and that didn't work either as I tried in different builds in case it was a regression, but it's an unimplemented feature apparently. I could try again in case something's changed somehow.

EDIT: Tried again and nothing @Snakeskiin, so it's def what elad mentioned.

@Snakeskiin
Copy link

Sorry to hear that I'm sorry I couldn't help :/

@AniLeo
Copy link
Member

AniLeo commented May 21, 2023

Can still reproduce on v0.0.27-15035-73dba6d6

@elad335
Copy link
Contributor

elad335 commented Jun 25, 2023

Test with #14090

@elad335
Copy link
Contributor

elad335 commented Jun 28, 2023

Implemented SELF precompilation but not fixed unfortunately, need to reverse keys for MGS4.SELF in code for it to work.

@MSuih MSuih reopened this Jun 28, 2023
@YoussefElbasha

This comment has been minimized.

@ItsLaguna
Copy link
Author

So any version of the game that is listed as version 02.00 in rpsc3 experiences this bug?

No, only the versions that can be updated to 2.00, base 2.00 ones don't.
Also has nothing to do with issue you mentioned this in.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
7 participants