Update gcmtool.py

This commit is contained in:
tmpz23 2022-01-13 17:47:18 +01:00 committed by GitHub
parent fd0ef26125
commit b2a5ed9a43
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -12,7 +12,6 @@ __status__ = "developpement"
DVD_MAGIC = b"\xC2\x33\x9F\x3D" DVD_MAGIC = b"\xC2\x33\x9F\x3D"
FST_TYPE_FILE = 0 FST_TYPE_FILE = 0
FST_TYPE_DIR = 1 FST_TYPE_DIR = 1
BOOTBIN_LEN = 0x440 BOOTBIN_LEN = 0x440
BOOTBIN_DOLOFFSET_OFFSET = 0x420 BOOTBIN_DOLOFFSET_OFFSET = 0x420
BOOTBIN_FSTOFFSET_OFFSET = 0x424 BOOTBIN_FSTOFFSET_OFFSET = 0x424
@ -22,13 +21,8 @@ DOL_HEADER_LEN = 0x100
APPLOADER_HEADER_LEN = 0x20 APPLOADER_HEADER_LEN = 0x20
ISO_APPLOADER_OFFSET = 0x2440 ISO_APPLOADER_OFFSET = 0x2440
ISO_APPLOADERSIZE_OFFSET = 0x2454 ISO_APPLOADERSIZE_OFFSET = 0x2454
######################################################################
# Todo : add extension check ; add --disable-ignore
# -> test it on random iso and check that it's the same than dolphin extract
# -> test it !!!!
# add info on unused randoms bytes on initial DVD iso file
# -> that's why repack iso is different from initial iso
######################################################################
def align_offset(offset:int, align:int): def align_offset(offset:int, align:int):
if offset % align != 0: if offset % align != 0:
offset += align - (offset % align) offset += align - (offset % align)