Skip to content

feat(libSceRazorCpu): add sceRazorCpuPlotValue and sceRazorCpuWriteBookmark - #1247

Merged
oneandonlydean merged 1 commit into
boykopovar:mainfrom
gjonn:feat/razorcpu-plot-value-bookmark
Oct 7, 2026
Merged

oneandonlydean merged 1 commit into
boykopovar:mainfrom
gjonn:feat/razorcpu-plot-value-bookmark

Conversation

@gjonn

@gjonn gjonn commented Oct 7, 2026

Copy link
Copy Markdown
Contributor

What

Adds sceRazorCpuPlotValue (njGikRrxkC0) and sceRazorCpuWriteBookmark (G3brhegfyNg) to libSceRazorCpu. main exports neither, so PPSA06320 (Ape Escape, PS1HD emulator 1.7) stops at startup with unresolved ELF import njGikRrxkC0 from libSceRazorCpu.prx.

  • Signatures from SharpProspero (Interop/Debug/RazorCpu.cs): int sceRazorCpuPlotValue(const char* series, float value) and int sceRazorCpuWriteBookmark(const char* label, const char* description), with an optional description. They match the title's calls: the plot gets a name in rdi and a float in xmm0 (CD-ROM read time in ms), and the bookmark gets a label in rdi and a formatted BLOCKING READ of lba=0x... string in rsi.
  • There is no Razor capture (sceRazorCpuIsCapturing returns 0), so both do nothing and return 0, like sceRazorCpuPushMarkerStatic and sceRazorCpuPopMarker.
  • TechnicalDebt "Unknown function info" entry next to the other RazorCpu ones.

Tested

Windows 11, MinGW-w64 GCC 15.2.0, Release:

  • guest_razor_cpu passes; it now also calls both functions, the bookmark with and without a description.
  • PPSA06320 relinked for Windows: on main it stops at startup on the unresolved import. With this change it gets past it, and the PS1HD emulator starts and loads its configuration up to the next missing function (sceKernelGetModuleInfoFromAddr on Windows, which feat(libkernel): implement sceKernelGetModuleInfoFromAddr on Windows #1188 covers).
  • tools/check_conventions.py --base origin/main passes with POSIX path handling, as on CI. Run on Windows, the script reports a false doc-link/silent-stub because os.path.normpath returns backslashes.

Linux: not built locally.

Checklist

  • Based on current main; no other open PR implements the same functions
  • One topic per PR; follow-ups go in a new PR
  • No comments in code except technical debt
  • Unimplemented paths throw (NotImplemented_nid_no_patch); silent stubs are listed in TechnicalDebt
  • No notes, investigation .md files or images added to the repository (attach them to this PR)
  • New third-party code is a submodule built from source
  • Generic behaviour, not specific to one title
  • Depends on: none
  • AI-assisted: yes

@github-actions

github-actions Bot commented Oct 7, 2026

Copy link
Copy Markdown

Progress report (4764e59 → 531d5c1)

📈 System libraries: 86.06% (+0.01%, +2 implemented functions)

✅ 2 implemented
Library Name
libSceRazorCpu sceRazorCpuPlotValue
libSceRazorCpu sceRazorCpuWriteBookmark

@oneandonlydean
oneandonlydean merged commit 7e7ef7a into boykopovar:main Oct 7, 2026
4 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants