From 4ab6a047f6d39e8a7f2fef008880e17ca3395dbe Mon Sep 17 00:00:00 2001 From: screamm Date: Sun, 11 Oct 2026 18:23:16 +0200 Subject: [PATCH] feat(libSceRazorCpu): implement sceRazorCpuSync PRAGMATA (PPSA02530) imports sceRazorCpuSync (NID Ax7NjOzctIM), which no library exports on main, so the load fails on the unresolved import. The title calls it after sceConvertKeycodeGetCharacter. From #3043 (comment 6106731532): "`sceRazorCpuSync`: answering 0 and doing nothing was enough to carry on (the other `sceRazorCpu*` calls in `main` are no-ops without a capture)." SharpProspero src/SharpProspero/Interop/Debug/RazorCpu.cs:119-122 (5dfdb4b0b166e83dc9ae275001afb695f12c7174, GPL-3.0, used as a source of facts) gives int sceRazorCpuSync(void), an unnamed frame-boundary event. Without a capture there is no event to record, so it returns 0 and does nothing, like the other sceRazorCpu markers here and the shadPS4 stub (razor_cpu.cpp:143, 3a9f57265d28975658f1ca941daa5c879c7a74bd). The NID hashes from the name and is in aerolib. Unverified points are in TechnicalDebt. Co-Authored-By: Claude Fable 5.1 --- core/libs/prx/libSceRazorCpu/Export.cpp | 4 ++++ core/libs/tests/GuestRazorCpu.cpp | 4 ++++ docs/dev/debt/libSceRazorCpu.md | 1 + 3 files changed, 9 insertions(+) diff --git a/core/libs/prx/libSceRazorCpu/Export.cpp b/core/libs/prx/libSceRazorCpu/Export.cpp index 7b418022c..23369d115 100644 --- a/core/libs/prx/libSceRazorCpu/Export.cpp +++ b/core/libs/prx/libSceRazorCpu/Export.cpp @@ -59,4 +59,8 @@ int APS5_VABI sceRazorCpuWriteBookmark(const char* label, const char* descriptio return 0; } +int APS5_VABI sceRazorCpuSync(void) { + return 0; +} + } diff --git a/core/libs/tests/GuestRazorCpu.cpp b/core/libs/tests/GuestRazorCpu.cpp index e4af18eed..85f04438f 100644 --- a/core/libs/tests/GuestRazorCpu.cpp +++ b/core/libs/tests/GuestRazorCpu.cpp @@ -13,6 +13,7 @@ int APS5_VABI sceRazorCpuPopMarker(void); int APS5_VABI sceRazorCpuFlushOccurred(std::uint64_t* timeSpentInFlush); int APS5_VABI sceRazorCpuPlotValue(const char* series, float value); int APS5_VABI sceRazorCpuWriteBookmark(const char* label, const char* description); +int APS5_VABI sceRazorCpuSync(void); } namespace { @@ -41,4 +42,7 @@ int main() { Require(sceRazorCpuPlotValue("read time (ms)", 1.5f) == 0); Require(sceRazorCpuWriteBookmark("read timeout", "lba=0x10") == 0); Require(sceRazorCpuWriteBookmark("read timeout", nullptr) == 0); + Require(sceRazorCpuSync() == 0); + Require(sceRazorCpuSync() == 0); + Require(sceRazorCpuIsCapturing() == 0); } diff --git a/docs/dev/debt/libSceRazorCpu.md b/docs/dev/debt/libSceRazorCpu.md index 74dd2dc4f..0c42c424a 100644 --- a/docs/dev/debt/libSceRazorCpu.md +++ b/docs/dev/debt/libSceRazorCpu.md @@ -3,6 +3,7 @@ ### Silent stubs - [sceRazorCpuPushMarker](../../../core/libs/prx/libSceRazorCpu/Export.cpp) (libSceRazorCpu) - signature (label, color, flags) from [SharpProspero](https://github.com/SvenGDK/SharpProspero), the same as sceRazorCpuPushMarkerStatic's except that the label is copied; it does nothing without a capture and returns 0 +- [sceRazorCpuSync](../../../core/libs/prx/libSceRazorCpu/Export.cpp) (libSceRazorCpu) - the `int(void)` signature and its meaning, an unnamed frame-boundary event, come from [SharpProspero](https://github.com/SvenGDK/SharpProspero/blob/5dfdb4b0b166e83dc9ae275001afb695f12c7174/src/SharpProspero/Interop/Debug/RazorCpu.cs#L119-L122). Without a capture there is no event to record, so it does nothing and returns 0, like the other `sceRazorCpu*` markers here and the [shadPS4](https://github.com/shadps4-emu/shadPS4/blob/3a9f57265d28975658f1ca941daa5c879c7a74bd/src/core/libraries/razor_cpu/razor_cpu.cpp#L143-L146) stub. PRAGMATA (PPSA02530) continues on 0; the console's result with no capture attached is unverified ### Unknown function info