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

[VFS] Add support for loading ZArchive files #2157

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

rtissera
Copy link

@rtissera rtissera commented May 18, 2023

This PR adds support for loading ZAR (ZArchive files) of a decrypted dump of XBOX 360 game.
The process is basically to dump your disc, extract files using your favorite tool, and create a ZAR file from it using ZArchive tool.
ZArchive is a format created by @Exzap for Cemu to store Wii U dumps originally (WUA files). It is very lightweight and uses modern Zstd compression.

This PR implements ZArchive supports through zstd and zarchive dependencies as third-party libraries, premake build support and full C++ VFS implementation for this specific kind of device.

I have personally tested it on around 60 games without noticing any behavior difference or performance hit between a decrypted folder and a ZAR file.

Comments, enhancements, and possible mistakes are welcome.

@dmanlfc
Copy link

dmanlfc commented May 20, 2023

This would be great for XBLA games too! Thanks @rtissera - long time no see.

@Gliniak
Copy link
Member

Gliniak commented May 23, 2023

-1 from me at this point.

  1. Use command xb lint / xb format to fix formatting.
  2. Some parts have poor readability. Lack of curly brackets after if statements and new lines causes it to be quite a hassle to read.
  3. Instead of using auto everywhere try to use types that are being used in that place.
  4. If you can const something - do it

@rtissera
Copy link
Author

-1 from me at this point.

  1. Use command xb lint / xb format to fix formatting.

  2. Some parts have poor readability. Lack of curly brackets after if statements and new lines causes it to be quite a hassle to read.

  3. Instead of using auto everywhere try to use types that are being used in that place.

  4. If you can const something - do it

Okay, I will improve those points thanks for feedback.

})
recursive_platform_files()
removefiles({"vfs_dump.cc"})
group("src") project("xenia-vfs")
Copy link
Member

Choose a reason for hiding this comment

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

formatting seems to be messed up here

-- Basic usage: project_zstd(ZSTD_DIR)

function project_zstd(dir, compression, decompression, deprecated, dictbuilder, legacy)
if compression == nil then compression = true end
Copy link
Member

Choose a reason for hiding this comment

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

please try and keep indentation and formatting of our other lua files here if possible

@jackbritchford
Copy link

@Gliniak if you're referring to the Lua code, there are no curly braces after function, just "then".
But yes, there are generally formatting / indentation issues.
I may be able to review and fix later

@rtissera
Copy link
Author

fwiw it's been merged and improved in Xenia canary

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.

None yet

6 participants