Page 1 of 1

4 Gigabyte LAA Patch

Posted: Fri Aug 04, 2017 11:57 am
by TheIdiot
I don't remember if someone has brought this up in the past, but the 4GB Large Address Awareness patch works on Tres CE! What it does is change the amount of RAM availabe for Trespasser from 2GB to 4GB using a flag in the EXE itself. This generally can result in better performance and more stability. I've been using it ever since CE came out, and, if I remember correctly, also had it applied to ATX, where it also helped quite a bit. I recommend everyone use this file, provided you have 4GB of memory on your system. If you don't, you might experience some major stability errors, or crashing.

To install:
Download the file from the bottom of this page:

http://www.ntcore.com/4gb_patch.php

When you run the EXE file, it will bring up File Explorer. Navigate your way to your Trespasser installation folder, and select your Trespasser .exe file (usually tpassp6.exe). Double click on the EXE and wait a second. The patch program should say that the file was patched successfully, and will bring up a window which asks if you want to exit or patch another file. You can use this patch on any program as far as I know, to varying effectiveness.

And that's it! It definitely helped with Trespasser on my system with 8GB of ram, so I recommend at least trying it out (making a backup of your EXE, just in case) and posting your results here.

Re: 4 Gigabyte LAA Patch

Posted: Sat Aug 05, 2017 8:11 am
by PsychologicalDevice
Thank you, I wasn't aware this worked with Trespasser CE. It seems to improve a lot of things actually, some subtle, some not. It seems that even the AI behaves much more functionally, though it's always hard to tell with that. Nearly two decades since Trespasser was released and it's still all chugging along.

Re: 4 Gigabyte LAA Patch

Posted: Sat Aug 05, 2017 10:04 am
by machf
What happens if you run a patched file under x86 instead of x64?

Re: 4 Gigabyte LAA Patch

Posted: Sat Aug 05, 2017 11:05 am
by TheIdiot
machf wrote:What happens if you run a patched file under x86 instead of x64?
That's a good question. I think it should detect that there isn't enough RAM to use the full 4GB and not cause any errors, as it only makes the program use the extra memory if it's available. To be on the safe side, I'd say don't patch it unless you're on a 64-bit system with a minimum of 4GB of RAM.

Re: 4 Gigabyte LAA Patch

Posted: Sat Aug 05, 2017 11:42 am
by Draconisaurus
Ah... My toppy only has 2 GB of RAM. Solves my dilemma quite easily..

Re: 4 Gigabyte LAA Patch

Posted: Sat Aug 05, 2017 12:23 pm
by tatu
TheIdiot wrote:
machf wrote:What happens if you run a patched file under x86 instead of x64?
That's a good question. I think it should detect that there isn't enough RAM to use the full 4GB and not cause any errors, as it only makes the program use the extra memory if it's available. To be on the safe side, I'd say don't patch it unless you're on a 64-bit system with a minimum of 4GB of RAM.
Well, the site explain this pretty well:

"This very little tool patches x86 executables in order to let them have 4GB (instead of only 2) of virtual memory on x64 platforms. This tool comes very handy for applications which need a great amount of virtual memory like games, 3D renderization, multimedia etc. To gain these 2GB, you just have to use this tool to patch the executable (*.exe file) of the software you want to have these additional GBs of virtual memory. It can be used by clicking on it and choosing the file or through command line (e.g.: "4gb_patch file.exe"). It automatically creates a backup copy of the original executable.

Why things are this way on x64 is easy to explain. On x86 applications have 2GB of virtual memory out of 4GB (the other 2GB are reserved for the system). On x64 these two other GB can now be accessed by 32bit applications. In order to achieve this, a flag has to be set in the file's internal format. This is, of course, very easy for insiders who do it every day with the CFF Explorer. This tool was written because not everybody is an insider, and most probably a lot of people don't even know that this can be achieved. Even I wouldn't have written this tool if someone didn't explicitly ask me to."

So yeah, it has no really use on 32-bit system AFAIK, as those can't access more than 2gb of ram anyway.

Re: 4 Gigabyte LAA Patch

Posted: Tue Aug 08, 2017 11:18 am
by Slugger
Could this patch just be rolled into TresCE (without having to separately patch it)?

Re: 4 Gigabyte LAA Patch

Posted: Tue Aug 08, 2017 11:50 am
by Draconisaurus
Better leave it as an option in case some don't with to have it..

Re: 4 Gigabyte LAA Patch

Posted: Tue Aug 08, 2017 3:39 pm
by machf
Slugger wrote:Could this patch just be rolled into TresCE (without having to separately patch it)?
From what I understand, it's just a flag set in some byte of the header... I don't really think it's necessary.

Re: 4 Gigabyte LAA Patch

Posted: Thu Aug 10, 2017 8:36 pm
by TheIdiot
machf wrote:
Slugger wrote:Could this patch just be rolled into TresCE (without having to separately patch it)?
From what I understand, it's just a flag set in some byte of the header... I don't really think it's necessary.
That's correct. It's a very, very simple patch that doesn't do anything else of significance other than tell the program it can use more memory. There isn't really a reason not to use this patch, even if you're running on a 2GB or less system, since the flag simply tells the program that it MAY use more memory, if available. You won't have the program trying to use more memory than available as it will still cap out before it can do so.

tatu's quote and post up above sums it up perfectly.

Re: 4 Gigabyte LAA Patch

Posted: Wed Aug 23, 2017 2:46 pm
by machf
So, apparently this would allow programs under x32 to access 3GB or RAM with some additional changes to the boot.ini file, too...

Re: 4 Gigabyte LAA Patch

Posted: Thu Aug 24, 2017 4:26 pm
by TheIdiot
machf wrote:So, apparently this would allow programs under x32 to access 3GB or RAM with some additional changes to the boot.ini file, too...
In theory, yes, I would think. But I can't say for sure. I didn't think it was even possible to get 4GB+ of RAM working on a 32-bit system.

Re: 4 Gigabyte LAA Patch

Posted: Thu Aug 24, 2017 7:25 pm
by machf
No, you can't address more than 4GB with a 32-bit OS, and part of those is used by other things, so the limit is about 3GB.