Jump to content

Increased memory allocation patch from Skyrim, possible to implement f


SuchFalloutVeryRads

Recommended Posts

A guy over at enbdev managed to patch Skyrim and trick the exectuable into allocating more than 256MB blocks of memory at a time, since the fallout engine is fairly similar to Skyrim would it be possible to get this working for fallout?

 

http://enbdev.com/ctdfix.html

http://enbdev.com/ctdfix2.html

 

When tesv.exe is started it allocates two 256MB blocks of memory. When the first block gets full, the engine will allocate more blocks. This can cause the known troubles. Thankfully, by telling the engine to request a bigger block from the start it magically makes use of it without any further ado.

 

To make the engine allocate a larger block of memory it needs to be patched. This needs to happen very early in the process. This can not be done by a SKSE plugin because they are executed much later. However, SKSE loader already patches tesv.exe before the game starts and since SKSE sources are provided adding the patch is straight forward.


//1st block, request 512MB (0x0300) instead of 256MB (0x0200)
//if too small cause of ILS or CTD when to much cell+buffer data does not fit anymore and engine allocates more memory.
//tesv.exe:00687E87 add edi, 0x200 <-----
SafeWrite32(0x00687e87+2, 0x00000300);

//2nd block, request default 256MB (0x10000000), typically seems big enough
//changing this value is not recommended because side effects are not yet properly tested
//when 1st buffer is set over 512MB and there are a lot of mods this needs to be raised as well or tesv.exe crashes at start
//however there are no commits over 256MB, hard coded max limits later in the code
//tesv.exe:00A4E6BE   push   0x10000000   <-----
//SafeWrite32(0x00a4e6be+1, 0x10000000);

//change movaps to movups (slower on old CPUs) in case memory is not 16byte aligned,
//there are most likely more, but when 1st buffer large enough this is not problem anymore
//tesv.exe:004BD82F xorps xmm0, xmm0
//tesv.exe:004BD832 movaps xmmword ptr [esi+0x9160], xmm0
SafeWrite8(0x004bd832+1, 0x11);

I've tried messing with some addresses in fallout3.exe but not really getting anyway apart from a crash and or no sign of memory increase compared to vanila fallout3.exe, although admitly I'm a complete tard when it comes to memory hacks/injecting.

 

Any wizards want to lend a hand?

Link to comment
Share on other sites

  • 5 weeks later...

YEAHHH!!!! I THINK THE SAME!!! , the engine is basically the same , maybe this work...?do you try it ?. I dont have the fallout , I unistall it because the contant CTD , unplayable, I test the memory patch in skyrim whit a lot of mods , and NO CRASH EVER!!! SAVE THE GAME ...whit this everything is posible ,
please people of nexus forum ,make this happen and test it whit you powers of ini config jajaja , this is great idea , hope that people see this , seeya

Link to comment
Share on other sites

  • 3 weeks later...

When tesv.exe is started it allocates two 256MB blocks of memory. When the first block gets full, the engine will allocate more blocks. This can cause the known troubles. Thankfully, by telling the engine to request a bigger block from the start it magically makes use of it without any further ado.

 

doesnt this apply to the vram only? not the ram . when I played skyrim I didnt need a program to let it use 3 gbs of my ram...

 

EDIT: didnt knew this was old post, whys it top?

Edited by DutchGreenWizard
Link to comment
Share on other sites

This is not the same as the Large Adress Awareness flag. I'm not savvy enough when it comes to the details to explain the difference very well but basically the Skyrim memory patch makes it so the game asks for more cache memory to be allocated for it when you start the game. Basically this tells the game to use more ram or virtual memory.

Edited by Algaroth
Link to comment
Share on other sites

Strictly speaking the engines aren't as similar as you might think, but something like this should be doable. If not, then it'll just have to be made from scratch.

 

Now, who will take the time to do it, that's the real question :P.

Link to comment
Share on other sites

  • 3 weeks later...

I'd certainly like to see a similar hack for Fallout 3/NV. Sheson's fix makes Skyrim over 9000% more stable than it was previously. There may be differences between the engines, but I daresay the concept would roughly be the same. Random crashes while exploring the main worldspace plague both Fallout 3 and Skyrim without Sheson's fix. Co-incidence? Perhaps.

Link to comment
Share on other sites

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...