www.tombraiderforums.com

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

Reply
 
Thread Tools
Old 12-03-18, 14:10   #191
annl
Archaeologist
 
annl's Avatar
 
Join Date: Feb 2012
Location: In my bedroom (most likely).
Posts: 1,281
Default

Oh, OK.

Here's a screen just to verify, I had to zoom in. You can see a subtle red line if you zoom in on the outside of the black.

__________________
Mods: TR1 Sound Overhaul, TR2 Remixed, TR3 Transformed and TR4 HD.
annl is offline   Reply With Quote
Old 14-03-18, 19:31   #192
RaiderJones
Hobbyist
 
Join Date: Jan 2018
Posts: 23
Default

Quote:
Originally Posted by Arsunt View Post
First I must port the game to DirectX 9.0c to make the things right and enable easy texture management (DirectX 5 legacy way is too complicated). I don't know about actual required time, but I'll start this as soon as possible (right after updated FMV and audio playback).
Doesn't Peixoto's patch make this redundant?
RaiderJones is offline   Reply With Quote
Old 14-03-18, 19:39   #193
Arsunt
Student
 
Arsunt's Avatar
 
Join Date: Jan 2010
Location: Russia
Posts: 126
Default

Quote:
Originally Posted by RaiderJones View Post
Doesn't Peixoto's patch make this redundant?
I don't do some another workaround patch, that requires another workaround patches. I do full-fledged solution that can be rebuild with source code, that can be ported to Linux/Mac or any other platform in the future. And solution that have customizable features from PSX version. So no, there is no place to any workaround patch.
__________________
To seek. To learn. To do. (C) Quest for Glory
Arsunt is online now   Reply With Quote
Old 15-03-18, 21:08   #194
Red46
Hobbyist
 
Join Date: Aug 2008
Posts: 23
Default

Quote:
Originally Posted by RaiderJones View Post
Doesn't Peixoto's patch make this redundant?
That patch is basically a bunch of memory hacks injection that are bound to break at a moment's notice for whatever reason. Basically it works but, it's not the most elegant approach.

Arsunt is reverse engineering the game and basically recoding it to support features you could never achieve with a patch like that one. The reason workaround patches like that exist it's because the provide a "quick and dirty" fix, it works good enough and solves the issue at hand.

If you want a future-proof more lasting solution however, the only way to go is what Arsunt is doing. It's incredibly more complex and time consuming to do, and the required skillset to do so, it's not common at all.

With a solution like this however, and, with its source code available, it means that in 30 years someone will be able to compile an exe that allows the game to play flawless on whatever version of the OS that will be out there
Red46 is offline   Reply With Quote
Old 15-03-18, 23:25   #195
Peixoto
Student
 
Join Date: Jan 2015
Posts: 248
Default

Quote:
Originally Posted by Red46 View Post
That patch is basically a bunch of memory hacks injection that are bound to break at a moment's notice for whatever reason. Basically it works but, it's not the most elegant approach.

Arsunt is reverse engineering the game and basically recoding it to support features you could never achieve with a patch like that one. The reason workaround patches like that exist it's because the provide a "quick and dirty" fix, it works good enough and solves the issue at hand.

If you want a future-proof more lasting solution however, the only way to go is what Arsunt is doing. It's incredibly more complex and time consuming to do, and the required skillset to do so, it's not common at all.

With a solution like this however, and, with its source code available, it means that in 30 years someone will be able to compile an exe that allows the game to play flawless on whatever version of the OS that will be out there
The only thing in my patch that is a memory hack is widescreen and that won't break in a million years, in fact, it is the most robust feature of my patch

