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

Save folder memory card header to disk #13231

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

AdmiralCurtiss
Copy link
Contributor

This way the memory card won't be recognized as a completely different memory card every game session, which can matter for some save files that use this information as copy protection.

This likely works around https://bugs.dolphin-emu.org/issues/12781 for saves created after this change only, though I have not verified this.

This also likely works around that issue where the PSO license file doesn't work on folder memory cards because we don't implement the encryption/checksum for it. I only vaguely remember the details about this and wasn't able to find an issue on our bug tracker, maybe someone knows what I'm talking about so we can verify this...

This way the memory card won't be recognized as a completely different memory card every game session, which can matter for some save files that use this information as copy protection.

This likely works around https://bugs.dolphin-emu.org/issues/12781 for saves created after this change only, though I have not verified this.
@@ -38,7 +38,7 @@
#include "Core/HW/Sram.h"
#include "Core/NetPlayProto.h"

static const char* MC_HDR = "MC_SYSTEM_AREA";
static constexpr char HEADER_FILENAME[] = "header.bin";
Copy link
Contributor Author

Choose a reason for hiding this comment

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

In case you're wondering: I've intentionally not reused what seems to be an old debugging remnant here, because that could potentially lead to an issue with old builds where the memory card size in the header and the actual memory card size mismatch since the old code didn't check for this. (same for the card text encoding)

@JMC47
Copy link
Contributor

JMC47 commented Dec 24, 2024

would this mean we could remove the hack from the codebase for F-Zero GX to recognize the memcard as well?

@AdmiralCurtiss
Copy link
Contributor Author

While that would probably work, you'd also be getting rid of the ability to move the save between memory cards. So I would recommend against that.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

2 participants