Skip to content

Latest commit

 

History

History
43 lines (32 loc) · 3.48 KB

File metadata and controls

43 lines (32 loc) · 3.48 KB

Contributing

Code

  • Follow the coding conventions: naming, no comments except technical debt, Conventional Commits.
  • Every function either does exactly what it is supposed to or throws. Unimplemented exports call NotImplemented_nid_no_patch(__func__) (see libSceAudioIn).
  • Pull requests that add or change shader instruction semantics say where they come from: measured on hardware (which GPU and what was checked, e.g. with the hardware oracle) or the exact source (ISA section, LLVM, ACO or Mesa file). Reviewers check the semantics on hardware. Cases the source doesn't settle throw, and behaviour not verified on hardware is recorded in technical debt.
  • A silent stub is allowed only when it unblocks a title and only affects the UI; add it to silent stubs.
  • Missing imports fail at startup with a clear error; don't replace them with fallbacks that keep running.
  • Implement the general behaviour of a function, not what one title happens to need.
  • Don't add replacements for modules that titles ship themselves in sce_module/, sce_modules/ or prx/: engine or middleware modules (Cohtml, FMOD, GOG Galaxy) and SDK libraries that only wrap other system libraries (NpCppWebApi over NpWebApi2). The relinker converts and loads the title's own module, and a host library with the same name is left out of DT_NEEDED. Only system libraries, which reach the kernel or the hardware, are reimplemented in core/libs/prx.
  • Avoid non-standard extensions (__attribute__, etc.) where standard C++ is enough. Helper symbols that must not become NIDs use the _nid_no_patch or _nid_no_patch_cut suffix.
  • The relinker uses only the C++20 standard library.
  • Third-party code is added as a submodule under 3rdparty/ and built from source, not found on the system.
  • Don't add tests that only check that a symbol is exported: a missing export already fails at startup.

Build and test

Toolchains are listed in the README.

cmake -S . -B build -G Ninja -DCMAKE_BUILD_TYPE=Release -DBUILD_TESTING=ON
cmake --build build
ctest --test-dir build --output-on-failure

Python 3 is optional; without it some relinker tests are not registered.

Branches and pull requests

The pull request template is the checklist for these rules.

  • One branch per topic, based on current main. Follow-up work goes in a new pull request, not into an open one.
  • Before starting, check that no open pull request already implements the same functions.
  • Keep the branch up to date with main and resolve conflicts yourself; rebasing and force-pushing is fine.
  • If a pull request needs another one first, say so in the description (Depends on #N).
  • Run the tests before opening the pull request and describe what was tested (OS, title or homebrew).
  • Investigation notes, reports, screenshots and logs go in the pull request, not in the repository. Images for documentation go in the gist comments.
  • Say whether the change was written with AI assistance. The author of the pull request is responsible for every line of it.

Documentation

Text in the repository is dry, strict and concise. Record known gaps, unknown NIDs and signatures in technical debt instead of new files.