diff --git a/gm8x_fix.c b/gm8x_fix.c index 0648f20..1189385 100644 --- a/gm8x_fix.c +++ b/gm8x_fix.c @@ -60,6 +60,9 @@ Patch patches[] = { {.bytes = resetpatch_81_141, .name = "GM8.1.141 display reset patch", .type = RESET}, {.bytes = dplaypatch_81_141, .name = "GM8.1.141 DirectPlay patch", .type = DPLAY}, + // the wall of shame + {.bytes = resetpatch_fix_81_141, .name = "gm8x_fix 5.5.5-5.5.6 bugfix", .type = BUGFIX}, + {.bytes = NULL}, }; @@ -309,13 +312,13 @@ int main(int argc, const char *argv[]) { valid_args = false; } // funny title - puts("Welcome to gm8x_fix v0.5.6!"); + puts("Welcome to gm8x_fix v0.5.7!"); puts("Source code is at https://github.com/skyfloogle/gm8x_fix under MIT license."); puts("---------------------------------------------------------------------------"); // did the user decide to be a funnyman and disable everything bool all_disabled = true; for (int i = 0; i < TYPE_COUNT; i++) { - if (i != UPX && !disable_patches[i]) { + if (i != UPX && i != BUGFIX && !disable_patches[i]) { all_disabled = false; break; } @@ -400,7 +403,7 @@ int main(int argc, const char *argv[]) { puts("Patches that can be applied:"); for (Patch *patch = patches; patch->bytes != NULL; patch++) { if (patch->state == ABLE) { - if (patch->type == UPX) { + if (patch->type == UPX || patch->type == BUGFIX) { printf("* %s (required, I won't ask for confirmation)\n", patch->name); } else { printf("* %s\n", patch->name); @@ -466,8 +469,9 @@ int main(int argc, const char *argv[]) { } if (patch->state == ABLE) { bool able = false; - if (patch->type == UPX) { + if (patch->type == UPX || patch->type == BUGFIX) { able = true; + printf("Applying %s...\n", patch->name); } else { if (patch->type == SCHED && !joy_patched) { puts("It looks like the joystick patch wasn't applied. It's best to apply that if you're going to use the scheduler patch."); diff --git a/patch_types.h b/patch_types.h index 510872a..42bd4bb 100644 --- a/patch_types.h +++ b/patch_types.h @@ -18,6 +18,7 @@ typedef enum { SCHED, INPUTLAG, RESET, + BUGFIX, // for when i messed up TYPE_COUNT, } PatchType; diff --git a/patches.c b/patches.c index 249e6d0..2e2e75e 100644 --- a/patches.c +++ b/patches.c @@ -4226,6 +4226,22 @@ PatchByte resetpatch_81_141[] = { { 0x21ee97, 0x68, 0x85 }, { 0x21ee98, 0x0, 0xc0 }, { 0x21ee99, 0x8b, 0x74 }, - { 0x21ee9a, 0x0, 0x4 }, + { 0x21ee9a, 0x0, 0x6 }, + { 0x21eea0, 0xee, 0xec }, + {-1,0,0} +}; + +// fix games patched with an earlier broken version oops +PatchByte resetpatch_fix_81_141[] = { + { 0x21ee8d, 0xe8, 0xe8 }, + { 0x21ee8e, 0x2a, 0x2a }, + { 0x21ee8f, 0xbb, 0xbb }, + { 0x21ee90, 0xf4, 0xf4 }, + { 0x21ee91, 0xff, 0xff }, + { 0x21ee92, 0xa1, 0xa1 }, + { 0x21ee93, 0xa0, 0xa0 }, + { 0x21ee94, 0x69, 0x69 }, + { 0x21ee9a, 0x4, 0x6 }, + { 0x21eea0, 0xee, 0xec }, {-1,0,0} }; diff --git a/version.rc b/version.rc index f39882a..68fa55a 100644 --- a/version.rc +++ b/version.rc @@ -1,6 +1,6 @@ 1 VERSIONINFO -FILEVERSION 0,5,6,0 -PRODUCTVERSION 0,5,6,0 +FILEVERSION 0,5,7,0 +PRODUCTVERSION 0,5,7,0 BEGIN BLOCK "StringFileInfo" BEGIN @@ -8,12 +8,12 @@ BEGIN BEGIN VALUE "CompanyName", "Floogle @ https://github.com/skyfloogle" VALUE "FileDescription", "gm8x_fix" - VALUE "FileVersion", "0.5.6" + VALUE "FileVersion", "0.5.7" VALUE "InternalName", "gm8x_fix" VALUE "LegalCopyright", "" VALUE "OriginalFilename", "gm8x_fix.exe" - VALUE "ProductName", "gm8x_fix v0.5.6" - VALUE "ProductVersion", "0.5.6" + VALUE "ProductName", "gm8x_fix v0.5.7" + VALUE "ProductVersion", "0.5.7" END END