From 838ba55a41c8e4fa614b141fc97b703e14a2fc76 Mon Sep 17 00:00:00 2001 From: ProjectRevoTPP Date: Fri, 11 Oct 2024 23:45:08 -0400 Subject: [PATCH] add more file extraction for late asset areas --- tools/decompress_yay0.py | 2 - tools/extract_assets.sh | 396 ++++++++++++++++++++++++++++++++++++++- tools/unpack_asset.py | 9 +- yamls/us/rom.yaml | 114 +++++------ 4 files changed, 460 insertions(+), 61 deletions(-) diff --git a/tools/decompress_yay0.py b/tools/decompress_yay0.py index 4c413a59..a1a193b2 100755 --- a/tools/decompress_yay0.py +++ b/tools/decompress_yay0.py @@ -16,5 +16,3 @@ fileout = Path(sys.argv[2]) fileout.write_bytes(decompressed) - -print("Yay0 decompressed") diff --git a/tools/extract_assets.sh b/tools/extract_assets.sh index 720d3020..e5ecc552 100755 --- a/tools/extract_assets.sh +++ b/tools/extract_assets.sh @@ -54,6 +54,65 @@ tools/unpack_asset.py assets/us/798CD0.bin tools/unpack_asset.py assets/us/snap_mode_ui.bin tools/unpack_asset.py assets/us/copyright.bin +# Late assets +tools/unpack_asset.py assets/us/rom_part_0.bin assets/us/rom_parts/0.bin +tools/unpack_asset.py assets/us/rom_part_1.bin assets/us/rom_parts/1.bin +tools/unpack_asset.py assets/us/rom_part_2.bin assets/us/rom_parts/2.bin +tools/unpack_asset.py assets/us/rom_part_3.bin assets/us/rom_parts/3.bin +tools/unpack_asset.py assets/us/rom_part_4.bin assets/us/rom_parts/4.bin +tools/unpack_asset.py assets/us/rom_part_5.bin assets/us/rom_parts/5.bin +tools/unpack_asset.py assets/us/rom_part_6.bin assets/us/rom_parts/6.bin +tools/unpack_asset.py assets/us/rom_part_7.bin assets/us/rom_parts/7.bin +tools/unpack_asset.py assets/us/rom_part_8.bin assets/us/rom_parts/8.bin +tools/unpack_asset.py assets/us/rom_part_9.bin assets/us/rom_parts/9.bin +tools/unpack_asset.py assets/us/rom_part_10.bin assets/us/rom_parts/10.bin +tools/unpack_asset.py assets/us/rom_part_11.bin assets/us/rom_parts/11.bin +tools/unpack_asset.py assets/us/rom_part_12.bin assets/us/rom_parts/12.bin +tools/unpack_asset.py assets/us/rom_part_13.bin assets/us/rom_parts/13.bin +tools/unpack_asset.py assets/us/rom_part_14.bin assets/us/rom_parts/14.bin +tools/unpack_asset.py assets/us/rom_part_15.bin assets/us/rom_parts/15.bin +tools/unpack_asset.py assets/us/rom_part_16.bin assets/us/rom_parts/16.bin +tools/unpack_asset.py assets/us/rom_part_17.bin assets/us/rom_parts/17.bin +tools/unpack_asset.py assets/us/rom_part_18.bin assets/us/rom_parts/18.bin +tools/unpack_asset.py assets/us/rom_part_19.bin assets/us/rom_parts/19.bin +tools/unpack_asset.py assets/us/rom_part_20.bin assets/us/rom_parts/20.bin +tools/unpack_asset.py assets/us/rom_part_21.bin assets/us/rom_parts/21.bin +tools/unpack_asset.py assets/us/rom_part_22.bin assets/us/rom_parts/22.bin +tools/unpack_asset.py assets/us/rom_part_23.bin assets/us/rom_parts/23.bin +tools/unpack_asset.py assets/us/rom_part_24.bin assets/us/rom_parts/24.bin +tools/unpack_asset.py assets/us/rom_part_25.bin assets/us/rom_parts/25.bin +tools/unpack_asset.py assets/us/rom_part_26.bin assets/us/rom_parts/26.bin +tools/unpack_asset.py assets/us/rom_part_27.bin assets/us/rom_parts/27.bin +tools/unpack_asset.py assets/us/rom_part_28.bin assets/us/rom_parts/28.bin +tools/unpack_asset.py assets/us/rom_part_29.bin assets/us/rom_parts/29.bin +tools/unpack_asset.py assets/us/rom_part_30.bin assets/us/rom_parts/30.bin +tools/unpack_asset.py assets/us/rom_part_31.bin assets/us/rom_parts/31.bin +tools/unpack_asset.py assets/us/rom_part_32.bin assets/us/rom_parts/32.bin +tools/unpack_asset.py assets/us/rom_part_33.bin assets/us/rom_parts/33.bin +tools/unpack_asset.py assets/us/rom_part_34.bin assets/us/rom_parts/34.bin +tools/unpack_asset.py assets/us/rom_part_35.bin assets/us/rom_parts/35.bin +tools/unpack_asset.py assets/us/rom_part_36.bin assets/us/rom_parts/36.bin +tools/unpack_asset.py assets/us/rom_part_37.bin assets/us/rom_parts/37.bin +tools/unpack_asset.py assets/us/rom_part_38.bin assets/us/rom_parts/38.bin +tools/unpack_asset.py assets/us/rom_part_39.bin assets/us/rom_parts/39.bin +tools/unpack_asset.py assets/us/rom_part_40.bin assets/us/rom_parts/40.bin +tools/unpack_asset.py assets/us/rom_part_41.bin assets/us/rom_parts/41.bin +tools/unpack_asset.py assets/us/rom_part_42.bin assets/us/rom_parts/42.bin +tools/unpack_asset.py assets/us/rom_part_43.bin assets/us/rom_parts/43.bin +tools/unpack_asset.py assets/us/rom_part_44.bin assets/us/rom_parts/44.bin +tools/unpack_asset.py assets/us/rom_part_45.bin assets/us/rom_parts/45.bin +tools/unpack_asset.py assets/us/rom_part_46.bin assets/us/rom_parts/46.bin +tools/unpack_asset.py assets/us/rom_part_47.bin assets/us/rom_parts/47.bin +tools/unpack_asset.py assets/us/rom_part_48.bin assets/us/rom_parts/48.bin +tools/unpack_asset.py assets/us/rom_part_49.bin assets/us/rom_parts/49.bin +tools/unpack_asset.py assets/us/rom_part_50.bin assets/us/rom_parts/50.bin +tools/unpack_asset.py assets/us/rom_part_51.bin assets/us/rom_parts/51.bin +tools/unpack_asset.py assets/us/rom_part_52.bin assets/us/rom_parts/52.bin +tools/unpack_asset.py assets/us/pokemon_icons.bin +tools/unpack_asset.py assets/us/898000.bin +tools/unpack_asset.py assets/us/8CC000.bin +tools/unpack_asset.py assets/us/920000.bin + # Next, decompress all the PERS-SZP files with a Yay0. TODO: Roll these up # into recursive calls. All of the files within an asset bin SHOULD be the # same type, but it in theory it isnt guaranteed to be. Does the game ensure @@ -192,6 +251,286 @@ tools/decompress_persszp.py assets/us/798CD0/0/file.bin tools/decompress_persszp.py assets/us/snap_mode_ui/0/file.bin tools/decompress_persszp.py assets/us/copyright/0/file.bin +# Decompress PERS-SZP files in late asset(s). +tools/decompress_persszp.py assets/us/8CC000/0/file.bin +tools/decompress_persszp.py assets/us/8CC000/1/file.bin +tools/decompress_persszp.py assets/us/8CC000/2/file.bin +tools/decompress_persszp.py assets/us/8CC000/3/file.bin +tools/decompress_persszp.py assets/us/8CC000/4/file.bin +tools/decompress_persszp.py assets/us/8CC000/5/file.bin +tools/decompress_persszp.py assets/us/8CC000/6/file.bin +tools/decompress_persszp.py assets/us/8CC000/7/file.bin +tools/decompress_persszp.py assets/us/8CC000/8/file.bin +tools/decompress_persszp.py assets/us/8CC000/9/file.bin +tools/decompress_persszp.py assets/us/8CC000/10/file.bin +tools/decompress_persszp.py assets/us/8CC000/11/file.bin +tools/decompress_persszp.py assets/us/8CC000/12/file.bin +tools/decompress_persszp.py assets/us/8CC000/13/file.bin +tools/decompress_persszp.py assets/us/8CC000/14/file.bin +tools/decompress_persszp.py assets/us/8CC000/15/file.bin +tools/decompress_persszp.py assets/us/8CC000/16/file.bin +tools/decompress_persszp.py assets/us/8CC000/17/file.bin +tools/decompress_persszp.py assets/us/8CC000/18/file.bin +tools/decompress_persszp.py assets/us/8CC000/19/file.bin +tools/decompress_persszp.py assets/us/8CC000/20/file.bin +tools/decompress_persszp.py assets/us/8CC000/21/file.bin +tools/decompress_persszp.py assets/us/8CC000/22/file.bin +tools/decompress_persszp.py assets/us/8CC000/23/file.bin +tools/decompress_persszp.py assets/us/8CC000/24/file.bin +tools/decompress_persszp.py assets/us/8CC000/25/file.bin +tools/decompress_persszp.py assets/us/8CC000/26/file.bin +tools/decompress_persszp.py assets/us/8CC000/27/file.bin +tools/decompress_persszp.py assets/us/8CC000/28/file.bin +tools/decompress_persszp.py assets/us/8CC000/29/file.bin +tools/decompress_persszp.py assets/us/8CC000/30/file.bin +tools/decompress_persszp.py assets/us/8CC000/31/file.bin +tools/decompress_persszp.py assets/us/8CC000/32/file.bin +tools/decompress_persszp.py assets/us/8CC000/33/file.bin +tools/decompress_persszp.py assets/us/8CC000/34/file.bin +tools/decompress_persszp.py assets/us/8CC000/35/file.bin +tools/decompress_persszp.py assets/us/8CC000/36/file.bin +tools/decompress_persszp.py assets/us/8CC000/37/file.bin +tools/decompress_persszp.py assets/us/8CC000/38/file.bin +tools/decompress_persszp.py assets/us/8CC000/39/file.bin +tools/decompress_persszp.py assets/us/8CC000/40/file.bin +tools/decompress_persszp.py assets/us/8CC000/41/file.bin +tools/decompress_persszp.py assets/us/8CC000/42/file.bin +tools/decompress_persszp.py assets/us/8CC000/43/file.bin +tools/decompress_persszp.py assets/us/8CC000/44/file.bin +tools/decompress_persszp.py assets/us/8CC000/45/file.bin +tools/decompress_persszp.py assets/us/8CC000/46/file.bin +tools/decompress_persszp.py assets/us/8CC000/47/file.bin +tools/decompress_persszp.py assets/us/8CC000/48/file.bin +tools/decompress_persszp.py assets/us/8CC000/49/file.bin +tools/decompress_persszp.py assets/us/8CC000/50/file.bin +tools/decompress_persszp.py assets/us/8CC000/51/file.bin +tools/decompress_persszp.py assets/us/8CC000/52/file.bin +tools/decompress_persszp.py assets/us/8CC000/53/file.bin +tools/decompress_persszp.py assets/us/8CC000/54/file.bin +tools/decompress_persszp.py assets/us/8CC000/55/file.bin +tools/decompress_persszp.py assets/us/8CC000/56/file.bin +tools/decompress_persszp.py assets/us/8CC000/57/file.bin +tools/decompress_persszp.py assets/us/8CC000/58/file.bin +tools/decompress_persszp.py assets/us/8CC000/59/file.bin +tools/decompress_persszp.py assets/us/8CC000/60/file.bin +tools/decompress_persszp.py assets/us/8CC000/61/file.bin +tools/decompress_persszp.py assets/us/8CC000/62/file.bin +tools/decompress_persszp.py assets/us/920000/0/file.bin +tools/decompress_persszp.py assets/us/920000/1/file.bin +tools/decompress_persszp.py assets/us/920000/2/file.bin +tools/decompress_persszp.py assets/us/920000/3/file.bin +tools/decompress_persszp.py assets/us/920000/4/file.bin +tools/decompress_persszp.py assets/us/920000/5/file.bin +tools/decompress_persszp.py assets/us/920000/6/file.bin +tools/decompress_persszp.py assets/us/920000/7/file.bin +tools/decompress_persszp.py assets/us/920000/8/file.bin +tools/decompress_persszp.py assets/us/920000/9/file.bin +tools/decompress_persszp.py assets/us/920000/10/file.bin +tools/decompress_persszp.py assets/us/920000/11/file.bin +tools/decompress_persszp.py assets/us/920000/12/file.bin +tools/decompress_persszp.py assets/us/920000/13/file.bin +tools/decompress_persszp.py assets/us/920000/14/file.bin +tools/decompress_persszp.py assets/us/920000/15/file.bin +tools/decompress_persszp.py assets/us/920000/16/file.bin +tools/decompress_persszp.py assets/us/920000/17/file.bin +tools/decompress_persszp.py assets/us/920000/18/file.bin +tools/decompress_persszp.py assets/us/920000/19/file.bin +tools/decompress_persszp.py assets/us/920000/20/file.bin +tools/decompress_persszp.py assets/us/920000/21/file.bin +tools/decompress_persszp.py assets/us/920000/22/file.bin +tools/decompress_persszp.py assets/us/920000/23/file.bin +tools/decompress_persszp.py assets/us/920000/24/file.bin +tools/decompress_persszp.py assets/us/920000/25/file.bin +tools/decompress_persszp.py assets/us/920000/26/file.bin +tools/decompress_persszp.py assets/us/920000/27/file.bin +tools/decompress_persszp.py assets/us/920000/28/file.bin +tools/decompress_persszp.py assets/us/920000/29/file.bin +tools/decompress_persszp.py assets/us/920000/30/file.bin +tools/decompress_persszp.py assets/us/920000/31/file.bin +tools/decompress_persszp.py assets/us/920000/32/file.bin +tools/decompress_persszp.py assets/us/920000/33/file.bin +tools/decompress_persszp.py assets/us/920000/34/file.bin +tools/decompress_persszp.py assets/us/920000/35/file.bin +tools/decompress_persszp.py assets/us/920000/36/file.bin +tools/decompress_persszp.py assets/us/920000/37/file.bin +tools/decompress_persszp.py assets/us/920000/38/file.bin +tools/decompress_persszp.py assets/us/920000/39/file.bin +tools/decompress_persszp.py assets/us/920000/40/file.bin +tools/decompress_persszp.py assets/us/920000/41/file.bin +tools/decompress_persszp.py assets/us/920000/42/file.bin +tools/decompress_persszp.py assets/us/920000/43/file.bin +tools/decompress_persszp.py assets/us/920000/44/file.bin +tools/decompress_persszp.py assets/us/920000/45/file.bin +tools/decompress_persszp.py assets/us/920000/46/file.bin +tools/decompress_persszp.py assets/us/920000/47/file.bin +tools/decompress_persszp.py assets/us/920000/48/file.bin +tools/decompress_persszp.py assets/us/920000/49/file.bin +tools/decompress_persszp.py assets/us/920000/50/file.bin +tools/decompress_persszp.py assets/us/920000/51/file.bin +tools/decompress_persszp.py assets/us/920000/52/file.bin +tools/decompress_persszp.py assets/us/920000/53/file.bin +tools/decompress_persszp.py assets/us/920000/54/file.bin +tools/decompress_persszp.py assets/us/920000/55/file.bin +tools/decompress_persszp.py assets/us/920000/56/file.bin +tools/decompress_persszp.py assets/us/920000/57/file.bin +tools/decompress_persszp.py assets/us/920000/58/file.bin +tools/decompress_persszp.py assets/us/920000/59/file.bin +tools/decompress_persszp.py assets/us/920000/60/file.bin +tools/decompress_persszp.py assets/us/920000/61/file.bin +tools/decompress_persszp.py assets/us/920000/62/file.bin +tools/decompress_persszp.py assets/us/920000/63/file.bin +tools/decompress_persszp.py assets/us/920000/64/file.bin +tools/decompress_persszp.py assets/us/920000/65/file.bin +tools/decompress_persszp.py assets/us/920000/66/file.bin +tools/decompress_persszp.py assets/us/920000/67/file.bin +tools/decompress_persszp.py assets/us/920000/68/file.bin +tools/decompress_persszp.py assets/us/920000/69/file.bin +tools/decompress_persszp.py assets/us/920000/70/file.bin +tools/decompress_persszp.py assets/us/920000/71/file.bin +tools/decompress_persszp.py assets/us/920000/72/file.bin +tools/decompress_persszp.py assets/us/920000/73/file.bin +tools/decompress_persszp.py assets/us/920000/74/file.bin +tools/decompress_persszp.py assets/us/920000/75/file.bin +tools/decompress_persszp.py assets/us/920000/76/file.bin +tools/decompress_persszp.py assets/us/920000/77/file.bin +tools/decompress_persszp.py assets/us/920000/78/file.bin +tools/decompress_persszp.py assets/us/920000/79/file.bin +tools/decompress_persszp.py assets/us/920000/80/file.bin +tools/decompress_persszp.py assets/us/920000/81/file.bin +tools/decompress_persszp.py assets/us/920000/82/file.bin +tools/decompress_persszp.py assets/us/920000/83/file.bin +tools/decompress_persszp.py assets/us/920000/84/file.bin +tools/decompress_persszp.py assets/us/920000/85/file.bin +tools/decompress_persszp.py assets/us/920000/86/file.bin +tools/decompress_persszp.py assets/us/920000/87/file.bin +tools/decompress_persszp.py assets/us/920000/88/file.bin +tools/decompress_persszp.py assets/us/920000/89/file.bin +tools/decompress_persszp.py assets/us/920000/90/file.bin +tools/decompress_persszp.py assets/us/920000/91/file.bin +tools/decompress_persszp.py assets/us/920000/92/file.bin +tools/decompress_persszp.py assets/us/920000/93/file.bin +tools/decompress_persszp.py assets/us/920000/94/file.bin +tools/decompress_persszp.py assets/us/920000/95/file.bin +tools/decompress_persszp.py assets/us/920000/96/file.bin +tools/decompress_persszp.py assets/us/920000/97/file.bin +tools/decompress_persszp.py assets/us/920000/98/file.bin +tools/decompress_persszp.py assets/us/920000/99/file.bin +tools/decompress_persszp.py assets/us/920000/100/file.bin +tools/decompress_persszp.py assets/us/920000/101/file.bin +tools/decompress_persszp.py assets/us/920000/102/file.bin +tools/decompress_persszp.py assets/us/920000/103/file.bin +tools/decompress_persszp.py assets/us/920000/104/file.bin +tools/decompress_persszp.py assets/us/920000/105/file.bin +tools/decompress_persszp.py assets/us/920000/106/file.bin +tools/decompress_persszp.py assets/us/920000/107/file.bin +tools/decompress_persszp.py assets/us/920000/108/file.bin +tools/decompress_persszp.py assets/us/920000/109/file.bin +tools/decompress_persszp.py assets/us/920000/110/file.bin +tools/decompress_persszp.py assets/us/920000/111/file.bin +tools/decompress_persszp.py assets/us/920000/112/file.bin +tools/decompress_persszp.py assets/us/920000/113/file.bin +tools/decompress_persszp.py assets/us/920000/114/file.bin +tools/decompress_persszp.py assets/us/920000/115/file.bin +tools/decompress_persszp.py assets/us/920000/116/file.bin +tools/decompress_persszp.py assets/us/920000/117/file.bin +tools/decompress_persszp.py assets/us/920000/118/file.bin +tools/decompress_persszp.py assets/us/920000/119/file.bin +#tools/decompress_persszp.py assets/us/920000/120/file.bin this file is just randomly not compressed. Thanks for breaking the uniform asset pattern, HAL. +tools/decompress_persszp.py assets/us/920000/121/file.bin +tools/decompress_persszp.py assets/us/920000/122/file.bin +tools/decompress_persszp.py assets/us/920000/123/file.bin +tools/decompress_persszp.py assets/us/920000/124/file.bin +tools/decompress_persszp.py assets/us/920000/125/file.bin +tools/decompress_persszp.py assets/us/920000/126/file.bin +tools/decompress_persszp.py assets/us/920000/127/file.bin +tools/decompress_persszp.py assets/us/920000/128/file.bin +tools/decompress_persszp.py assets/us/920000/129/file.bin +tools/decompress_persszp.py assets/us/920000/130/file.bin +tools/decompress_persszp.py assets/us/920000/131/file.bin +tools/decompress_persszp.py assets/us/920000/132/file.bin +tools/decompress_persszp.py assets/us/920000/133/file.bin +tools/decompress_persszp.py assets/us/920000/134/file.bin +tools/decompress_persszp.py assets/us/920000/135/file.bin +tools/decompress_persszp.py assets/us/920000/136/file.bin +tools/decompress_persszp.py assets/us/920000/137/file.bin +tools/decompress_persszp.py assets/us/920000/138/file.bin +tools/decompress_persszp.py assets/us/920000/139/file.bin +tools/decompress_persszp.py assets/us/920000/140/file.bin +tools/decompress_persszp.py assets/us/920000/141/file.bin +tools/decompress_persszp.py assets/us/920000/142/file.bin +tools/decompress_persszp.py assets/us/920000/143/file.bin +tools/decompress_persszp.py assets/us/920000/144/file.bin +tools/decompress_persszp.py assets/us/920000/145/file.bin +tools/decompress_persszp.py assets/us/920000/146/file.bin +tools/decompress_persszp.py assets/us/920000/147/file.bin +tools/decompress_persszp.py assets/us/920000/148/file.bin +tools/decompress_persszp.py assets/us/920000/149/file.bin +tools/decompress_persszp.py assets/us/920000/150/file.bin +tools/decompress_persszp.py assets/us/920000/151/file.bin +tools/decompress_persszp.py assets/us/920000/152/file.bin +tools/decompress_persszp.py assets/us/920000/153/file.bin +tools/decompress_persszp.py assets/us/920000/154/file.bin +tools/decompress_persszp.py assets/us/920000/155/file.bin +tools/decompress_persszp.py assets/us/920000/156/file.bin +tools/decompress_persszp.py assets/us/920000/157/file.bin +tools/decompress_persszp.py assets/us/920000/158/file.bin +tools/decompress_persszp.py assets/us/920000/159/file.bin +tools/decompress_persszp.py assets/us/920000/160/file.bin +tools/decompress_persszp.py assets/us/920000/161/file.bin +tools/decompress_persszp.py assets/us/920000/162/file.bin +tools/decompress_persszp.py assets/us/920000/163/file.bin +tools/decompress_persszp.py assets/us/920000/164/file.bin +tools/decompress_persszp.py assets/us/920000/165/file.bin +tools/decompress_persszp.py assets/us/920000/166/file.bin +tools/decompress_persszp.py assets/us/920000/167/file.bin +tools/decompress_persszp.py assets/us/920000/168/file.bin +tools/decompress_persszp.py assets/us/920000/169/file.bin +tools/decompress_persszp.py assets/us/920000/170/file.bin +tools/decompress_persszp.py assets/us/920000/171/file.bin +tools/decompress_persszp.py assets/us/920000/172/file.bin +tools/decompress_persszp.py assets/us/920000/173/file.bin +tools/decompress_persszp.py assets/us/920000/174/file.bin +tools/decompress_persszp.py assets/us/920000/175/file.bin +tools/decompress_persszp.py assets/us/920000/176/file.bin +tools/decompress_persszp.py assets/us/920000/177/file.bin +tools/decompress_persszp.py assets/us/920000/178/file.bin +tools/decompress_persszp.py assets/us/920000/179/file.bin +tools/decompress_persszp.py assets/us/920000/180/file.bin +tools/decompress_persszp.py assets/us/920000/181/file.bin +tools/decompress_persszp.py assets/us/920000/182/file.bin +tools/decompress_persszp.py assets/us/920000/183/file.bin +tools/decompress_persszp.py assets/us/920000/184/file.bin +tools/decompress_persszp.py assets/us/920000/185/file.bin +tools/decompress_persszp.py assets/us/920000/186/file.bin +tools/decompress_persszp.py assets/us/920000/187/file.bin +tools/decompress_persszp.py assets/us/920000/188/file.bin +tools/decompress_persszp.py assets/us/920000/189/file.bin +tools/decompress_persszp.py assets/us/920000/190/file.bin +tools/decompress_persszp.py assets/us/920000/191/file.bin +tools/decompress_persszp.py assets/us/920000/192/file.bin +tools/decompress_persszp.py assets/us/920000/193/file.bin +tools/decompress_persszp.py assets/us/920000/194/file.bin +tools/decompress_persszp.py assets/us/920000/195/file.bin +tools/decompress_persszp.py assets/us/920000/196/file.bin +tools/decompress_persszp.py assets/us/920000/197/file.bin +tools/decompress_persszp.py assets/us/920000/198/file.bin +tools/decompress_persszp.py assets/us/920000/199/file.bin +tools/decompress_persszp.py assets/us/920000/200/file.bin +tools/decompress_persszp.py assets/us/920000/201/file.bin +tools/decompress_persszp.py assets/us/920000/202/file.bin +tools/decompress_persszp.py assets/us/920000/203/file.bin +tools/decompress_persszp.py assets/us/920000/204/file.bin +tools/decompress_persszp.py assets/us/920000/205/file.bin +tools/decompress_persszp.py assets/us/920000/206/file.bin +tools/decompress_persszp.py assets/us/920000/207/file.bin +tools/decompress_persszp.py assets/us/920000/208/file.bin +tools/decompress_persszp.py assets/us/920000/209/file.bin +tools/decompress_persszp.py assets/us/920000/210/file.bin +tools/decompress_persszp.py assets/us/920000/211/file.bin +tools/decompress_persszp.py assets/us/920000/212/file.bin +tools/decompress_persszp.py assets/us/920000/213/file.bin +tools/decompress_persszp.py assets/us/920000/214/file.bin + # Extract all PRESJPEG files. tools/extract_presjpeg.py assets/us/backgrounds/0/file.bin tools/extract_presjpeg.py assets/us/backgrounds/1/file.bin @@ -229,4 +568,59 @@ tools/extract_presjpeg.py assets/us/6CA730/11/file.bin tools/extract_presjpeg.py assets/us/6CA730/12/file.bin tools/extract_presjpeg.py assets/us/6CA730/13/file.bin tools/extract_presjpeg.py assets/us/6CA730/14/file.bin -tools/extract_presjpeg.py assets/us/6CA730/15/file.bin \ No newline at end of file +tools/extract_presjpeg.py assets/us/6CA730/15/file.bin + +# Decompress raw Yay0s +tools/decompress_yay0.py assets/us/rom_parts/0.bin assets/us/rom_parts/0.bin +tools/decompress_yay0.py assets/us/rom_parts/1.bin assets/us/rom_parts/1.bin +tools/decompress_yay0.py assets/us/rom_parts/2.bin assets/us/rom_parts/2.bin +tools/decompress_yay0.py assets/us/rom_parts/3.bin assets/us/rom_parts/3.bin +tools/decompress_yay0.py assets/us/rom_parts/4.bin assets/us/rom_parts/4.bin +tools/decompress_yay0.py assets/us/rom_parts/5.bin assets/us/rom_parts/5.bin +tools/decompress_yay0.py assets/us/rom_parts/6.bin assets/us/rom_parts/6.bin +tools/decompress_yay0.py assets/us/rom_parts/7.bin assets/us/rom_parts/7.bin +tools/decompress_yay0.py assets/us/rom_parts/8.bin assets/us/rom_parts/8.bin +tools/decompress_yay0.py assets/us/rom_parts/9.bin assets/us/rom_parts/9.bin +tools/decompress_yay0.py assets/us/rom_parts/10.bin assets/us/rom_parts/10.bin +tools/decompress_yay0.py assets/us/rom_parts/11.bin assets/us/rom_parts/11.bin +tools/decompress_yay0.py assets/us/rom_parts/12.bin assets/us/rom_parts/12.bin +tools/decompress_yay0.py assets/us/rom_parts/13.bin assets/us/rom_parts/13.bin +tools/decompress_yay0.py assets/us/rom_parts/14.bin assets/us/rom_parts/14.bin +tools/decompress_yay0.py assets/us/rom_parts/15.bin assets/us/rom_parts/15.bin +tools/decompress_yay0.py assets/us/rom_parts/16.bin assets/us/rom_parts/16.bin +tools/decompress_yay0.py assets/us/rom_parts/17.bin assets/us/rom_parts/17.bin +tools/decompress_yay0.py assets/us/rom_parts/18.bin assets/us/rom_parts/18.bin +tools/decompress_yay0.py assets/us/rom_parts/19.bin assets/us/rom_parts/19.bin +tools/decompress_yay0.py assets/us/rom_parts/20.bin assets/us/rom_parts/20.bin +tools/decompress_yay0.py assets/us/rom_parts/21.bin assets/us/rom_parts/21.bin +tools/decompress_yay0.py assets/us/rom_parts/22.bin assets/us/rom_parts/22.bin +tools/decompress_yay0.py assets/us/rom_parts/23.bin assets/us/rom_parts/23.bin +tools/decompress_yay0.py assets/us/rom_parts/24.bin assets/us/rom_parts/24.bin +tools/decompress_yay0.py assets/us/rom_parts/25.bin assets/us/rom_parts/25.bin +tools/decompress_yay0.py assets/us/rom_parts/26.bin assets/us/rom_parts/26.bin +tools/decompress_yay0.py assets/us/rom_parts/27.bin assets/us/rom_parts/27.bin +tools/decompress_yay0.py assets/us/rom_parts/28.bin assets/us/rom_parts/28.bin +tools/decompress_yay0.py assets/us/rom_parts/29.bin assets/us/rom_parts/29.bin +tools/decompress_yay0.py assets/us/rom_parts/30.bin assets/us/rom_parts/30.bin +tools/decompress_yay0.py assets/us/rom_parts/31.bin assets/us/rom_parts/31.bin +tools/decompress_yay0.py assets/us/rom_parts/32.bin assets/us/rom_parts/32.bin +tools/decompress_yay0.py assets/us/rom_parts/33.bin assets/us/rom_parts/33.bin +tools/decompress_yay0.py assets/us/rom_parts/34.bin assets/us/rom_parts/34.bin +tools/decompress_yay0.py assets/us/rom_parts/35.bin assets/us/rom_parts/35.bin +tools/decompress_yay0.py assets/us/rom_parts/36.bin assets/us/rom_parts/36.bin +tools/decompress_yay0.py assets/us/rom_parts/37.bin assets/us/rom_parts/37.bin +tools/decompress_yay0.py assets/us/rom_parts/38.bin assets/us/rom_parts/38.bin +tools/decompress_yay0.py assets/us/rom_parts/39.bin assets/us/rom_parts/39.bin +tools/decompress_yay0.py assets/us/rom_parts/40.bin assets/us/rom_parts/40.bin +tools/decompress_yay0.py assets/us/rom_parts/41.bin assets/us/rom_parts/41.bin +tools/decompress_yay0.py assets/us/rom_parts/42.bin assets/us/rom_parts/42.bin +tools/decompress_yay0.py assets/us/rom_parts/43.bin assets/us/rom_parts/43.bin +tools/decompress_yay0.py assets/us/rom_parts/44.bin assets/us/rom_parts/44.bin +tools/decompress_yay0.py assets/us/rom_parts/45.bin assets/us/rom_parts/45.bin +tools/decompress_yay0.py assets/us/rom_parts/46.bin assets/us/rom_parts/46.bin +tools/decompress_yay0.py assets/us/rom_parts/47.bin assets/us/rom_parts/47.bin +tools/decompress_yay0.py assets/us/rom_parts/48.bin assets/us/rom_parts/48.bin +tools/decompress_yay0.py assets/us/rom_parts/49.bin assets/us/rom_parts/49.bin +tools/decompress_yay0.py assets/us/rom_parts/50.bin assets/us/rom_parts/50.bin +tools/decompress_yay0.py assets/us/rom_parts/51.bin assets/us/rom_parts/51.bin +tools/decompress_yay0.py assets/us/rom_parts/52.bin assets/us/rom_parts/52.bin diff --git a/tools/unpack_asset.py b/tools/unpack_asset.py index 19038a57..c1c84062 100755 --- a/tools/unpack_asset.py +++ b/tools/unpack_asset.py @@ -18,6 +18,10 @@ def read_32_be_value(file_arr, i): # -------------------------- assets_path = "assets/us/" + +extract_to = None +if len(sys.argv) == 3: + extract_to = sys.argv[2] filepath = Path(sys.argv[1]) filename = os.path.splitext(os.path.basename(filepath))[0] @@ -32,7 +36,10 @@ def read_32_be_value(file_arr, i): # For some reason, stadium_models.bin breaks this pattern and uses this for something. (HACK: Workaround by just not checking the 4th byte.) # TODO: Properly handle this if file_header[0] != 0x00 or file_header[1] != 0x00 or file_header[2] != 0x00 or file_header[4] != 0x00 or file_header[5] != 0x00 or file_header[6] != 0x00 or file_header[7] != 0x00: - file_path_to_write = assets_path + filename + "/0/file.bin" + if extract_to == None: + file_path_to_write = assets_path + filename + "/0/file.bin" + else: + file_path_to_write = extract_to os.makedirs(os.path.dirname(file_path_to_write), exist_ok=True) with open(file_path_to_write, 'wb') as f: fin = open(filepath, 'rb') diff --git a/yamls/us/rom.yaml b/yamls/us/rom.yaml index e1daac96..8e50b2ad 100644 --- a/yamls/us/rom.yaml +++ b/yamls/us/rom.yaml @@ -2499,7 +2499,7 @@ # ------------------------------------------------ # Seems to be the portion(s) of the ROM(s) used in GB Tower mode. - - name: late_assets_1 + - name: gb_tower_roms type: code bss_size: 0x0 start: 0x7C0000 @@ -2507,70 +2507,70 @@ ld_align_segment_start: 0x7C0000 subalign: 4 subsegments: # unaligned starts - - [0x7C0000, bin] - - [0x7C18F8, bin] - - [0x7C3398, bin] - - [0x7C4E14, bin] - - [0x7C6854, bin] - - [0x7C8154, bin] - - [0x7C9BA8, bin] - - [0x7CB654, bin] - - [0x7CD0D0, bin] - - [0x7CD3D4, bin] - - [0x7CD938, bin] - - [0x7CFFCC, bin] - - [0x7D1EF4, bin] - - [0x7D3CAC, bin] - - [0x7D56D8, bin] - - [0x7D79AC, bin] - - [0x7D9718, bin] - - [0x7DB5C0, bin] - - [0x7DD2F8, bin] - - [0x7DEF80, bin] - - [0x7E0894, bin] - - [0x7E2424, bin] - - [0x7E495C, bin] - - [0x7E6D4C, bin] - - [0x7E8FD0, bin] - - [0x7EAB78, bin] - - [0x7ED0E8, bin] - - [0x7EED64, bin] - - [0x7F118C, bin] - - [0x7F2A78, bin] - - [0x7F4774, bin] - - [0x7F6ABC, bin] - - [0x7F8E44, bin] - - [0x7FB188, bin] - - [0x7FD23C, bin] - - [0x7FF56C, bin] - - [0x8018C0, bin] - - [0x803BD0, bin] - - [0x805AE0, bin] - - [0x807C74, bin] - - [0x808378, bin] - - [0x809118, bin] - - [0x80B0DC, bin] - - [0x80C444, bin] - - [0x80E1DC, bin] - - [0x80F368, bin] - - [0x810FBC, bin] - - [0x812BA8, bin] - - [0x81491C, bin] - - [0x816B90, bin] - - [0x818C64, bin] - - [0x81AA20, bin] - - [0x81CB8C, bin] # end of Yay0 files + - [0x7C0000, bin, rom_part_0] + - [0x7C18F8, bin, rom_part_1] + - [0x7C3398, bin, rom_part_2] + - [0x7C4E14, bin, rom_part_3] + - [0x7C6854, bin, rom_part_4] + - [0x7C8154, bin, rom_part_5] + - [0x7C9BA8, bin, rom_part_6] + - [0x7CB654, bin, rom_part_7] + - [0x7CD0D0, bin, rom_part_8] + - [0x7CD3D4, bin, rom_part_9] + - [0x7CD938, bin, rom_part_10] + - [0x7CFFCC, bin, rom_part_11] + - [0x7D1EF4, bin, rom_part_12] + - [0x7D3CAC, bin, rom_part_13] + - [0x7D56D8, bin, rom_part_14] + - [0x7D79AC, bin, rom_part_15] + - [0x7D9718, bin, rom_part_16] + - [0x7DB5C0, bin, rom_part_17] + - [0x7DD2F8, bin, rom_part_18] + - [0x7DEF80, bin, rom_part_19] + - [0x7E0894, bin, rom_part_20] + - [0x7E2424, bin, rom_part_21] + - [0x7E495C, bin, rom_part_22] + - [0x7E6D4C, bin, rom_part_23] + - [0x7E8FD0, bin, rom_part_24] + - [0x7EAB78, bin, rom_part_25] + - [0x7ED0E8, bin, rom_part_26] + - [0x7EED64, bin, rom_part_27] + - [0x7F118C, bin, rom_part_28] + - [0x7F2A78, bin, rom_part_29] + - [0x7F4774, bin, rom_part_30] + - [0x7F6ABC, bin, rom_part_31] + - [0x7F8E44, bin, rom_part_32] + - [0x7FB188, bin, rom_part_33] + - [0x7FD23C, bin, rom_part_34] + - [0x7FF56C, bin, rom_part_35] + - [0x8018C0, bin, rom_part_36] + - [0x803BD0, bin, rom_part_37] + - [0x805AE0, bin, rom_part_38] + - [0x807C74, bin, rom_part_39] + - [0x808378, bin, rom_part_40] + - [0x809118, bin, rom_part_41] + - [0x80B0DC, bin, rom_part_42] + - [0x80C444, bin, rom_part_43] + - [0x80E1DC, bin, rom_part_44] + - [0x80F368, bin, rom_part_45] + - [0x810FBC, bin, rom_part_46] + - [0x812BA8, bin, rom_part_47] + - [0x81491C, bin, rom_part_48] + - [0x816B90, bin, rom_part_49] + - [0x818C64, bin, rom_part_50] + - [0x81AA20, bin, rom_part_51] + - [0x81CB8C, bin, rom_part_52] # end of Yay0 files - [0x81EC28] - # multi bin asset array of 152 uncompressed icons of the pokemon. - - name: late_assets_2 + # multi bin asset array of 152 uncompressed icons of the pokemon (last ID is Substitute Doll). + - name: pokemon_icons type: code bss_size: 0x0 start: 0x820000 vram: 0x8FD00000 # unknown vram. Another unused one? Might be 8FD00000? ld_align_segment_start: 0x820000 subsegments: - - [0x820000, bin] + - [0x820000, bin, pokemon_icons] - name: late_assets_3 type: code