Red Faction 2 and my helping hand

June 4, 2011 7 comments

I just bought Red Faction 2 off of a steam deal and I kept getting this error telling me that I need at least 8MB of video ram, when I have that and more. A little searching around brought me to this sticky on the steam forums:

That was fine and dandy, but I decided to make it a little easier and make a small program to automate this.

Now I must start by saying that I have very little experience with C#, but I have taken classes on java and they’re pretty similar languages.

The instructions are really simple. If you had read the steam post I linked to, they’re about the same.

First right click the program and run as administrator. (I’ll post the source code so you can compile it yourselves if you don’t trust me)

If you want to set up your computer to play Red Faction 2: Press the button on the left (Fix for RF2).

This actually runs a command that’s identical to the first steam step:

bcdedit /set {current} truncatememory 2147483648

where 2147483648 == 2GB in bytes ( Don’t believe me? )

Then restart your computer, using the button on the program or through the start menu.

When you’re done playing RF2, then you can press the button on the right (Go back to normal).

That runs a command that erases the rule that the left button created:

bcdedit /deletevalue {current} truncatememory

After “going back to normal”, you must restart your computer again.

Download links:

This is beta quality software, because I only tested it on my machine. Please give me feedback as beta testers if you try this prog.

Already compiled for your convenience

Source code (feel free to make mirrors, all I ask is that you mention me)

Those instructions again:

1. Left button (Fix for RF2)

2. Restart computer

3. Play Red Faction 2

4. Right button (Go back to normal)

5. Restart computer

Happy gaming.

Categories: Games, Programming

Public directories in Dropbox

February 27, 2011 1 comment

A few weeks ago a friend asked me how to share directories in Dropbox. I couldn’t really figure it out myself, so I told him to zip the files. It wasn’t the most elegant solution, but it worked sorta. It wasn’t until just recently that I had a better solution. It still isn’t the best, but it’s definitely a step in the right direction.

Basically what I did was created a python script that generates an HTML file with links to the files in the public directory (the current working directory).

I haven’t worked with HTML in a really long time, so this was a fun little thing.

Now my first attempt at this wasn’t very glamorous, but I needed a rough idea on how this was going to work.

Ok cool, I had a working prototype. It wasn’t pretty, but that’s fine for now. I put a little more work into it by changing the html, getting rid of the bullet points, and I even added some graphics for non-image files.

Now I know what you’re thinking, “Bro you have some killer art skills” Thanks! I’ve settled on this for now, as it works  pretty well for most people’s needs.

In the future I will probably make it look less amateur. Feel free to add your own icons, and filetypes. Feedback and comments welcome.

Just run the python script and it will make an html file called ‘pub_dir.html’. That will be your folder to share with people.

Bugs I can think off the top of my head:

  • the folder links won’t work due to naming errors

Here is the download link:

Categories: Programming Tags: ,