Thursday, October 13, 2011

The case of the crashing server

In my office at work I have a server computer that has been crashing more and more lately. I very quickly ruled out the possibility of a software problem, if Windows were crashing I would get a blue screen of death (BSOD) or a mini-dump file. Instead the machine would just hard reboot at random intervals. The BIOS log contained nothing, so I was left to figure this out the hard way.

First I tried replacing the power supply, thinking maybe the output power would occasionally "dip" causing the crash. But it continued to crash. I noticed the crashes seemed to occur most often during heavy disk activity. So I suspected either the RAM or the disk controller. Since the disk controller was onboard the motherboard, I checked the RAM next. Reseating the RAM didn't help, so I ordered new replacement RAM (DDR3 is cheap right now). The new RAM appeared to fix the problem, it hasn't crashed since then.

But while testing the new RAM I noticed something else disturbing. Using HWMonitor I noticed the CPU (Core i5) was running hot! The idle temp was 50 degree Celsius and under load it got as hot as 104 degree Celsius. That's not good, you shouldn't be able to boil water on your CPU. When I built this computer I used the stock Intel cooler, but I've always hated the stock Intel cooler. Not because of performance or noise, but because they seem to be difficult to install. And the instructions don't help, they only contain pictures and no text.

I turned the machine off and removed the stock cooler. I discovered two faults when I installed the original cooler, so no wonder it was running hot. I cleaned off the CPU and cooler, applied some Arctic Silver 5 (consistently rated as the best thermal compound), and reinstalled the cooler. Now the CPU is idling at 30 degree Celsius and under load it goes no higher than 50 degree Celsius. Much better than before!

I'm sure between the bad RAM and the overheating CPU that I've solved this machines instability problem.

Wednesday, October 12, 2011

Streets of Rage Remake

I'm very excited about today's post. Easily one of the best series of games on the Sega Genesis was Streets of Rage 1 - 3. As you might have noticed from my previous posts, I like fan remixes of great games. And I'm pleased to announce there is a fan remix of SOR called "Streets of Rage Remake v5." This game took the author 8 years to create. Earlier this year he released the final version (hence the "version 5" in the name).

Let me just start off by saying this game is AWESOME! Below is a very short list of what's cool about this game:

  1. Includes faithful recreations of the first 3 SOR games.
  2. Adds tons of new original levels.
  3. Select different routes to take as you play.
  4. Play as any of the 6 characters from the first 3 SOR games.
  5. Includes 6 unlockable characters to play as.
  6. Tons of new character moves.
  7. Adds new weapons such as guns (and even a cheat to use lightsabers).
  8. New music that is still faithful to the original.
  9. New and enhanced graphics (including cool features such as transparencies and reflections).
  10. Online play with a friend.


That is just a short list of features. Trust me, this game is worth downloading. Oh, did I mention it's FREE!!! Unfortunately, Sega kind of considers this game a violation of their copyright, so you cannot download it from the authors website. But if you search the Internet you might still be able to find a copy.


Tuesday, October 11, 2011

Extra power cords



Most small to medium electronics use power supplies with a box on the end. I've heard them called "wall warts" or even "bricks." Whatever you call it, it's a power supply and they seem to becoming more common. Everything from cell phones to fax machines use these types of power supplies. What happens when the electronic item powered by these breaks or is lost? I think most peoples reaction is to just throw away the power cord, after all what use is it without the item it's designed to power? Well as it turns out they can be very useful and I would encourage you to save it just in case. Just as you may lose the electronic item and retain the power cord, you may also lose the cord but still have the item. And some of these power cords are interchangeable. The purpose of this post is to tell you how to know if you can reuse an old power cord.

As an example I'll use a real life example that happened to me yesterday. I bought a used wireless router of craigslist for dirt-cheap because it didn't have a power cord. So I went digging through my box of cords to find a suitable replacement cord.

Now let me be clear, do NOT just use the power cord if the connector fits, you're very likely to break the eletronic device! You need to follow these steps to determine if the power cord will work for you.

