Skip to content

Comments

Issue 63 - Fix entry reslice edge case (no containing function) + tests & reports#70

Merged
ran-j merged 1 commit intoran-j:mainfrom
Whoneon:issue-63-func-end
Feb 20, 2026
Merged

Issue 63 - Fix entry reslice edge case (no containing function) + tests & reports#70
ran-j merged 1 commit intoran-j:mainfrom
Whoneon:issue-63-func-end

Conversation

@Whoneon
Copy link
Contributor

@Whoneon Whoneon commented Feb 20, 2026

@ran-j already introduced the main fix in commit 4334e74 (“fixed entry slicing logic to avoid same tail repeated”).
While validating on SLUS‑202.67, there was still one duplicated end address. Turns out that this is an edge case where an entry does not have a resolvable containing function.

What changed

  • Reslice now falls back to the entry’s own decoded slice when the containing function can’t be found.
  • Added a unit test for reslice without a containing function.
  • Successfully tested on Rayman Revolution (SLES-50044) and .hack//Infection (SLUS‑20267).

Tests

  • cmake --build build-tests --target ps2x_tests
  • ./build-tests/ps2xTest/ps2x_tests

Note

For local runtime testing had to add <cmath> in ps2_runtime_macros.h to resolve sqrtf/copysignf/INFINITY, but it has been removed before this PR.

@ran-j
Copy link
Owner

ran-j commented Feb 20, 2026

Nice work.

@ran-j ran-j merged commit d7701f9 into ran-j:main Feb 20, 2026
3 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants