Skip to content

Conversation

@Ghabry
Copy link
Member

@Ghabry Ghabry commented Dec 21, 2024

Maniac Patch is now detected when the new exe is used.


The difference between 32bit PE and 64 bit PE is actually not that huge when you only care about the resources.

The differences:

  • The machine type is 0x8664
  • In the optional header the magic at the beginning is 0x20b instead of 0x10b (0x20b is a "PE32+" header, 0x10b is a "PE32" header)
  • The data direction offset is different because the PE32+ image file header is larger

The offset calculation was the major change:

Before the resource offset was hardcoded to 0x88 (136) which is actually size_of_optional_header (24) + size_of_image_file_header (96/112 [PE+]) + 16.

All the resource format itself is the same. (lucky for us).


Tested it with:

Player.exe, both 32 Bit and 64 Bit: PASSED

Maniac exe: PASSED

Various RPG_RT (32 bit): PASSED

@Ghabry Ghabry added this to the 0.8.1 milestone Dec 21, 2024
Maniac Patch is now detected when the new exe is used.

The difference between 32bit PE and 64 bit PE is actually not that huge when you only care about the resources.

The differences:

- The machine type is 0x8664
- In the optional header the magic at the beginning is 0x20b instead of 0x10b (0x20b is a "PE32+" header, 0x10b is a "PE32" header)
- The data direction offset is different because the PE32+ image file header is larger

The offset calculation was the major change:

Before the resource offset was hardcoded to 0x88 (136) which is actually "size_of_optional_header (24) + size_of_image_file_header (96/112 [PE+]) + 16".
@carstene1ns carstene1ns merged commit 39b022f into EasyRPG:master Dec 22, 2024
14 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Development

Successfully merging this pull request may close these issues.

3 participants