Skip to content

Commit 5151dfa

Browse files
committed
tools/setup: add support for v1.9.0 NSO
v1.9.0 is now the latest Switch version.
1 parent 8e588c2 commit 5151dfa

1 file changed

Lines changed: 12 additions & 12 deletions

File tree

tools/setup.py

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -14,16 +14,16 @@
1414
TARGET_ELF_PATH = setup.get_target_elf_path()
1515

1616

17-
def _download_v181_to_v150_patch(dest: Path):
17+
def _download_latest_to_v150_patch(dest: Path):
1818
print(">>>> downloading patch...")
19-
urllib.request.urlretrieve("https://s.botw.link/v150_downgrade/v181_to_v150.patch", dest)
19+
urllib.request.urlretrieve("https://s.botw.link/v150_downgrade/v190_to_v150.patch", dest)
2020

2121

2222
def prepare_executable(original_nso: Optional[Path]):
2323
COMPRESSED_V150_HASH = "898dc199301f7c419be5144bb5cb27e2fc346e22b27345ba3fb40c0060c2baf8"
2424
UNCOMPRESSED_V150_HASH = "d9fa308d0ee7c0ab081c66d987523385e1afe06f66731bbfa32628438521c106"
25-
COMPRESSED_V181_HASH = "92a2ff88205a00ba3eaaf7c1cd3e247220c93eafefa48d7b7b1d6b97e444bb5e"
26-
UNCOMPRESSED_V181_HASH = "efccff3dd89599f54d7889e339b240565ad4a21c6478a7264808b702a7d264c4"
25+
COMPRESSED_V190_HASH = "f6f0b20bb1f2b67d164c24871cd473147eef1d285f12e7bd492e3126c6022e27"
26+
UNCOMPRESSED_V190_HASH = "6a30c162a2e6f885e0b1c0a6673a84795549a5ccdec1de8d3a741168ac4cba86"
2727

2828
# The uncompressed v1.5.0 main NSO.
2929
TARGET_HASH = UNCOMPRESSED_V150_HASH
@@ -49,23 +49,23 @@ def prepare_executable(original_nso: Optional[Path]):
4949
print(">>> found compressed 1.5.0 NSO")
5050
setup._decompress_nso(original_nso, TARGET_PATH)
5151

52-
elif nso_hash == UNCOMPRESSED_V181_HASH:
53-
print(">>> found uncompressed 1.8.1 NSO")
52+
elif nso_hash == UNCOMPRESSED_V190_HASH:
53+
print(">>> found uncompressed 1.9.0 NSO")
5454

5555
with tempfile.TemporaryDirectory() as tmpdir:
5656
patch_path = Path(tmpdir) / "patch"
57-
_download_v181_to_v150_patch(patch_path)
57+
_download_latest_to_v150_patch(patch_path)
5858
setup._apply_xdelta3_patch(original_nso, patch_path, TARGET_PATH)
5959

60-
elif nso_hash == COMPRESSED_V181_HASH:
61-
print(">>> found compressed 1.8.1 NSO")
60+
elif nso_hash == COMPRESSED_V190_HASH:
61+
print(">>> found compressed 1.9.0 NSO")
6262

6363
with tempfile.TemporaryDirectory() as tmpdir:
6464
patch_path = Path(tmpdir) / "patch"
65-
decompressed_nso_path = Path(tmpdir) / "v181.nso"
65+
decompressed_nso_path = Path(tmpdir) / "v190.nso"
6666

6767
setup._decompress_nso(original_nso, decompressed_nso_path)
68-
_download_v181_to_v150_patch(patch_path)
68+
_download_latest_to_v150_patch(patch_path)
6969
setup._apply_xdelta3_patch(decompressed_nso_path, patch_path, TARGET_PATH)
7070

7171
else:
@@ -97,7 +97,7 @@ def main():
9797
parser = argparse.ArgumentParser(
9898
"setup.py", description="Set up the Breath of the Wild decompilation project")
9999
parser.add_argument("original_nso", type=Path,
100-
help="Path to the original NSO (1.5.0 or 1.8.1, compressed or not)", nargs="?")
100+
help="Path to the original NSO (1.5.0 or 1.9.0, compressed or not)", nargs="?")
101101
args = parser.parse_args()
102102

103103
setup.install_viking()

0 commit comments

Comments
 (0)