loader: support ps5 SELF and validate ELF signatures#157
Conversation
|
Tested this on my Demon's Souls dump (PPSA01341 v01.005) and it checks out. On current A few things I saw in that dump that back this change:
While checking this I ended up writing a small xunit fixture suite for |
I have do that in #89 and for loading ELF files : In SelfLoader -> ParseLayout function |
Thanks for testing this and for the details. I hit the same issue on a Space Adventure Cobra dump (PPSA17337), which is what led me to this fix in the first place. Once the PS5 SELF magic was accepted, it started loading correctly. |
Brings in 22 upstream commits, notably the host platform abstraction for the execution engine (sharpemu#181), multiple render targets (sharpemu#149), the SELF/ELF loader hardening (sharpemu#157), the SysAbi export corrections (sharpemu#167, sharpemu#189), and a new SharpEmu.Libs.Tests project. Conflicts resolved (upstream design taken as the source of truth): - DirectExecutionBackend.cs: adopt upstream's IHostPlatform abstraction. Dropped the fork's dead CreateExceptionHandlerTrampoline plus its _virtualQueryAddress/GetProcAddress(kernel32) resolution; the trampoline is superseded by WindowsFaultHandling.CreateHandlerThunk, which is what the merged Exceptions.cs now installs. QueryPerformanceCounter now resolves through _hostSymbols. Kept both added usings. (Note: the fork's MEM_IMAGE native fault pre-classification is not carried over; upstream's fault path routes through the managed VectoredHandler.) - Gen5SpirvTranslator.cs: take upstream's pixel-output export, which preserves the existing output value for a masked-off component (read via CompositeExtract) instead of writing zero, and uses the per-output Kind/Type/Variable model. - VulkanVideoPresenter.cs: drop the fork's unused GetRenderTargetFormat; upstream's TryDecodeRenderTargetFormat/VulkanRenderTargetFormat supersede it. The guest-frame present-trace cadence tweak is retained. - AgcExports.cs (auto-merged duplicate): keep upstream's sceAgcDcbJump (clean dcb/target/sizeDwords ABI) and remove the fork's probing variant plus its now-dead TryReadDcbJumpArguments/IsReadableDcbSegment helpers. The fork-only sceAgcDcbJumpGetSize and the indirect-buffer DCB recursion in ParseSubmittedDcb are retained. Validation: dotnet restore --locked-mode, Release build (0/0), and dotnet test (18/18) all pass; GTA V (PPSA04264) boots cleanly across repeated runs with no regression.
Add support for loading Prospero/PS5 SELF executables.
Reference
dumper_utils.cpp