Beta Error

Discussion in 'Support!' started by HotRod11686, September 27, 2013.

  1. HotRod11686

    HotRod11686 New Member

    Messages:
    22
    Likes Received:
    0

    gsuberland - with that being said, is it possible you could hex edit the loader for the game to enable PAE support so that I may test it to see if it works?? This is great to know if it could be done as it would GREATLY Benefit all the people with 32bit 4gb OS's.
  2. gsuberland

    gsuberland Member

    Messages:
    38
    Likes Received:
    12
    I'll not share the modded binary, because there are license restrictions, but I'll explain exactly how to do it.
    • First, you'll need to get CFF Explorer.
    • Next, go to your Program Files directory, find Planetary Annihilation, then go into the bin_x86 directory.
    • Open the PA.exe file with CFF Explorer - you can just drag the executable file onto the CFF window and it'll open it.
    • Next, click the File Header entry in the tree list on the left.
    • Now look over to the Characteristics entry in the table, and left-click the blue "Click here" cell to the right of it.
    • In the window that pops up, check the "App can handle >2gb address space" entry, and click OK.
    • Finally, click Save, and say yes to overwriting (you might want to make a backup)
    • Close CFF Explorer.
    • The executable is now enabled for PAE.

    Keep in mind that PAE support for the process will allow it to be loaded into highmem, but you'll need to enable 4GT via the /3GB boot switch to make it do anything.
    HotRod11686 likes this.
  3. SXX

    SXX Post Master General

    Messages:
    6,896
    Likes Received:
    1,812
    Thanks for interesting read, you know Windows internals much better than me and it's always interesting to know something like that. ;)

    Only problems I see is this: everything you explain looks for me like really dirty hack which might (I'm not sure it's will, but it's totally possible as I see) cause extra problems with game. As long as I understand tons of those dirty hack it's one of main reason why Uber abandon Windows XP.

    So I'm really think that those people who get problems just need to switch to 64-bit OS if possible.
  4. HotRod11686

    HotRod11686 New Member

    Messages:
    22
    Likes Received:
    0
    I've already installed the PAE Patch which gives me a second option upon booting up windows 7 to boot up with the PAE support to recognize the full 4GB of ram, so I am assuming that is what you are referring to in regards to the 3GB boot switch?
  5. gsuberland

    gsuberland Member

    Messages:
    38
    Likes Received:
    12
    No. The PAE patch allows you to utilise PAE at a system wide level, letting the OS shift supporting processes into high memory addresses, at the page memory management level. Normally the kernel/usermode balance of memory per process is 2GB/2GB, but you can alter that to 1GB/3GB by using 4GB Tuning (4GT), also known as the /3GB switch, so processes can have access to 3GB of virtual memory at once instead of only 2GB.
  6. gsuberland

    gsuberland Member

    Messages:
    38
    Likes Received:
    12
    I've got Windows Internals 6th Edition to hand, which helps, but I've also been involved with Windows kernel driver development and various reverse engineering projects for years now.

    AWE would be the best option, because it's not a hack. As long as the OS has AWE and PAE enabled (by default it will on XP SP3 or later) then larger process virtual memory spaces will be possible.
  7. HotRod11686

    HotRod11686 New Member

    Messages:
    22
    Likes Received:
    0
    Ok so that means using the PAE boot option is not required?? Or would I have to do both of these to get it to work??

    Again - Truly appreciate the knowledge and expertise your bringing to the forum if all this works properly then I might be playing this game afterall :)
  8. SXX

    SXX Post Master General

    Messages:
    6,896
    Likes Received:
    1,812
    Will be interesting to see opinion of devs on it. :)
  9. gsuberland

    gsuberland Member

    Messages:
    38
    Likes Received:
    12
    Both! :)
    HotRod11686 likes this.
  10. HotRod11686

    HotRod11686 New Member

    Messages:
    22
    Likes Received:
    0
    Great thank you very much for the help. I am going to try this after I go eat something b/c I cant game on empty stomach :) .... Will post status after and keep you filled.
  11. HotRod11686

    HotRod11686 New Member

    Messages:
    22
    Likes Received:
    0
    Ok my first attempt after firing this up was great.. game worked I played a match but I believe its due to the fact that it was a small set up 2 smaller planets - total ram used this case was under 1gb.

    Success - Confirmed that it IS working over the previous 1.7gb and now checked when it crashed this time memory usage was up to 2.7GB - Unfortunately in this instance I could not have played the loading match but the 1gb increase shows this TRULY works.

    Now with that being said. I was reading on the net that after this PAE patch windows 7 can recognize anything over 4GB on the computer and use it as well. My other q is : Can the 3GB switch be pushed over to say 4GB? if using 8gb of ram? for example??
    Last edited: September 29, 2013
  12. gsuberland

    gsuberland Member

    Messages:
    38
    Likes Received:
    12
    No - there's a hard limit of 3GB due to the kernel memory usage limits. If you pushed it to 4GB the kernel would have zero bytes of memory to work with.
  13. HotRod11686

    HotRod11686 New Member

    Messages:
    22
    Likes Received:
    0
  14. gsuberland

    gsuberland Member

    Messages:
    38
    Likes Received:
    12
    Nope, your only option is to switch to 64-bit, which I would highly suggest anyway. If you've got 8GB of RAM in your machine then you're wasting 4GB of it.
    HotRod11686 likes this.
  15. HotRod11686

    HotRod11686 New Member

    Messages:
    22
    Likes Received:
    0
    That answers my Q : Thank you very much for all the assistance and knowledge. Thanks to it I am atleast able to play some 2 planet matches whereas before it would never even work.

    In-Game Pressing CTRL+P Brings up the performance status - I noticed under the GPU it is only showing that the game is using only 250+ mb of my GPU's 2GB of memory... is this even right? I would have imagined the game using all if not most of my GPU's ram to load up the game..
  16. gsuberland

    gsuberland Member

    Messages:
    38
    Likes Received:
    12
    GPU memory is used to hold the frame buffer, some texture buffers, and transient vertex / pixel shader data, so how much is used largely depends on four main things:
    • The resolution of the frame buffer.
    • The anti-aliasing settings.
    • The resolution and number of textures.
    • The complexity of the vertex and pixel shaders.
    There are additional GPU memory-bound operations (e.g. DX11 tesselation, normal mapping, etc.) but those don't really apply so much to PA.

    The whole "more VRAM" thing in graphics cards is largely marketing - games won't perform any better if you add more RAM, as long as you've got enough to handle the game. You're seeing that here - PA needs about 300MB at most right now, so a 2GB card is overkill for PA. However, if you're running the latest Battlefield game at 2560x1600 with 4XAA or even 8XAA, you're going to need a huge amount of VRAM, and 2GB will likely not be enough. This is one of the cases where SLI helps, because the screen can be split into chunks and rendered independently, allowing for the VRAM across all cards to be utilised. Essentially, a pair of 3GB cards will give you 6GB of VRAM in total, with each half of the screen having 3GB dedicated to it.

    If a game tries to use too much VRAM, it can do one of two things: the first is that it can just crash, the second is that it can run horrendously slowly and shift memory over to the "graphics hole" (previously known as the AGP hole) in system memory. At some point it will just die, though, because the system can no longer provide that much memory.

    Now, why do I think PA needs so little VRAM? I'd say it's because right now most of the textures are likely small (512x512 or less) and a lot of the terrain is essentially just a flat colour that's been bump-mapped and had a lighting shader applied. Those kinds of textures can be compressed down, via a native texture compression format such as DXT. There's also not really that much going on - a skybox for space, a couple of high-polycount planets with low-detail textures, and a bunch of low-polycount models for units. The anti-aliasing is likely clamped at 2X unless you're manually overriding it.

    On the flip-side, the system RAM is currently getting eaten up massively due to a large number of units, a lack of optimisation (bad idea to optimise much in beta), and huge memory leaks.

    I definitely recommend reading this article over at Tom's Hardware about video card RAM.
  17. SXX

    SXX Post Master General

    Messages:
    6,896
    Likes Received:
    1,812
    This is not true for PA. This game actually might use quite a lot of VRAM because it's use procedurally generated virtual textures. More VRAM available let you set higher textures quality, it's also might be very useful in future when Uber will introduce multiple viewpoints: split screen and window in window.

    Check those links:
    https://forums.uberent.com/threads/question-to-devs-about-vram-usage.51325/
    http://www.mavorsrants.com/2013/02/planetary-annihilation-engine.html

    So article you linked is partially true, but not for PA because this game can handle lot of VRAM.
  18. gsuberland

    gsuberland Member

    Messages:
    38
    Likes Received:
    12
    Ah, I didn't realise PA was using the MegaTexture technique or SVOs. I still think that the low detail textures for terrain are helping a lot for VRAM requirements right now though.
  19. SXX

    SXX Post Master General

    Messages:
    6,896
    Likes Received:
    1,812
    Obviously yes, especially now. Before beta released PA might easily use 3GB of VRAM. :D
    Most of console games can't get advantage of large amounts of VRAM, while PA will able to use it.

    Also I'm probably need to repeat my LLVMPipe testing with Beta version of PA:
    https://forums.uberent.com/threads/some-crazy-fun-without-gpu.51186/
    It's will be interesting to check details of video memory usage on extra large planets. :rolleyes:
    Last edited: September 29, 2013

Share This Page