docs(libSceAudioOut): note which port state fields five titles read #11739

Merged
milescoviello merged 2 commits from upstream-pr/11739 into main 2026-10-28 09:10:15 +00:00
milescoviello commented 2026-10-27 06:26:02 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by milescoviello on 2026-10-27T06:26:02Z.


What

The sceAudioOut2PortGetState entry in docs/dev/debt/libSceAudioOut.md says a console reports output 0, volume -1 and reroute counter 5 where AnyPS5 reports output main, volume 127 and a zero counter, so a title's values are unverified. This adds which of those fields titles actually read, which tells where a mismatch could matter:

Title Version Calls Fields read in the 30 instructions after the call
Borderlands 4 (PPSA01494) 01.100.002 2 output
Forspoken (PPSA03984) 01.020.000 1 flags, testing bit 0
ASTRO BOT (PPSA21564) 01.007.000 3 num_channels, output, flags; output against 0; volume against 0
MXGP 26 (PPSA30839) 01.003.000 1 flags, testing bit 0
Super Meat Boy 3D (PPSA31162) 02.000.001 1 flags, testing bit 0

In those windows, none of the eight calls reads reroute_counter. This is a bounded scan: a read later in the caller, or through a copy of the state, isn't ruled out. Metal Gear Solid 4, Black Ops II and STEINS;GATE RE:BOOT don't call it.

How

I found the calls through the import's PLT stub in each title's relinked eboot.bin, took the state buffer from the rsi set before each call, and listed the reads from that buffer in the 30 instructions after it, matched to AudioOut2PortState's fields. No code change.

Changed: docs/dev/debt/libSceAudioOut.md.

Tested

Docs only. tools/check_conventions.py --base upstream/main passes.

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

🤖 Generated with Claude Code

<!-- greyfinch-sync:boykopovar/AnyPS5:issue:5029609837 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/11739). Originally posted by [milescoviello](https://github.com/milescoviello) on 2026-10-27T06:26:02Z. --- ### What The `sceAudioOut2PortGetState` entry in `docs/dev/debt/libSceAudioOut.md` says a console reports output 0, volume -1 and reroute counter 5 where AnyPS5 reports output main, volume 127 and a zero counter, so a title's values are unverified. This adds which of those fields titles actually read, which tells where a mismatch could matter: | Title | Version | Calls | Fields read in the 30 instructions after the call | |---|---|---|---| | Borderlands 4 (PPSA01494) | 01.100.002 | 2 | `output` | | Forspoken (PPSA03984) | 01.020.000 | 1 | `flags`, testing bit 0 | | ASTRO BOT (PPSA21564) | 01.007.000 | 3 | `num_channels`, `output`, `flags`; `output` against 0; `volume` against 0 | | MXGP 26 (PPSA30839) | 01.003.000 | 1 | `flags`, testing bit 0 | | Super Meat Boy 3D (PPSA31162) | 02.000.001 | 1 | `flags`, testing bit 0 | In those windows, none of the eight calls reads `reroute_counter`. This is a bounded scan: a read later in the caller, or through a copy of the state, isn't ruled out. Metal Gear Solid 4, Black Ops II and STEINS;GATE RE:BOOT don't call it. ### How I found the calls through the import's PLT stub in each title's relinked `eboot.bin`, took the state buffer from the `rsi` set before each call, and listed the reads from that buffer in the 30 instructions after it, matched to `AudioOut2PortState`'s fields. No code change. Changed: `docs/dev/debt/libSceAudioOut.md`. ### Tested Docs only. `tools/check_conventions.py --base upstream/main` passes. ### Checklist <!-- Rules behind each item: https://github.com/boykopovar/AnyPS5/blob/main/CONTRIBUTING.md --> - [x] Based on current `main`; no other open PR implements the same functions - [x] One topic per PR; follow-ups go in a new PR - [x] No comments in code except [technical debt](https://github.com/boykopovar/AnyPS5/blob/main/docs/dev/CONVENTIONS.md) - [x] Unimplemented paths throw (`NotImplemented_nid_no_patch`); silent stubs are listed under Silent stubs in their library's [technical debt](https://github.com/boykopovar/AnyPS5/tree/main/docs/dev/debt) file - [x] No notes, investigation `.md` files or images added to the repository (attach them to this PR) - [x] New third-party code is a submodule built from source - [x] Generic behaviour, not specific to one title - [x] Depends on: none - [x] Fixes: none - [x] Unblocks: none - [x] GPUs tested: n/a - [x] AI-assisted: yes 🤖 Generated with [Claude Code](https://claude.com/claude-code)
MarcZX10 commented 2026-10-27 06:27:24 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by MarcZX10 on 2026-10-27T06:27:24Z.

Review: COMMENTED


The table is useful, but the conclusion that none of the eight calls reads reroute_counter appears broader than the stated method: the description says reads were checked in the 30 instructions after each call. Could you scope the conclusion to that inspected window (and note that later or indirect reads were not ruled out), unless the analysis tracked the state buffer through the rest of each relevant code path? That would keep the debt entry from treating a bounded disassembly scan as proof of no use.

<!-- greyfinch-sync:boykopovar/AnyPS5:review:5663063292 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/11739#pullrequestreview-5663063292). Originally posted by [MarcZX10](https://github.com/MarcZX10) on 2026-10-27T06:27:24Z. **Review:** COMMENTED --- The table is useful, but the conclusion that none of the eight calls reads `reroute_counter` appears broader than the stated method: the description says reads were checked in the 30 instructions after each call. Could you scope the conclusion to that inspected window (and note that later or indirect reads were not ruled out), unless the analysis tracked the state buffer through the rest of each relevant code path? That would keep the debt entry from treating a bounded disassembly scan as proof of no use.
MarcZX10 commented 2026-10-27 06:32:45 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by MarcZX10 on 2026-10-27T06:32:45Z.

Review: APPROVED


Re-reviewed exact updated head 603a540fa7dcdfa3cfd7991e34ac583ae30064de. The revision now explicitly bounds the findings to the 30-instruction scan and says later or indirect reads are not ruled out, which resolves my comment. The documentation-only change keeps the underlying hardware values marked unverified; current-base conventions and other policy checks pass, while product jobs are skipped by path policy. I did not independently inspect the title binaries.

<!-- greyfinch-sync:boykopovar/AnyPS5:review:5663106854 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/11739#pullrequestreview-5663106854). Originally posted by [MarcZX10](https://github.com/MarcZX10) on 2026-10-27T06:32:45Z. **Review:** APPROVED --- Re-reviewed exact updated head `603a540fa7dcdfa3cfd7991e34ac583ae30064de`. The revision now explicitly bounds the findings to the 30-instruction scan and says later or indirect reads are not ruled out, which resolves my comment. The documentation-only change keeps the underlying hardware values marked unverified; current-base conventions and other policy checks pass, while product jobs are skipped by path policy. I did not independently inspect the title binaries.
Sign in to join this conversation.
No reviewers
No labels
No milestone
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Reference
boykopovar/AnyPS5!11739
No description provided.