www.tombraiderforums.com  

Go Back   www.tombraiderforums.com > Tomb Raider Series > Tomb Raider III

Reply
 
Thread Tools
Old 16-04-17, 14:44   #1
annl
Archaeologist
 
annl's Avatar
 
Join Date: Feb 2012
Location: In my bedroom (most likely).
Posts: 1,470
Exclamation Have issues with TR3 (Widescreen Patch and Peixoto), need help to fix them.

I have TR3 and I have to play it with a Widescreen patch but I have two issues.

If I run it using the Widescreen Patch, it looks too zoomed in and while I can play it, it doesn't look right. I play in 1360x768 on a Widescreen TV if that helps.

If I play it with Peixoto's Patch, it looks right but the framerate is dreadful and while I seem to have fixed that, the FMV sounds loop over and over and the sound ends up behind on the video.

Also, occasionally with Peixoto's Patch it crashes with a AutoHotkey.dll error.

Can anyone help? I bought TR3 The Lost Artifact from eBay and I want to fix this issue before it arrives.
__________________
Mods: TR1 Sound Overhaul, TR2 Remixed, TR3 Transformed and TR4 HD.

Last edited by annl; 16-04-17 at 22:20.
annl is online now   Reply With Quote
Old 16-04-17, 14:52   #2
ThatSassyKid
Relic Hunter
 
ThatSassyKid's Avatar
 
Join Date: Jan 2014
Posts: 8,469
Default

Right click on tomb3.exe, then go to the Compatibility tab. Then, check the box that says Disable display scaling on high DPI settings.
That's how I fixed the same problem.
__________________
Worry is a misuse of your imagination.
ThatSassyKid is offline   Reply With Quote
Old 16-04-17, 14:53   #3
annl
Archaeologist
 
annl's Avatar
 
Join Date: Feb 2012
Location: In my bedroom (most likely).
Posts: 1,470
Default

I tried this, no change.
__________________
Mods: TR1 Sound Overhaul, TR2 Remixed, TR3 Transformed and TR4 HD.
annl is online now   Reply With Quote
Old 16-04-17, 19:25   #4
Arsunt
Historian
 
Arsunt's Avatar
 
Join Date: Jan 2010
Location: Russia
Posts: 368
Default

Quote:
Originally Posted by annl View Post
I have TR3 and I have to play it with a Widescreen patch but I have two issues.
This widescreen is done very lazily. The person who created it just decided to adjust the constants, instead of really fixing the problem of calculating the aspect ratio and the field of the view.
Quote:
Originally Posted by annl View Post
Also, occasionally with Peixoto's Patch it crashes with a AutoHotkey.dll error.
I consider Peixoto's patch a good temporary workaround. But it's based on the assumption that everyone has the same version of the EXE, and the patch does some things in a very rude way. I will do everything possible to ensure that this patch remains in the past, and in its place came a normal solution in the form of clean fixes in the game code (And much has been done).
Quote:
Originally Posted by annl View Post
Can anyone help?
I can apply my aspect ratio and FOV patch to your exe file manually if you share it to me (I do not know what version you have). Or, if it's GOG or Steam, I'll apply a patch to this one and upload it here.
__________________
To seek. To learn. To do. (C) Quest for Glory
Arsunt is offline   Reply With Quote
Old 16-04-17, 19:29   #5
annl
Archaeologist
 
annl's Avatar
 
Join Date: Feb 2012
Location: In my bedroom (most likely).
Posts: 1,470
Default

Quote:
Originally Posted by Arsunt View Post
This widescreen is done very lazily. The person who created it just decided to adjust the constants, instead of really fixing the problem of calculating the aspect ratio and the field of the view.

I consider Peixoto's patch a good temporary workaround. But it's based on the assumption that everyone has the same version of the EXE, and the patch does some things in a very rude way. I will do everything possible to ensure that this patch remains in the past, and in its place came a normal solution in the form of clean fixes in the game code (And much has been done).

I can apply my aspect ratio and FOV patch to your exe file manually if you share it to me (I do not know what version you have). Or, if it's GOG or Steam, I'll apply a patch to this one and upload it here.
I use the Steam Version.
__________________
Mods: TR1 Sound Overhaul, TR2 Remixed, TR3 Transformed and TR4 HD.
annl is online now   Reply With Quote
Old 16-04-17, 19:33   #6
annl
Archaeologist
 
