Skip to content

Commit

Permalink
the reset patch was broken :(
Browse files Browse the repository at this point in the history
  • Loading branch information
skyfloogle committed Jan 7, 2022
1 parent b8a2c0f commit 79be892
Show file tree
Hide file tree
Showing 4 changed files with 31 additions and 10 deletions.
12 changes: 8 additions & 4 deletions gm8x_fix.c
Original file line number Diff line number Diff line change
Expand Up @@ -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},
};

Expand Down Expand Up @@ -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;
}
Expand Down Expand Up @@ -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);
Expand Down Expand Up @@ -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.");
Expand Down
1 change: 1 addition & 0 deletions patch_types.h
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ typedef enum {
SCHED,
INPUTLAG,
RESET,
BUGFIX, // for when i messed up
TYPE_COUNT,
} PatchType;

Expand Down
18 changes: 17 additions & 1 deletion patches.c
Original file line number Diff line number Diff line change
Expand Up @@ -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}
};
10 changes: 5 additions & 5 deletions version.rc
Original file line number Diff line number Diff line change
@@ -1,19 +1,19 @@
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
BLOCK "040904E4"
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

Expand Down

0 comments on commit 79be892

Please sign in to comment.