feat(libSceNgs2): implement the Geom reset functions #3995

Merged
delarun merged 1 commit from upstream-pr/3995 into main 2026-10-12 14:08:54 +00:00
delarun commented 2026-10-11 20:52:15 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by delarun on 2026-10-11T20:52:15Z.


What

Implements sceNgs2GeomResetListenerParam and sceNgs2GeomResetSourceParam, taken from #1021 and limited to the two reset functions, as its closing comment suggested. The Geom structures get their real layouts. sceNgs2GeomCalcListener and sceNgs2GeomApply stay unimplemented.

The reset defaults are recorded in docs/dev/TechnicalDebt.md.

Tested

Linux (CachyOS), Dead Cells (PPSA15552) with #3793 on top: it used to abort with sceNgs2GeomResetSourceParam not implemented (reported in #1021) and now gets past that call. It stops later on an unrelated NGS2 patch, left for a separate PR. tools/check_conventions.py 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 in TechnicalDebt
  • No notes, investigation .md files or images added to the repository
  • New third-party code is a submodule built from source
  • Generic behaviour, not specific to one title
  • Depends on: none
  • AI-assisted: yes
<!-- greyfinch-sync:boykopovar/AnyPS5:issue:4822260425 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/3995). Originally posted by [delarun](https://github.com/delarun) on 2026-10-11T20:52:15Z. --- ### What Implements `sceNgs2GeomResetListenerParam` and `sceNgs2GeomResetSourceParam`, taken from #1021 and limited to the two reset functions, as its closing comment suggested. The Geom structures get their real layouts. `sceNgs2GeomCalcListener` and `sceNgs2GeomApply` stay unimplemented. The reset defaults are recorded in docs/dev/TechnicalDebt.md. ### Tested Linux (CachyOS), Dead Cells (PPSA15552) with #3793 on top: it used to abort with `sceNgs2GeomResetSourceParam not implemented` (reported in #1021) and now gets past that call. It stops later on an unrelated NGS2 patch, left for a separate PR. `tools/check_conventions.py` passes. ### Checklist - [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 - [x] Unimplemented paths throw (`NotImplemented_nid_no_patch`); silent stubs are listed in TechnicalDebt - [x] No notes, investigation `.md` files or images added to the repository - [x] New third-party code is a submodule built from source - [x] Generic behaviour, not specific to one title - [x] Depends on: none - [x] AI-assisted: yes
MarcZX10 commented 2026-10-11 21:15:27 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by MarcZX10 on 2026-10-11T21:15:27Z.


The conventions job currently fails because the title is not Conventional Commits (Fix/ngs2 dead cells). A title such as fix(libSceNgs2): implement geometry reset calls should satisfy the title rule.

<!-- greyfinch-sync:boykopovar/AnyPS5:comment:6113837475 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/3995#issuecomment-6113837475). Originally posted by [MarcZX10](https://github.com/MarcZX10) on 2026-10-11T21:15:27Z. --- The conventions job currently fails because the title is not Conventional Commits (`Fix/ngs2 dead cells`). A title such as `fix(libSceNgs2): implement geometry reset calls` should satisfy the title rule.
delarun commented 2026-10-11 22:01:34 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by delarun on 2026-10-11T22:01:34Z.


The conventions job currently fails because the title is not Conventional Commits (Fix/ngs2 dead cells). A title such as fix(libSceNgs2): implement geometry reset calls should satisfy the title rule.

Thanks, changed it
also rebased to main

<!-- greyfinch-sync:boykopovar/AnyPS5:comment:6114299980 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/3995#issuecomment-6114299980). Originally posted by [delarun](https://github.com/delarun) on 2026-10-11T22:01:34Z. --- > The conventions job currently fails because the title is not Conventional Commits (`Fix/ngs2 dead cells`). A title such as `fix(libSceNgs2): implement geometry reset calls` should satisfy the title rule. Thanks, changed it also rebased to main
TideOPL commented 2026-10-11 22:03:10 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by TideOPL on 2026-10-11T22:03:10Z.


Thanks for picking up the two Geom resets from #1021. A few notes:

  • Conventions check: it fails only because of the PR title (Pull request title is not Conventional Commits: Fix/ngs2 dead cells). Something like feat(libSceNgs2): implement the Geom reset functions would pass.
  • Rack handle mapped to its voice: the sceNgs2VoiceControl patch change, where a rack handle with exactly one voice is taken to mean that voice, is driven by one title. It's recorded in TechnicalDebt, which is good, but a title that passes the wrong handle now patches silently instead of failing. Unless there's evidence that rack and voice handles coincide on the console, I'd keep the much better error message and leave the alias out of this PR. It's also a second topic, so it could be a PR of its own.
  • Minor: Ngs2FindRack(patch.dest_handle) is called twice, and the second rack shadows the first.
  • Minor: the TechnicalDebt line lists "pitch ratio 1" among the reset defaults, but neither reset function touches Ngs2GeomAttribute.

Tested by reviewer
Windows 11 (26200), WinLibs GCC 15.2.0 r7, Release, PR head 384c3c9de merged onto main c5da8233a. All 9 ngs2_* tests pass, including the new ngs2_geom. Not run: Dead Cells (I don't have it), Linux.

AI-assisted: yes. Written with AI assistance (Claude Code), with the tests run on my machine; I reviewed it.

<!-- greyfinch-sync:boykopovar/AnyPS5:comment:6114321334 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/3995#issuecomment-6114321334). Originally posted by [TideOPL](https://github.com/TideOPL) on 2026-10-11T22:03:10Z. --- Thanks for picking up the two Geom resets from #1021. A few notes: - **Conventions check:** it fails only because of the PR title (`Pull request title is not Conventional Commits: Fix/ngs2 dead cells`). Something like `feat(libSceNgs2): implement the Geom reset functions` would pass. - **Rack handle mapped to its voice:** the `sceNgs2VoiceControl` patch change, where a rack handle with exactly one voice is taken to mean that voice, is driven by one title. It's recorded in TechnicalDebt, which is good, but a title that passes the wrong handle now patches silently instead of failing. Unless there's evidence that rack and voice handles coincide on the console, I'd keep the much better error message and leave the alias out of this PR. It's also a second topic, so it could be a PR of its own. - **Minor:** `Ngs2FindRack(patch.dest_handle)` is called twice, and the second `rack` shadows the first. - **Minor:** the TechnicalDebt line lists "pitch ratio 1" among the reset defaults, but neither reset function touches `Ngs2GeomAttribute`. **Tested by reviewer** Windows 11 (26200), WinLibs GCC 15.2.0 r7, Release, PR head 384c3c9de merged onto `main` c5da8233a. All 9 `ngs2_*` tests pass, including the new `ngs2_geom`. Not run: Dead Cells (I don't have it), Linux. AI-assisted: yes. Written with AI assistance (Claude Code), with the tests run on my machine; I reviewed it.
delarun commented 2026-10-11 22:05:46 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by delarun on 2026-10-11T22:05:46Z.


Thanks for picking up the two Geom resets from #1021. A few notes:

  • Conventions check: it fails only because of the PR title (Pull request title is not Conventional Commits: Fix/ngs2 dead cells). Something like feat(libSceNgs2): implement the Geom reset functions would pass.
  • Rack handle mapped to its voice: the sceNgs2VoiceControl patch change, where a rack handle with exactly one voice is taken to mean that voice, is driven by one title. It's recorded in TechnicalDebt, which is good, but a title that passes the wrong handle now patches silently instead of failing. Unless there's evidence that rack and voice handles coincide on the console, I'd keep the much better error message and leave the alias out of this PR. It's also a second topic, so it could be a PR of its own.
  • Minor: Ngs2FindRack(patch.dest_handle) is called twice, and the second rack shadows the first.
  • Minor: the TechnicalDebt line lists "pitch ratio 1" among the reset defaults, but neither reset function touches Ngs2GeomAttribute.

Tested by reviewer Windows 11 (26200), WinLibs GCC 15.2.0 r7, Release, PR head 384c3c9 merged onto main c5da823. All 9 ngs2_* tests pass, including the new ngs2_geom. Not run: Dead Cells (I don't have it), Linux.

AI-assisted: yes. Written with AI assistance (Claude Code), with the tests run on my machine; I reviewed it.

Thanks for the review and for running the tests on Windows.

  • Title: changed to feat(libSceNgs2): implement the Geom reset functions.
  • Rack handle alias: removed. You're right that I only have one title's behaviour and no evidence that rack and voice handles coincide on the console. The more detailed error stays, so Dead Cells now stops there with patch from rack 0x4001 port 0 to rack 0x3000 with 1 voices. If I find evidence I'll open a separate PR for it.
  • Double Ngs2FindRack call and the shadowed rack: gone with the alias.
  • TechnicalDebt: dropped "pitch ratio 1" from the reset defaults and removed the alias entry.
<!-- greyfinch-sync:boykopovar/AnyPS5:comment:6114356185 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/3995#issuecomment-6114356185). Originally posted by [delarun](https://github.com/delarun) on 2026-10-11T22:05:46Z. --- > Thanks for picking up the two Geom resets from #1021. A few notes: > > * **Conventions check:** it fails only because of the PR title (`Pull request title is not Conventional Commits: Fix/ngs2 dead cells`). Something like `feat(libSceNgs2): implement the Geom reset functions` would pass. > * **Rack handle mapped to its voice:** the `sceNgs2VoiceControl` patch change, where a rack handle with exactly one voice is taken to mean that voice, is driven by one title. It's recorded in TechnicalDebt, which is good, but a title that passes the wrong handle now patches silently instead of failing. Unless there's evidence that rack and voice handles coincide on the console, I'd keep the much better error message and leave the alias out of this PR. It's also a second topic, so it could be a PR of its own. > * **Minor:** `Ngs2FindRack(patch.dest_handle)` is called twice, and the second `rack` shadows the first. > * **Minor:** the TechnicalDebt line lists "pitch ratio 1" among the reset defaults, but neither reset function touches `Ngs2GeomAttribute`. > > **Tested by reviewer** Windows 11 (26200), WinLibs GCC 15.2.0 r7, Release, PR head [384c3c9](https://github.com/boykopovar/AnyPS5/commit/384c3c9de5609873ddcf540e2631a0abb1877724) merged onto `main` [c5da823](https://github.com/boykopovar/AnyPS5/commit/c5da8233a5c0ea7aa8752bdbd9eba05ce0e82dec). All 9 `ngs2_*` tests pass, including the new `ngs2_geom`. Not run: Dead Cells (I don't have it), Linux. > > AI-assisted: yes. Written with AI assistance (Claude Code), with the tests run on my machine; I reviewed it. Thanks for the review and for running the tests on Windows. - Title: changed to `feat(libSceNgs2): implement the Geom reset functions`. - Rack handle alias: removed. You're right that I only have one title's behaviour and no evidence that rack and voice handles coincide on the console. The more detailed error stays, so Dead Cells now stops there with `patch from rack 0x4001 port 0 to rack 0x3000 with 1 voices`. If I find evidence I'll open a separate PR for it. - Double `Ngs2FindRack` call and the shadowed `rack`: gone with the alias. - TechnicalDebt: dropped "pitch ratio 1" from the reset defaults and removed the alias entry.
oneandonlydean commented 2026-10-11 23:20:14 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by oneandonlydean on 2026-10-11T23:20:14Z.


Please rebase onto main instead of merging it (d7f19897a1 is a merge commit) and drop the sceNgs2VoiceControl message change in Voice.cpp: it is a second topic and it conflicts with #3793. The two resets don't need #3793, so Depends on can be none.

<!-- greyfinch-sync:boykopovar/AnyPS5:comment:6115035949 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/3995#issuecomment-6115035949). Originally posted by [oneandonlydean](https://github.com/oneandonlydean) on 2026-10-11T23:20:14Z. --- Please rebase onto main instead of merging it (d7f19897a1 is a merge commit) and drop the `sceNgs2VoiceControl` message change in `Voice.cpp`: it is a second topic and it conflicts with #3793. The two resets don't need #3793, so `Depends on` can be none.
delarun commented 2026-10-12 11:44:01 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by delarun on 2026-10-12T11:44:01Z.


Please rebase onto main instead of merging it (d7f1989 is a merge commit) and drop the sceNgs2VoiceControl message change in Voice.cpp: it is a second topic and it conflicts with #3793. The two resets don't need #3793, so Depends on can be none.

Done: rebased onto current main as a single commit, no merge commits. The sceNgs2VoiceControl patch message change is dropped from this PR; I'll bring it up separately once #3793 has landed. Depends on is now none, and the description is updated.

<!-- greyfinch-sync:boykopovar/AnyPS5:comment:6123587042 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/3995#issuecomment-6123587042). Originally posted by [delarun](https://github.com/delarun) on 2026-10-12T11:44:01Z. --- > Please rebase onto main instead of merging it ([d7f1989](https://github.com/boykopovar/AnyPS5/commit/d7f19897a15d078802378586228167d6d5eaf212) is a merge commit) and drop the `sceNgs2VoiceControl` message change in `Voice.cpp`: it is a second topic and it conflicts with #3793. The two resets don't need #3793, so `Depends on` can be none. Done: rebased onto current main as a single commit, no merge commits. The `sceNgs2VoiceControl` patch message change is dropped from this PR; I'll bring it up separately once #3793 has landed. Depends on is now none, and the description is updated.
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!3995
No description provided.