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

Partially implement ExtSaveData #447

Draft
wants to merge 18 commits into
base: master
Choose a base branch
from

Conversation

yretenai
Copy link
Contributor

@yretenai yretenai commented Mar 7, 2024

Refactors SDMC ExtData layout to reflect VSXE behavior and properly stores FormatInfo.

Created DeleteDirectory and DeleteDirectoryRecursively stubs for future use.

Things that are still a ?:

  • "boss" (spotpass) files
  • NAND ExtSave (will this just overwrite other title save files?)
  • icon

@yretenai yretenai force-pushed the ext-save-data branch 2 times, most recently from badcb61 to 556b3b8 Compare March 7, 2024 20:26
@yretenai
Copy link
Contributor Author

yretenai commented Mar 7, 2024

(The force pushes were me merging upstream, but I ended up undoing it and just using my own local primary branch.)

@@ -431,11 +432,23 @@ void FSService::deleteDirectory(u32 messagePointer) {
const u32 filePathPointer = mem.read32(messagePointer + 28);
log("FS::DeleteDirectory\n");

Helpers::warn("Stubbed FS::DeleteDirectory call!");
Helpers::warn("Stubbed FS::DeleteDirectory call!"); // note: should we ensure the system isn't about to delete things outside of the VFS?
Copy link
Owner

Choose a reason for hiding this comment

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

(This is done by isPathSafe in the archive implementations)

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Oh

@wheremyfoodat
Copy link
Owner

Haven't looked into it further yet but I notice a regression in Kirby Planet Robobot which went from working to panicking before booting.

@wheremyfoodat
Copy link
Owner

Haven't looked into it further yet but I notice a regression in Kirby Planet Robobot which went from working to panicking before booting.

Still haven't tried newer builds, but the commit here had also broken other games like Lego Avengers.

@wheremyfoodat
Copy link
Owner

Can confirm the breakage is still present in aforementioned games + Legend of Zelda: A Link Between Worlds, Rhythm Paradise Megamix and probably more

ExtSaveDataArchive extSaveData_sdmc;
ExtSaveDataArchive sharedExtSaveData_nand;
std::unordered_map<u64, ExtSaveDataArchive> extSaveData_sdmc;
std::unordered_map<u64, ExtSaveDataArchive> nandExtSaveData_nand;
SystemSaveDataArchive systemSaveData;
Copy link
Owner

Choose a reason for hiding this comment

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

That's a lotta nand

Copy link
Owner

Choose a reason for hiding this comment

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

These are also not correctly reset

@wheremyfoodat wheremyfoodat marked this pull request as draft March 13, 2024 20:29
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants