-
Notifications
You must be signed in to change notification settings - Fork 33
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
Make the module base address unchanged #201
Comments
In the 2007 version it worked without any issues. We can freely modify EXE files. But not in 2014 version |
Ok so I have some questions, as my friend and I are considering either nerfing, or editing the .reloc table in order to ensure that the edits we create (and share with the public), are no longer reliant on users having the Companion DLL installed. Presently many of our edits do require this, as our present method is to piggyback some of the memory regions used by the Companion DLL. Now before we go ahead and change a whole bunch of edits to make them more accessible to the public, we wanted to ask @emoose about whether there might be some conflicts or adverse consequences of distributing code that would point to an edited or nerfed .reloc table. Like, would doing this interfere in any way with the functions of the RE4Tweaks DLL? The goal here is to maintain compatibility of our edits with those of the RE4Tweaks DLL. One more thing that would assist in our tests; could you @emoose send us a copy of the vanilla 1.0.6 bio4.exe with the .reloc table 'stripped from file' (as shown in your photo to Qingsheng above)? You can send me a link DM on Discord or just post it here. That would be super helpful. Thanks! |
Did you show your friend the post I sent before? That flag & the .reloc edit should work pretty much the same, both should make EXE use the default base addr (0x400000 for RE4) instead of moving it around. Anything dynamically allocated (like pointers to certain things in memory) would still be placed at random addresses though (.reloc wouldn't affect that neither afaik) - but things that are actually inside the EXE file on your HDD should get put at a static offset. re4_tweaks should work fine with either method, don't know about other mods though - IIRC companion will complain about game not being 4GB patched if you use this flag though even if the 4GB patch is present, since this flag & 4GB patch both change the same byte. There is another flag you can set which might work better with companion (OptionalHeader -> DllCharacteristics -> uncheck "DLL can move"), haven't tested that with companion yet but seems to make addr static like the other flag, but if companion still gives a warning with both of them maybe editing .reloc would be better. Here's a zip with both flags, bio4_flag1 sets the first flag I mentioned (FileHeader -> Characteristics -> "Relocation info stripped"), the bio4_flag2 sets the other one, both have 4GB patch applied too: |
Thanks for all this info, I am sure it will be helpful. I will let you know how things go after we decide which way to go and how it all works out. I'm relieved that it will not interfere with your work! Peace! |
Describe the feature you'd like to see added
When we restart the computer, or modify the bio4.EXE file. The module base address of the game will change. As shown in the figure. This limits our modifications to the game EXE file. Is there any way to fix it?
The text was updated successfully, but these errors were encountered: