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 <noreply@anthropic.com>
This commit is contained in:
screamm 2026-10-11 18:23:16 +02:00 committed by Adrià Franch
parent 5690b84a49
commit 4ab6a047f6
3 changed files with 9 additions and 0 deletions

View File

@ -59,4 +59,8 @@ int APS5_VABI sceRazorCpuWriteBookmark(const char* label, const char* descriptio
return 0;
}
int APS5_VABI sceRazorCpuSync(void) {
return 0;
}
}

View File

@ -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);
}

View File

@ -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