Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

use fixed-width types when necessary #52

Merged
merged 1 commit into from
Oct 30, 2021

Conversation

LukeUsher
Copy link
Contributor

@LukeUsher LukeUsher commented Jun 16, 2021

Use fixed-width types from stdint where it makes sense to do so.

Also fixes a couple of compiler warnings due to mismatching printf arguments on x64 builds.

Should fix #29.

I don't have the games listed in that issue, but I have confirmed that resulting ISOs have matching sha1 sums when hardcoding ftimestamps (patch not included) to ensure reproducible images

Please verify the following before merging:

  • When running H2:MMP with such a faulty ISO, the game will start but it will fail to install update the game executable and report "out of space" errors when trying to install the maps.

  • In CoD:BRO, the game will report dirty disc errors before getting to the main menu.

@dracc
Copy link
Contributor

dracc commented Jun 17, 2021

Code looks good, I have yet to test it.

@@ -1664,7 +1664,7 @@ int extract_file( int in_xiso, dir_node *in_file, modes in_mode , char* path) {
}
totalsize += size;
totalpercent = ( totalsize * 100.0 ) / in_file->file_size;
exiso_log( "%s%s%s (%lu bytes) [%lu%%]%s\r", in_mode == k_extract ? "extracting " : "", path, in_file->filename, in_file->file_size , totalpercent, "" );
exiso_log( "%s%s%s (%u bytes) [%u%%]%s\r", in_mode == k_extract ? "extracting " : "", path, in_file->filename, in_file->file_size , totalpercent, "" );
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Consider inttypes.h (PRIu32 and friends) so this can't causes issues in the future.

@abaire
Copy link

abaire commented Oct 30, 2021

In case it's helpful, I just verified that this patch fixes the crash I ran into after fixing the root cause of xemu-project/xemu#509.

@mborgerson
Copy link
Member

Thanks for the patch.

This does fix packing CoD:BRO, but does not resolve the issues with Halo 2 MMP.

I'll merge as it's improved, but I do not recommend using 64b builds of extract-xiso yet.

@mborgerson mborgerson merged commit 0a18705 into XboxDev:master Oct 30, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

64-bit build creates bad ISOs
5 participants