The Marvel vs Capcom 2 ISO contains an empty directory located at \media\sounds. If this directory is not present, the game will hang at a black screen during startup. When rewriting the Marvel vs Capcom 2 ISO using extract-xiso -r, the sounds folder is rewritten with attribute 0x20 (archive) instead of attribute 0x10 (directory), thus preventing the rewritten ISO from starting.
The EMPTY_SUBDIRECTORY value seems to be the intended solution here, but it never gets assigned in this situation. Expanding line 1324 to assign subdirectory = EMPTY_SUBDIRECTORY to zero-size directories appears to resolve the issue:
The Marvel vs Capcom 2 ISO contains an empty directory located at \media\sounds. If this directory is not present, the game will hang at a black screen during startup. When rewriting the Marvel vs Capcom 2 ISO using
extract-xiso -r
, the sounds folder is rewritten with attribute 0x20 (archive) instead of attribute 0x10 (directory), thus preventing the rewritten ISO from starting.https://github.com/XboxDev/extract-xiso/blob/3438285c5098757b112215c131e837876b566d31/extract-xiso.c#L1324 This only assigns a
subdirectory
to directories with a positivefile_size
. The sounds directory has a size of zero so itssubdirectory
field remains null.https://github.com/XboxDev/extract-xiso/blob/3438285c5098757b112215c131e837876b566d31/extract-xiso.c#L1852 This looks at the
subdirectory
field and assignsXISO_ATTRIBUTE_ARC
when it is null, otherwise it assignsXISO_ATTRIBUTE_DIR
. Thus, the sounds directory is tagged as an archive.The
EMPTY_SUBDIRECTORY
value seems to be the intended solution here, but it never gets assigned in this situation. Expanding line 1324 to assignsubdirectory = EMPTY_SUBDIRECTORY
to zero-size directories appears to resolve the issue: