Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Path table extraction #43

Merged
merged 17 commits into from
Aug 26, 2023
Merged

Conversation

markisha64
Copy link
Contributor

Some games have obfuscated file systems such that while the path table contains most info about directories,
those directories won't be accessible from the root directory.

I've added the pathTable option that instead of going recursively through the file system, goes recursively through the path table and reads files from folder offset.

This causes some issues during repacking, as since the file system was obfuscated, game probably reads files by going to sector offset. I've fixed this by supplying the exact offset that the file was read to in the xml file, and writing that file to the written offset (if it exists, otherwise calculated).

This mr is potentially very good for modding, as it will allow more games to be unpacked, modified and repacked. (currently only tested on dmw3)

My c++ isn't very good so if you see anything stinky, please do request changes.

Copy link
Collaborator

@CookiePLMonster CookiePLMonster left a comment

Choose a reason for hiding this comment

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

The general idea seems solid, especially since it's hidden behind a flag as most people are unlikely to need it - but for some reason formatting is all over the place making it hard to read and review. Would be good to get this fixed before merging.

src/dumpsxiso/cdreader.cpp Outdated Show resolved Hide resolved
src/dumpsxiso/main.cpp Outdated Show resolved Hide resolved
src/mkpsxiso/iso.cpp Outdated Show resolved Hide resolved
src/dumpsxiso/main.cpp Outdated Show resolved Hide resolved
src/dumpsxiso/main.cpp Outdated Show resolved Hide resolved
markisha64 and others added 2 commits August 16, 2023 12:28
chore: no need for string init

Co-authored-by: Silent <CookiePLMonster@users.noreply.github.com>
chore: help message

Co-authored-by: Silent <CookiePLMonster@users.noreply.github.com>
@markisha64
Copy link
Contributor Author

markisha64 commented Aug 16, 2023

but for some reason formatting is all over the place making it hard to read and review

this is kind of a project wide problem, the tabs and indentations are all over the place and when I started it was really hard to follow, something should be eventually done about this, but it's out of scope for the pr

Copy link
Collaborator

@CookiePLMonster CookiePLMonster left a comment

Choose a reason for hiding this comment

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

Generally looks fine now, a few final comments from me and after that I'll approve. I poked @spicyjpeg to also have a look. I also think for merging this should be squashed, no need to keep all the fixup commits.

src/dumpsxiso/main.cpp Outdated Show resolved Hide resolved
src/dumpsxiso/main.cpp Outdated Show resolved Hide resolved
src/dumpsxiso/cdreader.h Outdated Show resolved Hide resolved
src/dumpsxiso/main.cpp Outdated Show resolved Hide resolved
src/dumpsxiso/main.cpp Outdated Show resolved Hide resolved
src/dumpsxiso/main.cpp Outdated Show resolved Hide resolved
markisha64 and others added 5 commits August 23, 2023 15:46
Co-authored-by: Silent <CookiePLMonster@users.noreply.github.com>
Co-authored-by: Silent <CookiePLMonster@users.noreply.github.com>
Copy link
Collaborator

@CookiePLMonster CookiePLMonster left a comment

Choose a reason for hiding this comment

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

Looks good now. I'll run it against my test suite and merge if nothing regressed.

@CookiePLMonster CookiePLMonster merged commit 58f5684 into Lameguy64:master Aug 26, 2023
3 checks passed
@CookiePLMonster
Copy link
Collaborator

All tests passed as before - I've not checked dumpsxiso but it should be fine too.

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.

None yet

2 participants