annl's Avatar
 
Join Date: Feb 2012
Location: In my bedroom (most likely).
Posts: 1,470
Default

The zoom only affects my resolution, which is 1360 x 768. Is that the problem? I can't use any other resolution without it looking awkward.
__________________
Mods: TR1 Sound Overhaul, TR2 Remixed, TR3 Transformed and TR4 HD.
annl is online now   Reply With Quote
Old 16-04-17, 20:03   #7
charmedangelin
Tomb Raider
 
charmedangelin's Avatar
 
Join Date: Jan 2016
Location: USA
Posts: 19,937
Default

What are your fov and camera distance values.

I use the default camera distance, but I set the fov to zero. Also I set the widescreen patch to 16:9 instead of typing in a custom resolution. Have you tried that?
charmedangelin is online now   Reply With Quote
Old 16-04-17, 20:14   #8
annl
Archaeologist
 
annl's Avatar
 
Join Date: Feb 2012
Location: In my bedroom (most likely).
Posts: 1,470
Default

Quote:
Originally Posted by charmedangelin View Post
What are your fov and camera distance values.

I use the default camera distance, but I set the fov to zero. Also I set the widescreen patch to 16:9 instead of typing in a custom resolution. Have you tried that?
Done both, no change.
__________________
Mods: TR1 Sound Overhaul, TR2 Remixed, TR3 Transformed and TR4 HD.
annl is online now   Reply With Quote
Old 16-04-17, 21:43   #9
Arsunt
Historian
 
Arsunt's Avatar
 
Join Date: Jan 2010
Location: Russia
Posts: 368
Default

I've uploaded the patched EXE for TR3 and The Lost Artifact. It includes my (exclusive) FOV patch. It was was not published anywhere until now.

That's how it works. There is the original code (let it be C pseudocode):
Code:
#define SCREEN_WIDTH	dword_5A6AF4
#define SCREEN_HEIGHT	dword_4D790C
#define ASPECT_RATIO	flt_4C3244	// 1.3333334

void sub_402030(__int16 a1) {
    int v1, v2, v3;

    v1 = SCREEN_WIDTH / 2 * sub_4B4C58(a1 / 2);
    v2 = sub_4B4C5E(a1 / 2);
    dword_4F6D50 = v1 / v2;

    v3 = sub_4B5E10(v2, v1 % v2, flt_4C5084);
    dword_5A6A28 = v3 / dword_4F6D50;

    flt_5A6AB8 = (double)dword_4F6D50; // heigth ratio
    flt_4F6D48 = flt_4C5084 / flt_5A6AB8; // depth ratio
    flt_53170C = flt_5A6AB8 / flt_56C0A0;

    flt_4D38D8 = ASPECT_RATIO / ((double)SCREEN_WIDTH / (double)SCREEN_HEIGHT);

    sub_48D6A0(v3 % dword_4F6D50);
}
And I've changed it to this code:
Code:
#define SCREEN_WIDTH	dword_5A6AF4
#define SCREEN_HEIGHT	dword_4D790C
#define ASPECT_RATIO	flt_4C3244	// 1.3333334

const float flt_4D38D8 = 1.0;    // it is always 1.0 now

int sub_4020B8() {
    return (int)((float)SCREEN_HEIGHT * ASPECT_RATIO)
}

void sub_402030(__int16 a1) {
    int v1, v2, v3;

    // SCREEN_WIDTH value replaced by new function sub_4020B8
    v1 = sub_4020B8 / 2 * sub_4B4C58(a1 / 2);
    v2 = sub_4B4C5E(a1 / 2);
    dword_4F6D50 = v1 / v2;

    v3 = sub_4B5E10(v2, v1 % v2, flt_4C5084);
    dword_5A6A28 = v3 / dword_4F6D50;

    flt_5A6AB8 = (double)dword_4F6D50; // heigth ratio
    flt_4F6D48 = flt_4C5084 / flt_5A6AB8; // depth ratio
    flt_53170C = flt_5A6AB8 / flt_56C0A0;

    sub_48D6A0(v3 % dword_4F6D50);
}
There are v1, v2, v3 variables to calculate FOV. I changed the formula so that they depended on the original aspect ratio (4/3) and the current screen height, but NOT screen width, because this is not correct for wide screens.

