Thursday, June 4, 2009

Running BattleGround Europe From a RAMDisk in Windows7 64-Bit

After the new 1.30 patch, I've been having problems with stuttering at random times when flying. Since I suspected these stutters were due to the game hitting the disk to load up terrain tiles, I decided to try out running it from a RAM Disk.

I ran 1.29 from a RAM Disk before, but there have been some pretty big changes since then. For one, Playgate (the old launcher) has been removed, which means any registry files I had setup wouldn't work anymore. Also, I switched to using the Windows7 64-Bit Beta (build 7100).

Setting it up was pretty straightforward, so I'll just get to the instructions:

1. Find a RAM Disk program that works with your OS.
I ended up using Cynatek RAMDisk Beta (which is free for the time being). I tried a couple other programs before this, but was unable to get anything to work without BSOD'ing my computer every time I started the game.

2. Setup a RAM Disk big enough to hold the game.
My RAM disk is setup to be 900MB. This is about 100MB larger than it needs to be, but I didn't want to starve the game for HD space on its install disk. You might be able to cut it a little closer, but those are the settings that work for me. I'm using a FAT32 partition setup to be my 'F:\' drive. If you have a different drive letter assigned, just substitute it for 'F:\' anywhere in these instructions.

3. Copy your 'BattleGround Europe' game directory to the RAM Disk
I had the game installed to 'C:\Games\Battleground Europe\'. I just grabbed this directory and copied it entirely to the root of my 'F:\' drive. This left me with a 'F:\Battleground Europe' directory.

4. Rename you 'Battleground Europe' directory on the RAM Disk
This step may not be necessary, but I did it so I'm going to include it. I simply renamed the 'F:\Battleground Europe\' directory to 'F:\WWIIOL' so that I wouldn't make typos when editing the registry (thats coming up). It might help to have a name that is less tha 8 characters and contains no spaces since the registry entry seems to use old DOS-style directory names.

5. Create a shortcut to the RAMDisk .EXE files
Open the "F:\WWIIOL" (or wherever you copied the files to) directory on the RAM disk and right-click on the 'Playgate.exe'. Choose 'Send To' and then 'Desktop (create shortcut)'. This will make a shortcut on your desktop that will launch the online version of the game. You can also make a shortcut to the 'ww2.exe' the same way if you want to run the offline practice mode.
If you're using Windows7, make sure to set these shortcuts to run in 'Windows Vista, Service Pack 3' compatibility mode, and check the 'Run As Administrator' box to avoid nasty mouse-freeze problems at the main menu.

6. Create a backup registry file
The next steps involve modifying an entry in the registry to point to the newly copied directory. We want to be able to switch back to using the version of the game on-disk before applying updates or for testing, so you should make a .REG (registry) file that will restore your current settings. This used to (pre 1.30) involve editing 2 seperate sections in the registry, but is a lot easier now that playgate is gone.
I just made a file called 'BattlegroundEurope_Disk.reg' that contains the following text:
Windows Registry Editor Version 5.00

This bit is Windows7 specific, so if you're running a different version of windows you might have to search for the 'Playnet' entry in your registry (using 'regedit.exe' from the start menu) to find the entry.
You should also make sure that the "C:\\Games\\BATTLE~1" matches the directory you installed the game to. In my case it is installed to "C:\Games\Battleground Europe", but since the registry uses old DOS-style filenames its a little mangled. Look at your registry entry if you're unsure what this should be.

7. Copy your 'BattlegroundEurope_Disk.reg' file
Make a copy of the file you made in Step 6 and name it something like 'BattlegroundEurope_RAM.reg'.

8. Modify your 'BattlegroundEurope_RAM.reg' to point to the RAM Disk
Open the 'BattlegroundEurope_RAM.reg' file in a text editor (don't double-click, right-click and choose 'Edit'). Update the line that starts with "Path" to look like this:
Save the file, and close it. If you copied the game files to a different directory in Step 3 or 4, you should use whatever drive/directory combo you used. In my case, the game is located in "F:\WWIIOL" as previously stated.

9. Merge the 'BattlegroundEurope_RAM.reg' file into your registry
Double-click on the 'BattlegroundEurope_RAM.reg' file and confirm that you want to add the contents to the registry. This will overwrite the "Path" value to the one you specified.

10. Run the game
That should be it. If everything went smoothly you should be able to start the game by following the shortcut that was created in step 6. If you need to go back to running the version from the disk (or if you need to install an update to the game), simply merge the 'BattlegroundEurope_Disk.reg' file you created in step 6 beforehand.

Applying Updates:
Before you apply an update, be sure to run the 'BattlegroundEurope_Disk.reg' file you created in step 6. This will allow the patch to run and update the version of WWIIOL on your hard-drive. Simply copy the updated files back to your RAMDisk after the update has been applied an re-run 'BattlegroundEurope_RAM.reg' to launch from the RAM Disk next time.

No comments: