Skip to content

docs(environment): correct the crash indirect memory, log timestamp, language and label flush rows - #9036

Open
dantdmdarealguy wants to merge 1 commit into
boykopovar:mainfrom
dantdmdarealguy:docs/environment-row-corrections
Open

dantdmdarealguy wants to merge 1 commit into
boykopovar:mainfrom
dantdmdarealguy:docs/environment-row-corrections

Conversation

@dantdmdarealguy

Copy link
Copy Markdown
Contributor

What

Four rows of docs/dev/ENVIRONMENT.md do not match the code on main:

  • APS5_CRASH_INDIRECT_MEMORY: the row says the variable dumps the words the faulting registers point at. The Windows crash report always prints those [reg] lines (core/libs/prx/libc/src/specifics/windows/CrashReport.cpp L398-402). A non-empty value adds, for each pointer in those lines, up to 64 bytes read from where it points, as [[reg+off]] @addr lines (L403-413). That is what USAGE.md and GAME_TESTING.md already say. An empty value leaves it off (GetEnvironmentVariableA(..., nullptr, 0) > 1).
  • APS5_LOG_TIMESTAMPS: the row says "milliseconds since the first log". LogMacros.hpp L19-29 prints [+S.UUUUUU s] , seconds with six microsecond digits. The start time is a static inside an inline header function, so on Windows each library (DLL) has its own copy and its own clock, started at that library's first stamped line.
  • ANYPS5_LANGUAGE: the Source column names libSceSystemService/Export.cpp. The variable is read in SystemService.hpp L41 (SystemServiceConsoleLanguage, which Export.cpp and libSceNpTrophy2 call). tools/env_reference.py --table also gives SystemService.hpp.
  • APS5_LABEL_FLUSH_US: the Default column says 1000. DeferredLabels.cpp L62 uses 1000 only when batched label submission is on and 250 when APS5_NO_LABEL_BATCH_SUBMIT or APS5_NO_LABEL_BATCHING turns it off (LabelBatchSubmit(), L26-29). Because the default depends on that, the Default cell is left blank and the Description states both values, as the APS5_HANDOFF_SPIN_US row does.

Tested

Windows 11 Pro, Intel Core i9-14900K, 128 GB RAM, NVIDIA GeForce RTX 5080 (driver 32.0.16.1742), WinLibs GCC 15.2.0, Release build of main 138182635 with BUILD_TESTING=ON.

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 under Silent stubs in their library's technical debt file
  • 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
  • Fixes: none
  • Unblocks: none
  • GPUs tested: n/a
  • AI-assisted: yes, some AI assistance was used

@github-actions

github-actions Bot commented Oct 21, 2026 •

Copy link
Copy Markdown

Some comparisons could not be completed because a pull request conflicts with the base branch. Review these shared files manually before concluding that there is no overlap.

Pull request Shared files not compared
PR 5431 docs/dev/ENVIRONMENT.md
PR 6186 docs/dev/ENVIRONMENT.md
PR 6879 docs/dev/ENVIRONMENT.md
PR 6924 docs/dev/ENVIRONMENT.md
PR 6946 docs/dev/ENVIRONMENT.md
PR 6947 docs/dev/ENVIRONMENT.md
PR 7484 docs/dev/ENVIRONMENT.md
PR 7604 docs/dev/ENVIRONMENT.md
PR 7642 docs/dev/ENVIRONMENT.md
PR 8077 docs/dev/ENVIRONMENT.md
PR 8484 docs/dev/ENVIRONMENT.md

@harisibrar1 harisibrar1 left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Checked against main:

  • APS5_CRASH_INDIRECT_MEMORY: CrashReport.cpp:396-413 always prints the [reg] word lines; GetEnvironmentVariableA(..., nullptr, 0) > 1 turns on [[reg+off]] @addr lines of 64 bytes (content[8]) per pointer, so "off when unset or empty" is right and agrees with USAGE.md:349.
  • APS5_LOG_TIMESTAMPS: LogMacros.hpp:26-28 prints [+%llu.%06llu s] , seconds with six microsecond digits; started is a function-local static in an inline function (:19-24), initialised at the first stamped line, so per-library clocks on Windows follow.
  • ANYPS5_LANGUAGE: the only reader is SystemServiceConsoleLanguage at SystemService.hpp:41; empty or unset gives English US (1), and tools/env_reference.py --table agrees with the new Source.
  • APS5_LABEL_FLUSH_US: DeferredLabels.cpp:60-64 gives 1000 with LabelBatchSubmit() and 250 without; LabelBatchSubmit() (:26-29) is off for APS5_NO_LABEL_BATCH_SUBMIT or APS5_NO_LABEL_BATCHING, so a blank Default with both values in the description is accurate.
  • env_reference.py --check on the PR's file reports only the existing APS5_NO_WGI gap, and check_conventions.py --base main --head pr-9036 passes.

Reviewed with AI assistance (Claude Code); the checks above were run locally on my machine.

@github-actions github-actions Bot added the docs label Oct 21, 2026

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants