-
-
Notifications
You must be signed in to change notification settings - Fork 1.9k
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
[TESTERS NEEDED!] Savestates: Compressed files #14822
Conversation
|
I don't want to start a codec war, but certainly in this day and age there are better alternatives than zlib? |
|
Okay. I only have one requirement for them: it needs to be able to compress data chunks with the ability to perform well even if not all data is provided at a single time. |
|
I'm going out on a limb, and guess that just like in every other case ever you can check xz/lzma2 for usually the best compression, and then zstd or brotli for some slight compromise with speed. |
f4f35b0 to
57cde7b
Compare
87640f6 to
c85974c
Compare
7239e00 to
d276ef4
Compare
|
Applied some bugfixes, loading of files is also starting to work! |
45f23e5 to
6fd0648
Compare
6fd0648 to
446638b
Compare
874c83d to
494bc72
Compare
rpcs3/Emu/System.cpp
Outdated
| auto on_select = [](u32, spu_thread& spu) | ||
| const bool autostart = !!g_cfg.misc.autostart; | ||
|
|
||
| static const auto cpu_op = [](atomic_bs_t<cpu_flag>& state, bs_t<cpu_flag> add, bs_t<cpu_flag> sub) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
these functions really don't belong here
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Moved to cpu_thread::add_remove_flags.
| if (fs::file save{m_path, fs::isfile + fs::read}; save && save.size() >= 8 && save.read<u64>() == "RPCS3SAV"_u64) | ||
| fs::file save{m_path, fs::isfile + fs::read}; | ||
|
|
||
| if (!m_path.ends_with(".gz") && save && save.size() >= 8 && save.read<u64>() == "RPCS3SAV"_u64) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Tbh, I think this is getting out of hand. Every section of code that has m_ar-> in it belongs to another file.
Half of System.cpp is just writing or reading random stuff to that object.
I'd even be happy if it's just a second cpp with Emulator internal functions that only deal with the savestate.
3e16546 to
30f2ddf
Compare
|
This may sound like a silly question, but do I have to test this PR just to see if the files has significantly reduced? Or do I need to test this PR just to see if there's any savestate errors on other games? Because Demon's Souls seems to behave fine after loading. |
|
The performance measurement needed here is for saving time itself, and also test file size by comparing file size to the one after extraction using 7zip or WinRAR etc. Although I know there is a a bug here preventing some games to reload properly such as Skate 3 or TLoU. |
|
Scratch that, I found the bug!! Will merge and you are welcome to test on master! |
30f2ddf to
3050381
Compare
3050381 to
126001d
Compare

Along with #14784, this pull requests aims to reduce significantly the file size of savestates which can anywhere from few hundreds of MBs to few GBs or even more.
Initial measurements suggest size reduction of more than 50 percent! But it is probably more in most cases, need user testing!
TODO:
Additional bugfixes: