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
Add the option to use a folder of gamecube saves instead of a memcard image [issue 6599] #243
Conversation
|
A quick question before I look at the code itself: What is the new default setting for memcards? Do we default to raw or directory? I think defaulting to raw is a good idea atm, but making sure we can switch that default easily would be nice for the future (when we get more feedback from testers). |
|
right now it is unchanged (raw memcard images) |
|
Ok, cool. I'll start reviewing when build passes :) |
| @@ -3,6 +3,7 @@ | |||
| // Refer to the license.txt file included. | |||
|
|
|||
|
|
|||
|
|
|||
This comment was marked as off-topic.
This comment was marked as off-topic.
Sorry, something went wrong.
|
Did a quick first pass, haven't really looked into the details yet. |
|
Hello, this is not able to be auto-merged anymore and could probably use a rebasing. Please do so, and I'll merge once it passes the linter/buildbot again. |
| @@ -28,7 +28,7 @@ GCMemcard::GCMemcard(const std::string& filename, bool forceCreation, bool sjis) | |||
| { | |||
| return; | |||
| } | |||
| Format(forceCreation ? sjis : !AskYesNoT("Format as ascii (NTSC\\PAL)?\nChoose no for sjis (NTSC-J)")); | |||
| Format(forceCreation ? sjis : AskYesNoT("Format as ascii (NTSC\\PAL)?\nChoose no for sjis (NTSC-J)")); | |||
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.
|
There are some strange C-isms and small formatting issues, but it LGTM as-is. let me know if you're going to update it further or not and I'll merge it. |
|
i'll fix the spacings, I'd like to address the C-isms separately. go ahead and merge, and I'll create a new pull request after fixing the C-isms |
|
Ah, there are some more instances of such small spacing "issues", though. |
|
is there an existing astyle config (or other autoformatter) that will fix the formatting to match the style guide? I think I would prefer to do it as a separate PR, but whichever is preferred. |
|
I'm not aware of any tools like that. You can get pretty close (I think the only missing thing is the weird tab + space style of dolphin) with the built-in formatting options of visual studio (Tools->Options->Text Editor->C/C++). I just saw http://visualstudioextensions.vlasovstudio.com/2013/11/05/format-c-code-intelligently-in-visual-studio-with-clang-format/ , which looks quite nice...I might try it in the future.
|
|
I'll have to look into it more. I'd love to have a tool fix my forgetfullness/laziness. |
|
I have to ask... what happens if someone uses this and builds individual saves as GCI files, then moves over to an older version for say... issue testing? I assume that the saves that are in GCI format would simply not appear. This would be a big problem if someone has to convert their whole memory card to GCIs or back again. They'd essentially have no saves on older versions. In the end you need to do what's best for the future, not the past, but we testers need to know this stuff. I assume in the worst case scenario, a tester could always load up a GCI file via the memory card manager. |
|
There is the initial one time migration (when the gci dir doesn't exist). If wanted/necessary I can implement syncing between folder and memcard,
|
|
It would be great if you could do that. Most frequent testers like myself will probably just stick to the memory card, since it's backwards compatible going way back, but a way to go between them quickly would really make the GCI folder better for users and especially testers. |
| { | ||
| if (File::Rename(strDirectoryName, strDirectoryName + ".original")) | ||
| { | ||
| PanicAlertT("%s was not a directory, moved to *.original", strDirectoryName.c_str()); |
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.
| } | ||
| else // we tried but the user wants to crash | ||
| { | ||
| // TODO more user friendly abort |
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.
|
I would like to nail down sync rules, I will get some time to get a list edit- if it is unclear this was a response to On May 22, 2014 12:38 AM, "MaJoRoesch" notifications@github.com wrote:
|
|
I think further features like auto-synchronization between GCI folder and raw memory cards is beyond the scope of this PR, particularly since it's not obvious how to implement such a thing. Personally I'd like to be able to make the GCI folder location configurable (mostly because it's possible to have multiple memory card images, but not multiple GCI folders), but I think that also should simply happen in a followup PR. Hence, LGTM. |
|
This looks mostly ok to me and @neobrain LGTM'd earlier, please rebase and this can be merged. \o/ |
|
Source/Core/Core/HW/EXI_DeviceMemoryCardRaw.h: includes are incorrect Don't use relative paths that depend on the local dir, include "Core/HW/GCMemcard.h" (or wherever it is) explicitly. Also, trailing whitespaces on Source/Core/Core/HW/EXI_DeviceMemoryCardRaw.cpp:126. |
|
as far as I know those are fixed as of rd9eecd7 |
|
Last one: Source/Core/Core/HW/GCMemcardRaw.h: includes are incorrect Also, please remove all the unneeded things from the commit messages. A commit message should explain what the commit is doing now, not the history of everything that has been squashed into that commit. Thanks. |
… from USERDIR/GC/<REGION>/Card <A/B> Savestates include the entire memorycard, but the only saves that should be modified are the ones that are directly modified by the game the others are preserved merely to avoid changing the memory card header during the game as some games (Zelda) refuse to save Implement DMA r/w for memcard. Skips programming buffer for writes Add a migration feature that auto imports all saves from your default memcard to the new memcard dir if it doesn't exist. Actually "delete" save files by renaming to s/*.gci/*.gci.deleted/
|
I think I have it all cleaned up |
Add the option to use a folder of gamecube saves instead of a memcard image [issue 6599]
Delroth requested this feature back in sept as issue 6599
This includes the feature to create a virtual memorycard from a folder of gci files.
The saves that have been written to during gameplay will be stored in the savestate.
On first use of the option the users memorycard will be migrated to a folder (leaving the original memcard untouched)
After the memorycard folder exists, the user is required to synchronize the folder with a memcard image if wanted
commit includes the changes from PR 226