Skip to content

Commit

Permalink
add upx variant
Browse files Browse the repository at this point in the history
  • Loading branch information
skyfloogle committed Feb 3, 2022
1 parent 4ad94c7 commit be7fa44
Show file tree
Hide file tree
Showing 3 changed files with 16 additions and 9 deletions.
5 changes: 3 additions & 2 deletions gm8x_fix.c
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,8 @@
#define wait() if (!silent) while (getchar() != '\n');

Patch patches[] = {
{.bytes = upx_80, .name = "UPX unpacked header adjustment", .type = UPX},
{.bytes = upx_80_v0, .name = "UPX unpacked header adjustment (variant 0)", .type = UPX},
{.bytes = upx_80_v1, .name = "UPX unpacked header adjustment (variant 1)", .type = UPX},
{.bytes = mempatch, .name = "Memory patch", .type = MEM},

{.bytes = joypatch_70, .name = "GM7.0 joystick patch", .type = JOY},
Expand Down Expand Up @@ -317,7 +318,7 @@ int main(int argc, const char *argv[]) {
valid_args = false;
}
// funny title
puts("Welcome to gm8x_fix v0.5.8!");
puts("Welcome to gm8x_fix v0.5.9!");
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
Expand Down
10 changes: 8 additions & 2 deletions patches.c
Original file line number Diff line number Diff line change
Expand Up @@ -7,14 +7,20 @@ PatchByte mempatch[] = {
};


// UPX fix
// UPX fix (and variants)
// Fixes the file offset GM8 tries to load game data at in de-UPX'd games
PatchByte upx_80[] = {
PatchByte upx_80_v0[] = {
{0x144ac1, 0xa4, 0xf0},
{0x144ac2, 0x0a, 0x1c},
{-1,0,0}
};

PatchByte upx_80_v1[] = {
{0x144ac1, 0x9c, 0xf0},
{0x144ac2, 0x0a, 0x1c},
{-1,0,0}
};

// JOYSTICK PATCHES
// How to create:
// 1. Find all calls to joystick functions (joyGetPos, joyGetPosEx, joyGetDevCapsW)
Expand Down
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,8,0
PRODUCTVERSION 0,5,8,0
FILEVERSION 0,5,9,0
PRODUCTVERSION 0,5,9,0
BEGIN
BLOCK "StringFileInfo"
BEGIN
BLOCK "040904E4"
BEGIN
VALUE "CompanyName", "Floogle @ https://github.com/skyfloogle"
VALUE "FileDescription", "gm8x_fix"
VALUE "FileVersion", "0.5.8"
VALUE "FileVersion", "0.5.9"
VALUE "InternalName", "gm8x_fix"
VALUE "LegalCopyright", ""
VALUE "OriginalFilename", "gm8x_fix.exe"
VALUE "ProductName", "gm8x_fix v0.5.8"
VALUE "ProductVersion", "0.5.8"
VALUE "ProductName", "gm8x_fix v0.5.9"
VALUE "ProductVersion", "0.5.9"
END
END

Expand Down

0 comments on commit be7fa44

Please sign in to comment.