First, locate the power specs on both the power cord and the electronic device you're hoping to power. The specs should be on a sticker or stamped into the plastic and look something like this.


Step 1: Type
First step is to identify the type of output power, either AC or DC. Most power cords ouput DC, but a small number output AC. If the power cord matches the electronic item then proceed to the next step. If they differ then this power supply will not work. Note, sometimes they don't say "AC" or "DC." A solid and a dashed line means DC and a wavy line (sine curve) means AC.


Step 2: Voltage
Next you need to check the output voltage. The voltage needs to be an exact match. Technically you can go slightly higher on the power cord (10V power cord for a device requiring 9V), but be aware that higher voltage places the device under additional "stress" and may cause it to fail sooner. In this case the power supply is 12 volts which is what I'm looking for.


Step 3: Amps
Next locate the output amps. The amps on the power cord needs to be the same or higher than the device. It's important to note that the amps rating on the power cord is the maximum amp output, it does not mean the power cord forces that many amps on the output. So as long as the amps is the same or higher than your device you can use it. In this case my router needs 1amp and this power cord outputs upto 1.25 amps so it's good.


Step 4: Polarity
Most power cords like this use what's called a barrel-connector. Polarity of the connector is very important, getting it wrong would be like putting the batteries in backwards. For my power cord the inside is positive and the outside is negative. If the polarity does not match your device, all is not lost. You can cut the cord, strip the wires back, rotate one end, and reattach the cord. Bare minimum you need to twist the wires together and then cover with electrical tape, but ideally you solder the wires together and cover with heat-shrink tubing.


Step 5: Physical connector
The last step is determining if the physical connector will work. This information is not printed on the power cord or the device. So just check it, does the power connector fit snugly into the device? If not, you can fix this for cheap. Places like Radio Shack and digikey.com sell replacement barrel connectors. You cut off the old connector and solder on the new one. Just make sure to get the polarity correct. If you need to check polarity use a multimeter (or a LED).

There you go, the steps necessary to reusing old power cords and saving tons of money. Using this technique I found a power cord for my new wireless router and saved at least $20 over other used routers. You will notice we didn't look at the "input" section of the power cord at all. Assuming you don't have any foreign power cords, this should be a safe assumption. If however you have power cords designed to work in foreign countries these steps may not work.

Monday, October 3, 2011

Sonic remixes

Without a doubt Sonic the Hedgehog was one of the best and most influential games from the 1990s. They were a lot of fun, had great graphics and sound for the day, and plenty to explore. So it's no surprise that these games had a big impact on a generation of video gamers. Some of these gamers have gone on to program their own Sonic games for the PC. Commonly referred to as "fan remixes" here are 3 fan remixes of Sonic to keep an eye on. None of these three are done yet, but they all have promise.

Retro Sonic Nexus

Retro Sonic Nexus is quite a mouthful. Me personally I prefer its previous name Sonic XG. This game has some impressive game play and cool level design. There is a playable demo you can download.

Sonic the Hedgehog 2 HD

If you ask me, the best Sonic game was Sonic 2. Well here's a project that is taking Sonic 2 and completely redoing the game but in high definition. They are not creating a new game, nor are they making the game in 3D. Just enhancing the same game but with HD graphics. Check out the video on their webpage, it looks impressive! There is also a playable demo you can download.

Sonic Fan Remix

This very ambitious project is recreating the first Sonic game but rendered as a 3D game. It's still a side-scrolling 2D game, but rendered in a 3D engine. Very impressive. Check out the video on their webpage.


There you have it, 3 Sonic remix games to keep an eye on.

Thursday, September 29, 2011

Adobe and Apple BOTH suck!

I remember back when the iPad was released, Steve Jobs told the world that the reason the iPad didn't support Adobe Flash was because Adobe could not write good software and Flash was the cause of the majority of computer crashes. In effect he was saying Adobe didn't know how to program well. I personally find this ironic because I consider Apple to be guilty of the same thing.

