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

Fix Create PPU Cache, Implement SELF precompilation, Savestate fix 1 out of 3 #14090

Merged
merged 4 commits into from Jun 28, 2023

Conversation

elad335
Copy link
Contributor

@elad335 elad335 commented Jun 24, 2023

  • Fix Create PPU Cache, allow it to be usable again.
  • Implement PPU SELF precompilation, preventing compilation ingame with many game collections, RDR, GT6 and more.
  • Make bad game patches not able to crash the emulator, simply ignore them (bad addresses resulted in segfaults)
  • Add one fix of savestate.

Fixes #12320
Fixes #14080

@elad335 elad335 changed the title Fix Create PPU Cache Fix Create PPU Cache, Savestate fix 1 out of 3 Jun 24, 2023
@elad335 elad335 marked this pull request as draft June 24, 2023 17:56
@elad335 elad335 marked this pull request as ready for review June 24, 2023 18:05
@Darkhost1999
Copy link
Contributor

Creating Cache.log
Booting Game.log
While #14080 is resolved by this PR. 🏆

And #14024 resolved by #14034
There are still issues with the create PPU cache option

Netflix [NPUP00030].log
The 2 sprx and the .self fail to decrypt

Call of Duty Ghosts [BLUS31270].log and many more
The Eboot compiles whilst the other .self files say (prx: Invalid ELF type, ovl: Invalid ELF type)

Meanwhile this is the more I was excited about in the other PR. Yes that is 1.10 compiling
image
The other was seeing AC Revelations (Update) compiling when they hadn't before.

TLDR: This issue solves the goal it was intended to solve. The Function isn't perfect.
And I now tested booting the games after creating cache not just creating the cache.

@Darkhost1999
Copy link
Contributor

The remaining "issues" with the create PPU cache option I believe are and have just been unimplemented and not result of a PR

@Megamouse Megamouse added Bugfix Savestates Anything that involves savestates labels Jun 25, 2023
@elad335 elad335 changed the title Fix Create PPU Cache, Savestate fix 1 out of 3 Fix Create PPU Cache, Implement SELF precompilation, Savestate fix 1 out of 3 Jun 25, 2023
@elad335
Copy link
Contributor Author

elad335 commented Jun 25, 2023

@Darkhost1999 Retest with latest build.

@Darkhost1999
Copy link
Contributor

·F 0:19:35.849168 SIG: Thread terminated due to fatal error: Verification failed
(in file C:\Users\ContainerAdministrator\AppData\Local\Temp\cirrus-ci-build\rpcs3\Emu\System.cpp:1396[:6], in function Load) (error=0x2)
RPCS3.log
You're still pushing changes and so idk if this is useful anymore. lmk when you're ready.

@elad335 elad335 force-pushed the cache branch 4 times, most recently from b30deef to 4e0622b Compare June 25, 2023 14:48
@elad335
Copy link
Contributor Author

elad335 commented Jun 25, 2023

Retry with latest when it builds.
Also it would be nice if someone can benchmark MGS4 precompilation and firmware compilation speeds before and after.
Even with the cache in place (should be faster even to just link modules).

@solarmystic
Copy link

Retry with latest when it builds. Also it would be nice if someone can benchmark MGS4 precompilation and firmware compilation speeds before and after. Even with the cache in place (should be faster even to just link modules).

@elad335 Using the latest test build, with existing PPU cache in place from latest master, MGS4 crashes and takes down rpcs3 after pressing X on this screen.

image

Crashlog:-
RPCS3.log

@elad335
Copy link
Contributor Author

elad335 commented Jun 25, 2023

Retest.

@Ordinary205
Copy link
Contributor

I decided to test it on Watch Dogs, and start the timer for how long it takes to compile/link PPU modules.

Master (15240 Build):
1 minute 31 seconds

PR:
2 minutes 35 seconds

RPCS3.log.gz
RPCS3.log.gz

@elad335 elad335 force-pushed the cache branch 3 times, most recently from 9e04387 to 14cfcee Compare June 26, 2023 09:50
@Ordinary205
Copy link
Contributor

Here's the second results:

Master (15240 Build):
1 minute 31 seconds

PR (14cfcee Build):
1 minute 31 seconds

PR log:
RPCS3.log.gz

No differences of what I can see.

@Ordinary205
Copy link
Contributor

The newest commit seems to have minor performance regression during the PPU compilation.

Before (14cfcee Build):
1 minute 31 seconds

After (6ac2dce Build):
1 minute 36 seconds

RPCS3.log.gz

@ItsLaguna
Copy link

ItsLaguna commented Jun 26, 2023

MGS4 updated to v2.00 still compiles in loading screens despite being precompiled (I'll try to keep up with the commits, but this game takes over an hour)

PPU Cache precomp 14cfcee3.log
run after precompile 14cfcee3.log

@elad335
Copy link
Contributor Author

elad335 commented Jun 26, 2023

Ah because MGS4.SELF is encrypted with special key, rip then, those keys need to be obtained when the game is running in runtime.

@ItsLaguna
Copy link

Ah because MGS4.SELF is encrypted with special key, rip then, those keys need to be obtained when the game is running in runtime.

Well, that is unfortunate 😢

@elad335 elad335 force-pushed the cache branch 2 times, most recently from 0dbb149 to 2535385 Compare June 28, 2023 14:49
@Nekotekina Nekotekina merged commit 554b27a into RPCS3:master Jun 28, 2023
4 of 5 checks passed
@elad335 elad335 deleted the cache branch June 28, 2023 15:55
@MisterbALLIN
Copy link

This update broke RDR GOTY (BLES01294).

With the previous version #14090, Red Dead works well and boots up correctly, but this PR can't boot the game up and crashes the whole emulator when the game finishs precompilation.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bugfix Savestates Anything that involves savestates
Projects
None yet
Development

Successfully merging this pull request may close these issues.

PPU LLVM Precomp not working properly if MGS4 is updated to 2.00 "Create PPU Cache" bad folder name
9 participants