Repository navigation
Match PAL wrapped and clamped index stepping - #66
Merged
Merged
Conversation
Preserve the signed wrap formula and direction-dependent lower/upper clamps of func_00496118 without adding new bounds behavior. Co-Authored-By: Codex <noreply@openai.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Adds matching C for PAL
func_00496118(84 bytes), which advances an index. Wrap mode returns(current + step + count) % count; otherwise negative steps clamp at zero and nonnegative steps clamp atcount - 1. It preserves the original signed arithmetic and does not introduce additional checks or normalization.Validation: compiled the final source through the repository's SN compiler and
tools/cc.sh. All 84 bytes match PAL retail at catalogue address0x00496118, with no relocations or masking. Both versions oftools/progress.py --checkandtools/match_map.py --checkpass, as doesgit diff --check.Only the new verified PAL map row and US
otherrow were added; all previous rows were retained. Reports/README were regenerated and the US report is semantically unchanged. Based directly on upstream main, independently of the other open PRs; PAL changes from 5,138 / 396,888 to 5,139 matched functions / 396,972 bytes.The upstream sources passed a full compilation in the preceding work; this final new source was compiled and byte-checked separately. No US image is available locally, so global US match/relocation audits were not run. No retail data, disassembly, SDK sources or toolchain files are included.