-
Notifications
You must be signed in to change notification settings - Fork 110
Open
Description
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.
-
Line 1324 in 3438285
if ( ! err && dir->file_size > 0 ) err = traverse_xiso( in_xiso, &subdir, (xoff_t) dir->start_sector * XISO_SECTOR_SIZE + s_xbox_disc_lseek, path, in_mode, in_mode == k_generate_avl ? &dir->avl_node->subdirectory : nil, in_ll_compat ); subdirectory
to directories with a positivefile_size
. The sounds directory has a size of zero so itssubdirectory
field remains null. -
Line 1852 in 3438285
char length = (char) strlen( in_avl->filename ), attributes = in_avl->subdirectory ? XISO_ATTRIBUTE_DIR : XISO_ATTRIBUTE_ARC, sector[ XISO_SECTOR_SIZE ]; 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 assign subdirectory = EMPTY_SUBDIRECTORY
to zero-size directories appears to resolve the issue:
if (!err)
{
if (dir->file_size > 0)
err = traverse_xiso(in_xiso, &subdir, (xoff_t)dir->start_sector * XISO_SECTOR_SIZE + s_xbox_disc_lseek, path, in_mode, in_mode == k_generate_avl ? &dir->avl_node->subdirectory : nil, in_ll_compat);
else
dir->avl_node->subdirectory = EMPTY_SUBDIRECTORY;
}
Metadata
Metadata
Assignees
Labels
No labels