The rest are api hooks and if you don't trust this method, give up windows, because that is how Microsoft keeps compatibility with ALL their old apis
(https://blogs.technet.microsoft.com/...our-new-stuff/)

Now, because of COM and because of miscrosoft's own hooks, some things can indeed break in the future (for example, on windows 8, some methods of a primary IDirectDrawSurface or a primary IDirectSoundBuffer have different entry points and that was not the case up until win 7), but that is one of the reasons why i'm writing my own DirectDraw\Direct3D wrapper, so i have interfaces i'm sure won't change

Last edited by Peixoto; 16-03-18 at 00:28.
Peixoto is offline   Reply With Quote
Old 16-03-18, 08:33   #196
Dustie
Relic Hunter
 
Dustie's Avatar
 
Join Date: Apr 2005
Location: AoD 1.5 by freakraider (Poland)
Posts: 7,953
Default

I hope you both continue your work, none of the efforts of any of the programmers here will go without appreciation.
Dustie is offline   Reply With Quote
Old 16-03-18, 20:42   #197
Famicom
Historian
 
Famicom's Avatar
 
Join Date: Mar 2009
Location: City of Vilcabamba
Posts: 343
Default

Arsunt, I'm trying your solution and have come across not being able to disable dither, I mean, no matter if I disable it from setup window/register, it still is forced on for some reason. Cannot disable it pressing F11 ingame either.

Is there a solution to this?


Quote:
Originally Posted by Dustie View Post
I hope you both continue your work, none of the efforts of any of the programmers here will go without appreciation.
Exactly my thought.
__________________
I'm sorry. I only play for sport.

Last edited by Famicom; 16-03-18 at 20:44.
Famicom is offline   Reply With Quote
Old 16-03-18, 21:14   #198
Alain19
Hobbyist
 
Alain19's Avatar
 
Join Date: Jun 2017
Location: NJ, USA
Posts: 60
Default

Quote:
Originally Posted by Dustie View Post
I hope you both continue your work, none of the efforts of any of the programmers here will go without appreciation.
My feelings exactly
I was looking at the work done on the exe! Here is visually the difference with the original exe between December and January! It looks like a lot of work was done (even if all the changes are not code!)
https://drive.google.com/file/d/1V1O...ew?usp=sharing
https://drive.google.com/file/d/1fVJ...ew?usp=sharing




Alain19 is offline   Reply With Quote
Old 17-03-18, 05:08   #199
Arsunt
Student
 
Arsunt's Avatar
 
Join Date: Jan 2010
Location: Russia
Posts: 126
Default

Quote:
Originally Posted by Famicom View Post
Arsunt, I'm trying your solution and have come across not being able to disable dither, I mean, no matter if I disable it from setup window/register, it still is forced on for some reason. Cannot disable it pressing F11 ingame either.
Can Dither be disabled in your original version of the game? If yes, I want comparison screenshots (Lara's Home starting point, maybe). My videoadapter ignores this setting on 16/32 bit modes, so I see no difference (but D3DRS_DITHERENABLE renderState toggles correctly). As far as I know, this setting only affects 8-bit graphics mode and sometimes 16-bit modes.
Quote:
Originally Posted by Alain19 View Post
I was looking at the work done on the exe! Here is visually the difference with the original exe between December and January! It looks like a lot of work was done (even if all the changes are not code!)
If these screenshots show EXE difference then it's totally wrong way to analyze diff. The EXE header and each section should be compared separately. Moreover, the sections .text .rdata .data are subject to binary comparison. But the .idata and .rsrc sections need to be parsed to compare the contents, since in reality these two sections can be changed beyond recognition with no change to the workflow of the program.

In case of patched Tomb2.exe, I took the very original game EXE, changed 1 bit in the EXE header to disable .text section "read only" property (to allow self code injection), then I replaced DINPUT.dll/DirectInputCreateA reference in .idata to TR2Main.dll/DummyFunction. So when the game launches, and TR2Main.dll links to the exe, my DLL injects redirecting JMP codes to all reimplemented functions. After that the EXE code starts execution from its entrypoint and becomes redirected to DLL WinMain instead of EXE WinMain. After that the DLL becomes a master, and the EXE becomes a slave. No direct code or data changes were made to the EXE.

In January, I just added compatibility manifest to the .rsrc section (manifest is used by modern windows). In simple words, the .rsrc is resource package that stores any resources, like folder stores files. If I added a couple of images there, EXE would have changed much more, but that would not have affected its work.
__________________
To seek. To learn. To do. (C) Quest for Glory
Arsunt is online now   Reply With Quote
Old 17-03-18, 14:01   #200
Alain19
Hobbyist
 
Alain19's Avatar
 
Join Date: Jun 2017
Location: NJ, USA
Posts: 60
Thumbs up

Yes it was a very crude way to look at it, and I saw that the changes were not code( I even found and understood the XML manifest at the end)! Next time if I need that kind of information I will try to do it by sections.
Anyway I wanted to show how things were changing -- starting with a binary file with a hex editor you don't want to change what doesn't need to be and a lot changed without easy re-sync!
Thanks for the explanation: It help me find where to look next, and finally explains why there was a WinMain in the dll , I wondered about that.
I know that what you are doing now is very important, and may have added urgency, so I hope you continue to make TR-2 more playable and beautiful (does DX9c means easy post-proccessing?). But later I hope to see more explanations about the process of decompiling by slowly giving the computations to an associated dll.
Alain19 is offline   Reply With Quote
Reply

Bookmarks

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 19:45.


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