Last active
January 25, 2024 16:29
-
-
Save MCMi460/b071c2dce1761c14bd4f27bdddfe4b60 to your computer and use it in GitHub Desktop.
Get the Content Categories from a 3DS Title ID
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Content Categories from Title ID 3DS | |
# https://www.3dbrew.org/wiki/Titles | |
title_id = 0x0004000E00086300 # Animal Crossing: New Leaf Update Ver. 1.5 | |
target = int(hex(title_id)[3:7], 16) # Grab "ABCD" from 0xCCCCABCDLLLLLLRR | |
categories = [ | |
('TWL', 0x8000), | |
('CanSkipConvertJumpId', 0x100), | |
('NotRequireRightForMount', 0x80), | |
('NotRequireUserApproval', 0x40), | |
('RequireBatchUpdate', 0x20), | |
('System', 0x10), | |
('CannotExecution', 0x8), | |
('Patch', 0x6), | |
('AddOnContents', 0x4), | |
('Contents', 0x3), | |
('Demo', 0x2), | |
('DlpChild', 0x1), | |
('Normal', 0x0), | |
] | |
for category in categories: | |
bitmask = category[1] | |
name = category[0] | |
if bitmask <= target: | |
target = target & ~bitmask | |
print(f'{name} -- {hex(bitmask)}') |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment