mirror of
https://github.com/NinjaCheetah/WiiPy.git
synced 2025-04-26 21:31:02 -04:00
Info cmd: Improved region output, added boot content index, installed title size now displayed for WADs
This commit is contained in:
parent
e34c10c3fa
commit
4730f3512b
6
.gitignore
vendored
6
.gitignore
vendored
@ -164,7 +164,7 @@ cython_debug/
|
|||||||
# option (not recommended) you can uncomment the following to ignore the entire idea folder.
|
# option (not recommended) you can uncomment the following to ignore the entire idea folder.
|
||||||
.idea/
|
.idea/
|
||||||
|
|
||||||
# Allows me to keep TMD files in my repository folder for testing without accidentally publishing them
|
# Allows me to keep Wii files in my repository folder for testing without accidentally publishing them
|
||||||
*.tmd
|
*.tmd
|
||||||
*.tik
|
*.tik
|
||||||
*.cert
|
*.cert
|
||||||
@ -173,8 +173,12 @@ cython_debug/
|
|||||||
*.app
|
*.app
|
||||||
*.arc
|
*.arc
|
||||||
*.ash
|
*.ash
|
||||||
|
*.met
|
||||||
out_prod/
|
out_prod/
|
||||||
remakewad.pl
|
remakewad.pl
|
||||||
|
content.map
|
||||||
|
uid.sys
|
||||||
|
SYSCONF
|
||||||
|
|
||||||
# Also awful macOS files
|
# Also awful macOS files
|
||||||
*._*
|
*._*
|
||||||
|
@ -18,7 +18,7 @@ def _print_tmd_info(tmd: libWiiPy.title.TMD):
|
|||||||
print(f" TMD Version: {tmd.tmd_version}")
|
print(f" TMD Version: {tmd.tmd_version}")
|
||||||
# IOSes just have an all-zero TID, so don't bothering showing that.
|
# IOSes just have an all-zero TID, so don't bothering showing that.
|
||||||
if tmd.ios_tid == "0000000000000000":
|
if tmd.ios_tid == "0000000000000000":
|
||||||
print(f" IOS Version: N/A")
|
print(f" Required IOS: N/A")
|
||||||
else:
|
else:
|
||||||
print(f" Required IOS: IOS{int(tmd.ios_tid[-2:], 16)} ({tmd.ios_tid})")
|
print(f" Required IOS: IOS{int(tmd.ios_tid[-2:], 16)} ({tmd.ios_tid})")
|
||||||
if tmd.signature_issuer.find("CP00000004") != -1:
|
if tmd.signature_issuer.find("CP00000004") != -1:
|
||||||
@ -32,7 +32,23 @@ def _print_tmd_info(tmd: libWiiPy.title.TMD):
|
|||||||
print(f" Certificate Issuer: Root-CA10000000 (Arcade)")
|
print(f" Certificate Issuer: Root-CA10000000 (Arcade)")
|
||||||
else:
|
else:
|
||||||
print(f" Certificate Info: {tmd.signature_issuer} (Unknown)")
|
print(f" Certificate Info: {tmd.signature_issuer} (Unknown)")
|
||||||
print(f" Region: {tmd.get_title_region()}")
|
if tmd.title_id == "0000000100000002":
|
||||||
|
match tmd.title_version_converted[-1:]:
|
||||||
|
case "U":
|
||||||
|
region = "USA"
|
||||||
|
case "E":
|
||||||
|
region = "EUR"
|
||||||
|
case "J":
|
||||||
|
region = "JPN"
|
||||||
|
case "K":
|
||||||
|
region = "KOR"
|
||||||
|
case _:
|
||||||
|
region = "None"
|
||||||
|
elif tmd.title_id[:8] == "00000001":
|
||||||
|
region = "None"
|
||||||
|
else:
|
||||||
|
region = tmd.get_title_region()
|
||||||
|
print(f" Region: {region}")
|
||||||
print(f" Title Type: {tmd.get_title_type()}")
|
print(f" Title Type: {tmd.get_title_type()}")
|
||||||
print(f" vWii Title: {bool(tmd.vwii)}")
|
print(f" vWii Title: {bool(tmd.vwii)}")
|
||||||
print(f" DVD Video Access: {tmd.get_access_right(tmd.AccessFlags.DVD_VIDEO)}")
|
print(f" DVD Video Access: {tmd.get_access_right(tmd.AccessFlags.DVD_VIDEO)}")
|
||||||
@ -41,6 +57,8 @@ def _print_tmd_info(tmd: libWiiPy.title.TMD):
|
|||||||
# Iterate over the content and print their details.
|
# Iterate over the content and print their details.
|
||||||
print("\nContent Info")
|
print("\nContent Info")
|
||||||
print(f" Total Contents: {tmd.num_contents}")
|
print(f" Total Contents: {tmd.num_contents}")
|
||||||
|
print(f" Boot Content Index: {tmd.boot_index}")
|
||||||
|
print(" Content Records:")
|
||||||
for content in tmd.content_records:
|
for content in tmd.content_records:
|
||||||
print(f" Content Index: {content.index}")
|
print(f" Content Index: {content.index}")
|
||||||
print(f" Content ID: " + f"{content.content_id:08X}".lower())
|
print(f" Content ID: " + f"{content.content_id:08X}".lower())
|
||||||
@ -91,6 +109,18 @@ def _print_wad_info(title: libWiiPy.title.Title):
|
|||||||
print(f" WAD Type: boot2")
|
print(f" WAD Type: boot2")
|
||||||
case _:
|
case _:
|
||||||
print(f" WAD Type: Unknown ({title.wad.wad_type})")
|
print(f" WAD Type: Unknown ({title.wad.wad_type})")
|
||||||
|
min_size_blocks = title.get_title_size_blocks()
|
||||||
|
max_size_blocks = title.get_title_size_blocks(absolute=True)
|
||||||
|
if min_size_blocks == max_size_blocks:
|
||||||
|
print(f" Installed Size: {min_size_blocks} blocks")
|
||||||
|
else:
|
||||||
|
print(f" Installed Size: {min_size_blocks}-{max_size_blocks} blocks")
|
||||||
|
min_size = round(title.get_title_size() / 1048576, 2)
|
||||||
|
max_size = round(title.get_title_size(absolute=True) / 1048576, 2)
|
||||||
|
if min_size == max_size:
|
||||||
|
print(f" Installed Size (MB): {min_size} MB")
|
||||||
|
else:
|
||||||
|
print(f" Installed Size (MB): {min_size}-{max_size} MB")
|
||||||
print(f" Has Meta/Footer: {bool(title.wad.wad_meta_size)}")
|
print(f" Has Meta/Footer: {bool(title.wad.wad_meta_size)}")
|
||||||
print(f" Has CRL: {bool(title.wad.wad_crl_size)}")
|
print(f" Has CRL: {bool(title.wad.wad_crl_size)}")
|
||||||
print("")
|
print("")
|
||||||
|
Loading…
x
Reference in New Issue
Block a user