diff --git a/scripts/yuzu2ryujinx.py b/scripts/yuzu2ryujinx.py new file mode 100755 index 0000000..0209717 --- /dev/null +++ b/scripts/yuzu2ryujinx.py @@ -0,0 +1,56 @@ +#!/usr/bin/env nix-shell +#!nix-shell -i python3 -p python3 + +''' +Convert Yuzu saves to Ryujinx by putting them in profile 0 (RyuPlayer) +Note that this is rather destructive and won't deal well with multiple profiles, +so back saves up before trying it + +(if anyone wants to modify it, it's CC0) +''' + +from pathlib import Path +import os +import shutil +import struct +import typing + +RYUJINX_DIR = Path.home() / ".config" / "Ryujinx" +YUZU_DIR = Path.home() / ".local" / "share" / "yuzu" + +def get_yuzu_save_dir(): + profile_path = YUZU_DIR / "nand" / "system" / "save" / "8000000000000010" / "su" / "avators" / "profiles.dat" + with open(profile_path, "rb") as f: + # Just go with profile 0 + uid_low, uid_high = struct.unpack("