Skip to content

Conversation

@zrax
Copy link
Member

@zrax zrax commented Oct 23, 2025

Although DS doesn't actually encode any locations with negative prefixes anywhere outside of the tests, the computation was incorrect. This now matches the encodings generated by plAgeDescription::CalcPageLocation in H-uru/Plasma.

Yes, I'm aware that libhsplasma's computation is even more broken than this... I'll probably address that one next.

Copy link
Member

@dpogue dpogue left a comment

Choose a reason for hiding this comment

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

@zrax Just checking because of the unexpected discoveries in the libHSPlasma PR when comparing with real game data, are there any changes needed here or is this good?

@zrax
Copy link
Member Author

zrax commented Nov 1, 2025

@zrax Just checking because of the unexpected discoveries in the libHSPlasma PR when comparing with real game data, are there any changes needed here or is this good?

No, this is based on the same faulty implementation I referenced for the libHSPlasma fix... This needs to be updated too.

EDIT: Actually, the original code produced correct results; this whole PR is based on my faulty read of the Plasma code :(. I'll just update it to be consistent with the change to libHSPlasma, and keep the Catch update.

@zrax zrax force-pushed the location_negative_prefixes branch from 772a95a to 5927199 Compare November 1, 2025 16:31
@zrax zrax changed the title Fix Location encoding with negative sequence prefixes. ~Fix Location encoding with negative sequence prefixes.~ Make Location encoding algorithm consistent with other implementations. Nov 1, 2025
@zrax zrax changed the title ~Fix Location encoding with negative sequence prefixes.~ Make Location encoding algorithm consistent with other implementations. Make Location encoding algorithm consistent with other implementations. Nov 1, 2025
@zrax zrax force-pushed the location_negative_prefixes branch from 5927199 to b0fb0c8 Compare November 1, 2025 16:32
@zrax zrax merged commit 4c499ff into H-uru:master Nov 1, 2025
4 checks passed
@zrax zrax deleted the location_negative_prefixes branch November 1, 2025 22:24
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants