From 72049b22c7b8d9ce3f595d0e8cda5e442b060fd7 Mon Sep 17 00:00:00 2001 From: Artemis Tosini Date: Fri, 15 Mar 2024 23:49:24 +0000 Subject: [PATCH] add hacky yuzu2ryujinx script --- scripts/yuzu2ryujinx.py | 56 +++++++++++++++++++++++++++++++++++++++++ 1 file changed, 56 insertions(+) create mode 100755 scripts/yuzu2ryujinx.py 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("