Sid Meier's Railroads!

Sid Meier's Railroads!

252 ratings
Fix Crashing / LAA manual fix (64-bit Windows)
By Nulano
Does Sid Meier’s Railroads! crash for you every 5 or so minutes? Are you fed up with having to reload autosaves? Do you want to stop these crashes from occurring? If so, follow this easy guide and your game will be fixed in 5 to 10 minutes, without downloading any questionably safe exe files!

Don’t worry; it’s really easy, especially with the screenshots, and there is practically no chance of messing anything up. :)

This is a rewrite of the most popular discussions post for this game, which has over 175 replies!
The "too long, didn't read" short version of the guide:
  1. Make sure you are on 64-bit Windows. If you are on Mac, this guide is not needed.
  2. Install a hex editor such as HxD, available from
  3. Open railroads.exe from the game files in your hex editor as Administrator.
  4. Find the two consecutive bytes "0F 01" near the top, typically at offset 0x014E (in HxD that's row 00000140 and column 0E).
    If you have a non-Steam copy of the game, 0F 01 might be somewhere else. If this is the case, read the "Can't find 0F 01?" section of this guide.
  5. Replace the 0F with 2F by clicking to the left of the number and pressing the 2 key.
  6. You should now have "2F 01". Save and you're done!

See below for the full guide including screenshots.
How does this work? (feel free to skip)
Sid Meier’s Railroads! came out at the time, when applications were starting to be impacted by the 2GiB limit of 32-bit Windows and PCs were transitioning to the 64-bit era, which allows applications to use practically unlimited amounts of RAM.

This 2GiB limitation often causes problem in many 32-bit games released around the year 2006. Microsoft has made a workaround, which allows 32-bit applications to use all 4GiB of RAM addressable with 32-bits, but it is only enabled for applications that claim support for it (as it could cause problems with a few applications). Sadly, the developers of Sid Meier’s Railroads didn’t declare support for 4GiB of RAM, so it is limited to the 2GiB of RAM. That’s what this patch fixes.

Support for 4GiB of ram is declared by a bit in the PE header called the “Large Address Aware” bit, or LAA for short. This guide will show you how to manually set the LAA bit in the game’s exe with a hex editor, which allows the game to use 4GiB of RAM, instead of the default 2GiB.
What do you need?
You should have 64-bit Windows with at least 8GiB of RAM (4GiB might be enough, but I haven’t tried it). If you have 32-bit Windows, please read the 32-bit Windows section at the end. If you are unsure, you can follow these steps courtesy of Microsoft[]:

Originally posted by Microsoft:

Click Start, type system in the Start Search box, and then click system in the Programs list.
The operating system is displayed as follows:
  • For a 64-bit version operating system, 64-bit Operating System appears for the System type under System.
  • For a 32-bit version operating system, 32-bit Operating System appears for the System type under System.

You only need basic computer skills (if you can read this guide, you're fine) and a hex editor.
I recommend using the HxD hex editor[] (you don’t even have to install it).
If you want to use another hex editor, that's completely fine, but beware that the screenshots might not match exactly.
Follow these instructions to apply the patch:

First you need to open your hex editor as Administrator (I’m using HxD).
Now you need to navigate to the Sid Meier’s Railroads! install directory:
Select the game in Steam, click on the gear icon on the right and select Manage > Browse local files.
Find the game exe in the opened directory and open it in your hex editor: Drag the file RailRoads.exe onto HxD / your hex editor.
Note: If you have file extensions disabled, you will only see 'RailRoads' instead of 'RailRoads.exe'.
Now comes the hardest part: Find the two consecutive bytes 0F 01. These should be in the 00000140 row. Click in front of the 0F byte.

It is possible that your exe doesn't match the screenshot below (especially if you have a CD version). If so, follow the instructions in the section Can't find 0F 01? to find the two bytes.
Press the 2 key to change the 0F to 2F. You do not need to delete anything, HxD overwrites text by default.

This is the only change that is required. You should now see this:
Now save the file (File -> Save), close HxD and enjoy your newly the patched game with 95% fewer crashes!
Reverting the patch
If you encounter any difficulties, or want to revert your game for any reason, you can just select Verify integrity of game files... in the game’s properties in Steam. This will undo any changes you’ve made and you will have to follow this guide again, if you wish to re-apply this fix. The patch will also usually be reverted if you reinstall the game, if the developers release any update (there have been no updates since the game’s release on Steam), or if you change the game’s language in Steam.

Can't find 0F 01?
If your exe doesn't match the screenshots above, you can follow these steps to find the bytes 0F 01 in your exe file.

Screenshots provided courtesy of SirDuck from the v1.100, PC Gamer disc version (diagrams drawn by me).

The bytes you need to change are in the second line of the PE header. The location of this header is marked on the fourth line of the file (marked 00000030). Take the last four bytes and combine them in reverse to get the location of the PE header:
Go to the row with the number you got in the previous step (ignoring the last digit, if it's not 0).
You should find 0F 01 in the line below:

If you need more help, please post a comment and send me a your exe or a screenshot (e.g. as a link to Imgur) and I will do my best to help you.
Other issues / Still crashing?
Please note, that this fix isn’t definitive. There are many other problems in this game, although none are so severe. If the game crashes for you before you can even start a new game, there is another problem. It might be caused by your video drivers or compatibility settings.

If you can start a game succesfully, but it still crashes after a few minutes with this patch, try removing any custom maps, or playing with fewer opponents, to decrease memory usage.

If you have any problems, please ask in the comments, and make sure to select Subscribe to thread when posting a comment, so you get notified when I reply to you.
32-bit Windows
This guide can also help you if you have 32-bit Windows, but you will have to do an additional step, which involves modifying Windows. I have not tried this and I personally wouldn’t try it on my primary PC, but you are welcome to try this, if you wish to. I will not be responsible for any damage that is caused by following the steps in this 32-bit Windows specific section. The following is a copy of steps 2 and 3 found on this website[].

Originally posted by

On Windows XP:
Manually edit your boot.ini file by adding ”/3GB /Userva=2900″ to your boot.ini (no quotes). Your boot.ini is normally read only and you will need to change that temporarily while you edit it. To do this, right-click the file and untick “Read Only”. After editing the file, restore the Read-only status. To Edit it manually you can find it on the root of your system drive or go to system properties/advanced tab, settings under ‘startup and recovery’ section, then hit edit. Mine looks like:
multi(0)disk(0)rdisk(0)partition(1)\WINDOWS=”Windows XP Professional” /FASTDETECT /NOEXECUTE=OPTIN /3GB /Userva=2900

On Windows Vista/7:
Go to the start menu and in the search box type ‘cmd’, don’t hit enter. Wait until ‘cmd.exe.’ appears on the menu and then right click and select “run as administrator”. Then run this command:
BCDEDIT.EXE /Set IncreaseUserVa 2900
Extra information
The original discussion can be found here. You can read lots of happy responses there from people running various versions of 64-bit Windows.

If you would like to see a video of these steps (not made by me!), there is one linked in the discussion where I originally posted these steps in post #75.

The popular fix used to be a "3GB enabler" script. I didn't trust it (who would trust a random script off the internet?), so I looked for other options. Thanks to my interest in Computer Science, I was studying the structure of exe files, which led me to this manual fix (which is actually easier IMO). The script can be found here[].
< >
JoeSchmoe1143 Feb 2 @ 4:37pm 
This works great (The Hex Edit). If/When the game hits a spot where it hangs, it no longer crashes. Nice work!:steamthumbsup:
DuckSaysQuack Jan 10 @ 5:08pm 
Thanks so much!! I can finally enjoy this classic again!
AlF, smurf Jan 3 @ 12:59pm 
sonicram Dec 20, 2022 @ 5:08pm 
thanks loads for the quick fix it work really well :)
pmflick Dec 9, 2022 @ 7:59am 
Worked brilliantly! Easy to follow directions and the screen caps helped a lot. Thank you so much!
Nightingale Sidires | Nov 9, 2022 @ 3:18pm 
This really helped out. The game behaves much better - like its identifying its running on a 64x system.
Dinsdale Nov 6, 2022 @ 9:20am 
Ace. Thanks!:steamthumbsup:
Destin Skye Aug 15, 2022 @ 9:42am 
Thank you for this fix!
Nulano  [author] Jul 21, 2022 @ 11:23am 
I'm not aware of any mods that modify the game exe, so there should be no problem using them. However, keep in mind that having custom maps installed may make the game more likely to crash.
JoeGrunt Jul 20, 2022 @ 6:50pm 
Now I wounder if I can use the Christmas add on?