The flt_4D38D8 variable is pixel aspect ratio. It must always be 1.0 if we want correct aspect ratio.

P.S. Do not combine this patch with other Widescreen patches and Peixoto's patch. They will break the formula.

UPD. I've updated the patch. Old links deleted.
__________________
To seek. To learn. To do. (C) Quest for Glory

Last edited by Arsunt; 24-09-21 at 03:44.
Arsunt is offline   Reply With Quote
Old 16-04-17, 21:45   #10
annl
Archaeologist
 
annl's Avatar
 
Join Date: Feb 2012
Location: In my bedroom (most likely).
Posts: 1,470
Default

Quote:
Originally Posted by Arsunt View Post
I've uploaded TR3 exe for GOG and for Steam with my (exclusive) FOV patch. It was was not published anywhere until now.

That's how it works. There is the original code (let it be C pseudocode):
Code:
#define SCREEN_WIDTH    dword_5A6AF4
#define SCREEN_HEIGHT    dword_4D790C
#define ASPECT_RATIO    flt_4C3244    // 1.3333334

void sub_402030(__int16 a1) {
    int v1, v2, v3;

    v1 = SCREEN_WIDTH / 2 * sub_4B4C58(a1 / 2);
    v2 = sub_4B4C5E(a1 / 2);
    dword_4F6D50 = v1 / v2;

    v3 = sub_4B5E10(v2, v1 % v2, flt_4C5084);
    dword_5A6A28 = v3 / dword_4F6D50;

    flt_5A6AB8 = (double)dword_4F6D50; // heigth ratio
    flt_4F6D48 = flt_4C5084 / flt_5A6AB8; // depth ratio
    flt_53170C = flt_5A6AB8 / flt_56C0A0;

    flt_4D38D8 = 1.3333334 / ((double)SCREEN_WIDTH / (double)SCREEN_HEIGHT);

    sub_48D6A0(v3 % dword_4F6D50);
}
And I've changed it to this code:
Code:
#define SCREEN_WIDTH    dword_5A6AF4
#define SCREEN_HEIGHT    dword_4D790C
#define ASPECT_RATIO    flt_4C3244    // 1.3333334

const float flt_4D38D8 = 1.0;    // it is always 1.0 now

int sub_4020B8() {
    return (int)((float)SCREEN_HEIGHT * ASPECT_RATIO)
}

void sub_402030(__int16 a1) {
    int v1, v2, v3;

    // SCREEN_WIDTH value replaced by new function sub_4020B8
    v1 = sub_4020B8 / 2 * sub_4B4C58(a1 / 2);
    v2 = sub_4B4C5E(a1 / 2);
    dword_4F6D50 = v1 / v2;

    v3 = sub_4B5E10(v2, v1 % v2, flt_4C5084);
    dword_5A6A28 = v3 / dword_4F6D50;

    flt_5A6AB8 = (double)dword_4F6D50; // heigth ratio
    flt_4F6D48 = flt_4C5084 / flt_5A6AB8; // depth ratio
    flt_53170C = flt_5A6AB8 / flt_56C0A0;

    sub_48D6A0(v3 % dword_4F6D50);
}
There are v1, v2, v3 variables to calculate FOV. I changed the formula so that they depended on the original aspect ratio (4/3) and the current screen height, but NOT screen width, because this is not correct for wide screens.

The flt_4D38D8 variable is pixel aspect ratio. It must always be 1.0 if we want correct aspect ratio.

P.S. Do not combine this patch with other Widescreen patches and Peixoto's patch. They will break the formula.
Fantastic work Arsunt! Works fantastic! Can you do one for TR3 Gold too? Also message AlexFly, get this uploaded on his website! It's your choice, but many people have the same problem I had.

EDIT: The FMVs are not working well now, the sounds loop and then the FMV cuts off and auto skips halfway, what is wrong?
__________________
Mods: TR1 Sound Overhaul, TR2 Remixed, TR3 Transformed and TR4 HD.

Last edited by annl; 16-04-17 at 22:00.
annl is online now   Reply With Quote
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off



All times are GMT. The time now is 14:20.


Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2022, vBulletin Solutions Inc.