#8 Fix region parsing

Closed
Ghost wants to merge 0 commits from deleted into necklace/master
Ghost commented 2 years ago

As listed on PS3DevWiki, the int32 at the start of the first sector is actually the number of unencrypted regions, not the total regions divided by 2. Also, the region ends are inclusive (e.g. the sector region 0-5151 is actually the byte range 0-10551296 rather than 0-10549248).

This PR changes the read_regions function to fix both of those issues, as they led to the last sector of each unencrypted region being encrypted/decrypted when it shouldn't have been.

[As listed on PS3DevWiki](https://www.psdevwiki.com/ps3/Bluray_disc#Encryption), the int32 at the start of the first sector is actually the number of unencrypted regions, not the total regions divided by 2. Also, the region ends are inclusive (e.g. the sector region 0-5151 is actually the byte range 0-10551296 rather than 0-10549248). This PR changes the read_regions function to fix both of those issues, as they led to the last sector of each unencrypted region being encrypted/decrypted when it shouldn't have been.

It is imperative that all code contributed be legitimately free software. For that reason, code from anonymous (or pseudonymous) contributors will not be accepted.

Personally I don't see the point in sending anonymous PRs. Why bother fixing the code if you're not going to take credit for it? Next time just make issues. Thanks.

It is imperative that all code contributed be legitimately free software. For that reason, code from anonymous (or pseudonymous) contributors will not be accepted. Personally I don't see the point in sending anonymous PRs. Why bother fixing the code if you're not going to take credit for it? Next time just make issues. Thanks.
Please reopen this pull request to perform merge operation.
Sign in to join this conversation.
No Milestone
No assignee
2 Participants
Loading...
Cancel
Save
There is no content yet.