You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Tested this on my Demon's Souls dump (PPSA01341 v01.005) and it checks out.
On current main, loading eboot.bin dies with Input does not contain a valid ELF header because the PS5 magic 54 14 F5 EE isn't recognized. With 0x5414F5EE accepted (I tried an equivalent local patch), the eboot and the sce_module prx files (libc.prx, libSceNpCppWebApi.prx) all load fine: segments map through the SELF segment table, ~173k relocations get processed, 1173 import stubs resolve, and execution reaches libc.prx module init before crashing in the CPU backend — which is expected, that's separate work.
A few things I saw in that dump that back this change:
The embedded ELF sits at 0x1A0 = 0x20 + segment_count(12) * 0x20, exactly where ParseLayout computes it.
Ident bytes 4..11 (00 01 01 12 01 01 00 00) match the PS4 layout HasKnownLayout already validates — the 4-byte magic really is the only difference.
All 12 segments have compressed_size == decompressed_size and no encrypted (& 0x2) or compressed (& 0x8) flags, so the payload is plaintext and nothing here needs decryption.
While checking this I ended up writing a small xunit fixture suite for SelfLoader (synthetic in-memory PS5/PS4/raw-ELF images, encrypted-segment error path, ident validation). Happy to open it as a follow-up PR once this lands so these paths stay covered.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Add support for loading Prospero/PS5 SELF executables.
Reference
dumper_utils.cpp