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
Copy Wii save for current game for Netplay and TAS #4546
Conversation
63bf6e6
to
6ccecda
Compare
|
I was able to sync up with saves. Have not tested writing + reloading though. We need an option to disable this in the Netplay Window for smash users though. |
|
@E2xD Can you get netplay people to test this out? Should allow loading Wii saves in netplay; assuming both players have the save. I don't know if it's useful for smash (in fact, it's probably detrimental) but it'l be important for other games. And we have to make sure we don't break Brawl netplay in the process. |
Source/Core/Core/Movie.cpp
Outdated
| { | ||
| // TODO: Check for the actual save data | ||
| if (File::Exists(user_save_path + "banner.bin")) | ||
| SetClearSave(false); |
This comment was marked as off-topic.
This comment was marked as off-topic.
Sorry, something went wrong.
This comment was marked as off-topic.
This comment was marked as off-topic.
Sorry, something went wrong.
Source/Core/Core/Movie.cpp
Outdated
|
|
||
| void ShutdownWiiRoot() | ||
| { | ||
| if (!s_temp_wii_root.empty()) |
This comment was marked as off-topic.
This comment was marked as off-topic.
Sorry, something went wrong.
This comment was marked as off-topic.
This comment was marked as off-topic.
Sorry, something went wrong.
Source/Core/Common/NandPaths.cpp
Outdated
| @@ -54,6 +56,21 @@ void ShutdownWiiRoot() | |||
| { | |||
| if (!s_temp_wii_root.empty()) | |||
| { | |||
| u64 tmd_title_id = Movie::GetTitleId(); | |||
This comment was marked as off-topic.
This comment was marked as off-topic.
Sorry, something went wrong.
This comment was marked as off-topic.
This comment was marked as off-topic.
Sorry, something went wrong.
This comment was marked as off-topic.
This comment was marked as off-topic.
Sorry, something went wrong.
Source/Core/Common/NandPaths.cpp
Outdated
| // Backup the existing save just in case it's still needed. | ||
| if (File::Exists(user_save_path + "banner.bin")) | ||
| { | ||
| File::CopyDir(user_save_path, user_save_path + "../backup/"); |
This comment was marked as off-topic.
This comment was marked as off-topic.
Sorry, something went wrong.
This comment was marked as off-topic.
This comment was marked as off-topic.
Sorry, something went wrong.
This comment was marked as off-topic.
This comment was marked as off-topic.
Sorry, something went wrong.
|
Why is the second commit an improvement? The temporary NAND handling isn't only used for movies, it's used for netplay too. |
|
@JosJuice It's an improvement because GCC had linking issues when trying to use GetTitleId() from within NandPaths in the first commit, and it was the best place I could think of putting it to resolve the issues. |
|
This pull request works perfectly. Tested with Dokapon Kingdom across 2 days and 3 sessions so far. We probably need to have a way to let the Brawl players avoid using this though... |
|
Instead of putting code in Movie.cpp that doesn't fit there, could you put it in the new WiiRoot.cpp file created by PR #4621? (I suppose this means you would need to wait for that PR, though) |
|
I've attempted to improve the title ID handling that I commented about earlier: PR #4629 |
Source/Core/Core/Movie.cpp
Outdated
| if (IsRecordingInput()) | ||
| { | ||
| // TODO: Check for the actual save data | ||
| SetClearSave(File::Exists(user_save_path + "banner.bin")); |
This comment was marked as off-topic.
This comment was marked as off-topic.
Sorry, something went wrong.
This comment was marked as off-topic.
This comment was marked as off-topic.
Sorry, something went wrong.
Source/Core/Core/Movie.cpp
Outdated
| SetClearSave(File::Exists(user_save_path + "banner.bin")); | ||
| } | ||
|
|
||
| if (Core::g_want_determinism && !IsStartingFromClearSave()) |
This comment was marked as off-topic.
This comment was marked as off-topic.
Sorry, something went wrong.
This comment was marked as off-topic.
This comment was marked as off-topic.
Sorry, something went wrong.
This comment was marked as off-topic.
This comment was marked as off-topic.
Sorry, something went wrong.
This comment was marked as off-topic.
This comment was marked as off-topic.
Sorry, something went wrong.
2ce406a
to
cc595e3
Compare
|
Considering netplay users usually stay behind a bit. I think we can merge this and someone else do save syncing so that there aren't more confusing options. @Helios747 @leoetlino @JosJuice @mimimi085181 is that a reasonable solution? |
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.
@JMC47 Sure, but we shouldn't merge this before the problems I pointed out are fixed. (IsStartingFromClearSave being expected to be correct when Movie isn't active, Movie.cpp containing code that should be somewhere else, maybe the title ID mess too (though it could be argued that all the title ID problems existed before this PR and can be fixed later by PR #4629))
|
I did some more thinking about the /backup/ folder stuff, and I realized that this PR makes it more problematic. Before, /backup/ used to get deleted on the next non-Movie run, but now it seems like it will stay there forever unless the user manually goes poking around in the NAND. Do we really want that? And do we actually need a /backup/ folder at all? It seems like the previous code just used it as a place to keep the "actual" save while running a movie, but we don't need that anymore since we have two entirely separate NANDs now. Though I suppose the user might not want to overwrite their actual save with one from a TAS... And we can't just hardcode it to not keep the save from a deterministic session, because people generally do want to keep their saves from netplay. It seems like a tricky situation. |
|
I'm sorry. Ive been away from the dolphin netplay scene for some time (Life/Holidays/Work/Etc). Just to make sure I am clear, you want to add NAND syncing at the risk of compromising netplayers? Why not make it a selectable option under Config > Wii? Like have a toggle saying "Blank NAND" or something. Just my 2 cents. |
|
This commit does not add NAND syncing. In other words, no NAND files will be send over the network to other players. What it does do is copy the save files for the current game from the user's real NAND to the empty temporary NAND. I suppose SSBB/PM players don't want that since they want to have no save files when using netplay, right? |
|
Correct. |
|
Netplayers usually don't update builds often and this is a stepping stone
toward more and better netplay features.
My idea for Brawl was to change the behavior of write to memcards and SD
cards to also control nand access. Unchecked would mean no save import or
writing, checked would mean it would import and write back saves.
…On Wed, Jan 18, 2017, 2:04 AM E2xD ***@***.***> wrote:
Correct.
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#4546 (comment)>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/AGSuQShWomORQc_Fxs3ncDP-3w998ka2ks5rTbl6gaJpZM4LVIks>
.
|
ef97f71
to
b22cbd1
Compare
Source/Core/Core/Movie.cpp
Outdated
|
|
||
| static std::string s_temp_wii_root; | ||
|
|
||
| void InitializeWiiRoot(bool use_dummy) |
This comment was marked as off-topic.
This comment was marked as off-topic.
Sorry, something went wrong.
This comment was marked as off-topic.
This comment was marked as off-topic.
Sorry, something went wrong.
Source/Core/Core/Movie.cpp
Outdated
| @@ -1580,4 +1580,77 @@ void Shutdown() | |||
| tmpInput = nullptr; | |||
| tmpInputAllocated = 0; | |||
| } | |||
|
|
|||
| void CheckWiiSaves() | |||
This comment was marked as off-topic.
This comment was marked as off-topic.
Sorry, something went wrong.
This comment was marked as off-topic.
This comment was marked as off-topic.
Sorry, something went wrong.
4b2ccde
to
6454e88
Compare
5623b0b
to
ad8f8c8
Compare
The issues I commented on earlier are (mostly) fixed
|
Only two of my comments are relevant anymore, and I'm not sure if they should block this PR from being merged or not. If others think it's fine to merge the affected parts as-is, you have my LGTM. The two potential blockers are:
|
|
EDIT: All the commits have been squashed. |
06f153e
to
501e35a
Compare
Source/Core/Core/WiiRoot.cpp
Outdated
| Common::GetTitleDataPath(Movie::GetTitleId(), Common::FROM_CONFIGURED_ROOT); | ||
| std::string user_backup_path = | ||
| File::GetUserPath(D_BACKUP_IDX) + | ||
| StringFromFormat("%08x/%08x/", (u32)(Movie::GetTitleId() >> 32), (u32)Movie::GetTitleId()); |
This comment was marked as off-topic.
This comment was marked as off-topic.
Sorry, something went wrong.
This comment was marked as off-topic.
This comment was marked as off-topic.
Sorry, something went wrong.
Source/Core/Core/WiiRoot.cpp
Outdated
| Common::GetTitleDataPath(Movie::GetTitleId(), Common::FROM_SESSION_ROOT); | ||
| std::string user_save_path = | ||
| Common::GetTitleDataPath(Movie::GetTitleId(), Common::FROM_CONFIGURED_ROOT); | ||
| std::string user_backup_path = |
This comment was marked as off-topic.
This comment was marked as off-topic.
Sorry, something went wrong.
Source/Core/Core/IOS/ES/ES.cpp
Outdated
| File::DeleteDirRecursively(save_path + "../backup/"); | ||
| #endif | ||
| } | ||
| Core::InitializeWiiSaves(); |
This comment was marked as off-topic.
This comment was marked as off-topic.
Sorry, something went wrong.
This comment was marked as off-topic.
This comment was marked as off-topic.
Sorry, something went wrong.
dea1031
to
dd449a8
Compare
dd449a8
to
5224771
Compare
|
LGTM. Tested and verified that it loads the save, we can save in-game and load it later in another session and everything is working. |
|
Is there anything blocking this for merge? |
|
@JMC47 Hey, I just got this set up, and it's giving me a Frame 18 desync for Dakapon Kingdom. Any advice? I had the game working on 2 different Dolphin builds. |
|
We can narrow this down a bit. If you unplug the Wii Remotes and use GC controllers only, does the desync occur? If you uncheck use savefile, does the desync occur? If you can find the results of these two things, we can narrow down what's tripping you up really easy. This isn't exactly the right place to discuss it, if you could ping me on freenode on #dolphin-emu, that's probably where I can give the best assistance. |
|
Yeah, please don't discuss this on here. We use GitHub for development, not support. |
This brings back functionality prior to the "Blank NAND" to use saves in Netplay and TASes.
I would like some testing and comments on if this is the proper way to go about this.