First off let me say I totally agree with Steve Jobs, Adobe software does suck. My biggest gripe is it's bloatware factor, meaning it installs way too much. Case in point Adobe Reader. This program is over 110 MB in size and all it does it display PDF documents. Compare that to SumatraPDF which is about 4 MB in size. And I've never had compatibility problems with SumatraPDF, it opens and correctly displays every PDF I've thrown at it. Why is Adobe Reader so big? That's a good question.

But Apple is guilty of the same "sin." The latest version of Apple's iTunes software installs over 410 MB of files!!! To give you a point of reference, Media Player Classic Home Cinema is about 12 MB in size. So again, why does iTunes install so many files. I think the root problem is developer laziness. Apple iTunes installs tons of files for every possible language. iTunes should only install files for the language I'm currently using. If I speak English do I really want 100 other languages installed on my computer?

So in conclusion; Apple and Adobe both suck at producing software. Their developers are lazy and we the consumers are the ones who pay the price. I recommend avoiding them if at all possible.

Friday, September 16, 2011

How to Profile

No, I'm not talking about racial profiling. The term "profiling" is used in computers to describe the process of analyzing an application for performance reasons - to locate and reduce or eliminate bottlenecks. Profiling an application can be as simple as making changes to your code and using a stop watch to time executions to improve performance. Fortunately there is a much better way, there are tools to help you profile your application. Below I'll tell you have to use Visual Studio 2005 to profile your application. Note that most every version of Visual Studio has a Profiler, and the use of that Profiler may very. This is only for Visual Studio 2005.

For starters the Profiler is only an option on the highest levels of Visual Studio - I believe they call it Team Suite. You also have to select the Profiler option during Visual Studio installation. From your Visual Studio IDE, select the Tools menu and look for a "Performance Tools" option. If you don't see it then you didn't install the Profiler and/or you don't have a level of Visual Studio high enough.

If you have the "Performance Tools" menu option then you've crossed the first hurdle. Next you need to select a Release build of your project. You can profile a Debug build, but you'll get a lot of "noise" so best to use a Release build. You need to do two things before you compile your code. First, enable Symbols for your Release build. Second, you need to add the "/PROFILE" switch to the linker. This option must be added manually in the "Additional options" section. The /PROFILE switch instructs the linker to generate output that is friendly to the instrumenter.

At this point you can use the "Performance Tools" menu option to create a profile session. To profile your application you must run it from within Visual Studio, and you must use the "launch" button in the profiler view.

There is one more gotcha. If your application is more than a single EXE, if it contains DLLs, the Profiler will NOT traverse down into those DLLs which is probably what you want it to do. To profile your entire application including DLLs there is an additional step. You have to manually instrument your DLL files. To do this open a command prompt. The command is "vsinstr.exe a.dll" Note that when you instrument a file is generates a new PDB file.

Happy profiling!

Tuesday, September 13, 2011

Pier Solar

Today I wanted to talk about a new game for the Sega Genesis. Yes, you read that correctly, a new game was released for the Sega Genesis in 2011. It's called Pier Solar.

Arguably one of the genres Sega did the best at was RPGs (or role-playing/adventure games). The Phantasy Star series was incredibly. A group of fans decided to create their own RPG for the Genesis. As I understand it they worked on this game for 5 years or more before completing it. But this isn't just another hack, they went the full nine yards. The game is by far the largest game ever on the Sega Genesis, 64MB versus I think 4MB for Super Street Fighter II (the next largest game). If you own the Sega CD attachment you can pop in a CD for enhanced sound and audio. All and all the game is awesome! They even created packaging, manuals, physical cartridge production, and translated the game into multiple languages.

Obviously this is going to be a very limited production run. The game was sold on their webpage for $55 (not bad considering Phantasy Star games cost more than that back in the 1990s). As of now the game is no longer for sale, I'm guessing they sold out and who knows if they will produce more. You can buy them on eBay. This game is sure to become a collectors item because of it's rarity and uniqueness.

I purchased my copy, although as of yet I haven't opened the packaging. I've been too busy to play it, so for now I'll keep it unopened.