llde / xOBSE

Oblivion Script extender source
248 stars 35 forks source link

Another version of Oblivion.exe #236

Closed vlad196 closed 1 month ago

vlad196 commented 1 month ago

Please, add oblivion.exe v.1.2.0416 1C Gold edition (russian localization).

This is a modified version of the file, adding a no-CD. This version is the result of byte substitution and does not have anyone's signatures (tags, names, "...was here", etc):

printf '\xE9\x67\x01\x00\x00' | dd conv=notrunc of=Oblivion.exe bs=1 seek=$((0xD627))

Modified file (need to add): https://drive.google.com/drive/folders/1MiVgEWU2Sf8XHB94tibRQ8ck5pcHiSEk?usp=sharing

Original file (for comparison): https://drive.google.com/drive/folders/19C7BqV5zIIcRV6tRXUXTeE4bzo6D314_?usp=sharing

llde commented 1 month ago

Is the file made by you? Is the original file included in the supported checksums? 0xD627 seems a strange address to hook for this.

vlad196 commented 1 month ago

Yes, I did. I took another modified file and looked at what was changed in it. file: https://drive.google.com/drive/folders/1w9i0_kcN00zQ-p-eWYXpMEg3PnLsBBTb?usp=sharing

The original and file above launch with obse_loader, but i'm not sure how check checksums

I tried crc32, but none of the files matched the amount in obse/loader_common/EXEChecksum.cpp. Even original file.

Can you tell me how to check it? Linux or Windows, whatever.

llde commented 1 month ago

You can check if the original file can be started by the launcher. Waht difference there is between the last file you linked and this https://drive.google.com/drive/folders/19C7BqV5zIIcRV6tRXUXTeE4bzo6D314_?usp=sharing (the second file linked in the first post)?

vlad196 commented 1 month ago

You can check if the original file can be started by the launcher.

yes, the original file started by the obse_launcher.

Waht difference there is between the last file you linked and this https://drive.google.com/drive/folders/19C7BqV5zIIcRV6tRXUXTeE4bzo6D314_?usp=sharing (the second file linked in the first post)?

You may have meant the first link and the link in the second post. The difference is that the first link has only a no-cd, the link in the second post has an additional signature:

SAGE486DX  was here ;)

Снимок экрана_20240813_092711

I suppose many exe's have the same way for no-CD, but have their own signatures. If you know how to do it yourself, it's inconvenient to additionally record someone's signature, especially when you're making a script.

In general, I came to modify the file myself because the file SAGE486D, which is suitable for 1C Gold edition I found only on two sites, and I'm afraid that someday they will be lost. And since I came to the independent modification, then there is no sense in the mandatory repetition of someone else's signature to run the game

the second file linked in the first post

The second link in first post is the original file from disk. Without changes.

llde commented 1 month ago

But at this point, why editing the exe instead of patching the check routine in an obse plugin?

vlad196 commented 1 month ago

I patch the exe to be independent of other no-CDs. For example, with my regional version, it is already difficult to find.

And in order to be independent of other no-CDs and use xOBSE, I suggested in the issue to the crc xOBSE database a variant where only the CD check is removed, without any unnecessary bytes.

I apologize, maybe I confused you somewhere, or I don't understand something. Please write what seems wrong or unclear to you, so that I can correct my request.

llde commented 1 month ago

I'm just sayng that instead of editing the executable directly you can use an OBSE plugin to make the same changes in the exe but dynamically.

vlad196 commented 1 month ago

I didn't know it could be done any other way. If it is possible in obse plugins and you recommend it, I will then do it like the plugin and close the issue :)

llde commented 1 month ago

yeah, I did it myself for my retail version of the game (but I have different offsets, would need to check which ones are better )

vlad196 commented 1 month ago

Sound's great! Can I see how you made the plugin? The example in there is very extensive, and I don't know C++ well

llde commented 1 month ago

just need to use the OBSE_Load function to install the Jmp hook (WriteRelJump function). All the other stuffs from the example can be safely removed (except the OBSE_Query function)

technically you don't even need C++, a C project would be enough.