Footbreak 0.0

October 22nd, 2009

Footbreak is an alternative GUI for the Handbrake video encoding software.  It’s goal is to make ripping television shows as simple as possible.  Simply select an ISO file (that has been decrypted with DVD Decrypter), search for the television show, select the season, and relate each episode with a DVD Title.  Once you’ve done this for all of your ISOs, specify your video settings, and walk away from your computer.

Version 0.0 is available for download (155 Kb).  Full source code is included.

Screenshots that detail the wizard process are available after the jump.

Read the rest of this entry »

Lego Mario: Decorations Abound

October 6th, 2009

I have decorated my work area.




I have the best kleenex box in the world.


And yes, those are chocolate coins.



I also have too many woot monkeys.




September 16th, 2009

Scribblenauts may be the best video-game-as-a-toy of all time.  Sure, most games try to excel when it comes to gameplay, story, or even graphics… but Scribblenauts is simply fun.

The game is essentially a series of puzzles.  To solve the puzzles, you can conjure just about any non-trademarked noun available by typing it in.

For example: want to kill a shark swimming around?  Drop a toaster into the water.

Best of all, there is a completely unstructured ’sandbox’ you can play in, where you can see how different things interact with each other.  You can summon pirates, ninjas, god, lions, giant squids… just about everything, and usually they’ll attack each other.

I summoned a ‘blob’, basically a stereotypical green-gooey sentient blob.  The blob seemed to be the most powerful creature in the game… it handily defeated god, lion, tiger, devil, giant squid, leviathan, colossus, soldier, zombie, robot zombie, puma, bear, and everything.

Except vampire.  Blob and vampire will fight forever, neither able to harm each other.

However, terrorist can defeat blob… sort of.  When the terrorist dies, he blows up, taking the blob with him.

The terrorist cannot kill vampire, because the vampire turns the terrorist into a vampire-minion before he can die.

At one time, Santa ran for his life from the vampire and a vampire minion.  They decided to kill Santa, instead of turning him.

However, I gave Santa some garlic, and boy, vampire ran away and cowered in a corner.  I accidentally made Santa drop the garlic, which fell on the vampire’s head, vanquishing him.

I just have the greatest grin in my face when I play this game.

Lego Mario: Venturing into the Third Dimension

September 9th, 2009

Question Mark Block

I used up nearly every yellow Lego brick in my growing collection, and succeeded in creating a four-sided question-mark cube.

A friend at work noted that this could make an excellent Kleenex holder or candy bowl, er box.  It’s hollow, and the mushroom is actually sitting in a little hole.

Super Mario

August 29th, 2009

Super Mario

Super Lego Bros.

August 18th, 2009

Super Lego Bros.

Click for larger view.

I decided to create something very simple, but very cool, with Lego bricks.  One pixel is one Lego brick wide.

Mario would look more authentic if I used brown instead of blue, but I don’t have enough brown bricks.

In Memorium

July 5th, 2009

Over the past couple weeks, the world has been shattered by the loss of several notable individuals.  Continuing the Grim Reaper’s soul spree, I had a personal loss today.  In fact, this is the third personal death in such a short amount of time.  It is very, very sad.

XBOX 360 #3: March 9, 2008 – July 5, 2009 (16 months) – No Video Output

XBOX 360 #2: June 30, 2007 – March 9, 2008 (9 months) – Red Ring of Death

XBOX 360 #1: May 23, 2006 – June 30, 2007 (13 months) – Red Ring of Death

They will be missed.

Xbox 360 120 GB Hard Drive Hack

June 19th, 2009

Even though I don’t care for the Playstation 3 all that much, Sony did do one thing right: you can plug in a wide-variety of 3.5″ hard disks.

Microsoft, in their endless, dirty pursuit of money by introducing hoops for consumers to crawl through, decided to create a proprietary interface for the Xbox 360 hard drive.  The result?  The Xbox 360 120GB hard drive retails for $159.99 (though you can find it for $119.99 and less elsewhere), whereas the same 2.5″ hard drive is $49.99 on Newegg.

Even if you open up the Xbox 360 hard drive enclosure, the Xbox 360 will only communicate with a hard drive with specific firmware.

Thankfully, intelligent hackers have created tools to update said firmware on several Western Digital hard drives.  We’re still stuck with 120 GB (Microsoft doesn’t support larger hard drives), but at least we can get it cheaper.

Everything you need to perform this upgrade is written about amongst the internets, but (not surprisingly), the information is often scattered and incomplete.  Here are the complete steps I took to update my hard drive.

Physical Requirements

  • Compatible hard drive.
    I used the WD1200BEVS ($49.99 from Newegg)
  • T5 and T10 Torx screwdriver ends.
    I bought the Husky 36-Piece Precision Screwdriver Set ($4.99 from Home Depot).
  • USB Flash Drive
  • Computer with SATA ports and ability to boot from USB Flash Drive.
  • Xbox 360 Hard Drive Enclosure.

Software Requirements

Create USB Flash Drive DOS Boot Disk

  1. Run Virtual Floppy Drive, install and start the drive.
  2. Load the DOS 6.22 Boot Image into the fake floppy drive.
  3. Plug in your USB Flash Drive (backup any files you wish to save).
  4. Run HP USB Disk Storage Format Tool
  5. Create a DOS Startup Disk using DOS System Files located at the fake floppy drive (click Start).
  6. Twiddle your thumbs for a bit.
  7. Copy the contents of the fake floppy drive to the flash drive.
  8. Copy hddss.bin to the flash drive.
  9. Copy hddhackr to the flash drive.
  10. Reboot the PC with the flash drive plugged in, and see if it boots into DOS (you may have to fiddle with the BIOS startup order).
  11. If you see a DOS prompt, congratulations.  Don’t do anything yet!

Disassemble Xbox 360 Hard Drive Enclosure

  1. Use T5 Torx to remove 4 external screws.  Remember the one under the security label… I forgot about it, and almost tore the enclosure apart.
  2. Use T10 Torx to remove aluminum hard drive shield.
  3. Disconnect cables by holding them with your thumb while sliding drive forward.
  4. ‘Bend’ the plastic bit at the end so you can get the drive out.  It is attached loosely to the rest of the enclosure, and can tilt easily.

Backup 20 GB Hard Drive

If you have a memory card, copy your profile and any save games to it (you can always download things again later).  I forgot to do this, and I’ll have to swap the 20 GB drive back in later.

Flash Xbox 360 Firmware

  1. Shut down your computer.
  2. Disconnect all SATA drives (so the software has no chance of screwing up).
  3. Connect your new 120 GB hard drive.
  4. Plug in the USB Flash Drive.
  5. Start the computer.
  6. Enter BIOS.  If there is an option for ‘Extended’ or ‘Enhanced’ SATA configuration, you’ll want to choose ‘Compatible’ instead.  I got stuck on this point, with my ASUS P5B Deluxe motherboard.
  7. Boot into DOS.
  8. Enter the command: hddhackr -f
  9. hddhackr should display your Western Digital hard drive in a list.  If it does not, try another SATA port, or double-check your SATA configuration in your BIOS.
  10. Enter the number associated with your hard drive, and follow the prompts.
  11. Shut down your computer for 10 seconds.
  12. Start up, boot into DOS.
  13. Enter the command: hddhackr -f
  14. hddhackr will display something a different hard drive name, something with ‘Hitachi’ in it, if successful.
  15. Shut down the computer.
  16. Disconnect your new Xbox 360 120GB drive.
  17. Re-connect your old drives.
  18. Unplug the USB Flash Drive.

Final Steps

Re-assemble the hard drive enclosure.  This is pretty simple, just plug the new drive in, screw things together, re-assemble the latch mechanism, and you should be all set.

Startup your 360 with the new hard drive.  Once you’re booted up, go to System Settings, and your hard drive should be listed as ‘Unformatted’.  Select it, and select Format.


Avoiding Gmail’s Spamblocker

June 2nd, 2009
From: Marmo
Subject: Brighten up your life with a bra that lights upp
Content: (None)
Attachment: securings.rts

Contents of securings.rtf: - buy viagra, cialis, levitra and other meds

Darn. And here I was, genuinely curious about the ‘bra that lights upp’… such as, how? Green, light-absorbing glow-in-the-dark fabric? LEDs? Incandescent bulbs?

Creating Immutable Data Classes in C#… Quickly

May 26th, 2009

Of late, I’ve been tempted by F#.  In reading articles and familiarizing myself with the language, there seems to be something truly interesting there, but I just don’t grok functional programming yet.

One item in particular that I’ve seen is the Record data expression.  This allows you to create an immutable data structure, like so:

type Data = { Count : int; Name : string }
let data1 = { Count = 3; Name = "Hello"; }

Then, if at a later time you wish to change Count but keep Name the same, that’s absurdly simple.

let newData = data1 with Count = 4;

C#… does not have anything like this.  To create a similar immutable data structure (including equality checking), you’d have to do something like this:

using System;
using System.Collections.Generic;

public class Data : IEquatable<Data>
    private readonly int mCount;
    public int Count
        get { return mCount; }

    private readonly string mName;
    public string Name
        get { return mName; }

    public Data( int aCount, string aName )
        mCount = aCount;
        mName = aName;

    public Data ChangeCount( int aCount )
        return new Data( aCount, mName );

    public Data ChangeName( string aName )
        return new Data( mCount, aName );

    public bool Equals( Data aOther )
        bool lResult = false;
        if ( aOther != null )
            lResult = ( this.Count == aOther.Count &&
                        this.Name == aOther.Name );
        return lResult;

    public override bool Equals( object aOther )
        bool lResult = false;
        if ( aOther is Data )
            lResult = Equals( aOther as Data );
        return lResult;

    public override int GetHashCode()
        return Name.GetHashCode();

    public static bool operator ==( Data aLeft, Data aRight )
        return EqualityComparer<Data>.Default.Equals( aLeft, aRight );

    public static bool operator !=( Data aLeft, Data aRight )
        return !EqualityComparer<Data>.Default.Equals( aLeft, aRight );

That’s a lot of work! In F#, what takes a single line takes 70 in C#. And a lot of that is nasty, crufty copy-paste code. And its easy to forget to change some things, like the Equals method.

Well, let me correct myself. That would be a lot of work… if I wrote that. But I didn’t. I just wrote this:

this.Namespace = "Example";
this.ClassName = "Data";
this.ClassScope = "public";
this.ImplementINotifyProperty = false;
this.HashCodeVariable = "Name";
this.Variables = new List<Variable>()
    new Variable( "Count", "int", Options.Immutable | Options.ChangeMethod ),
    new Variable( "Name", "string", Options.Immutable | Options.ChangeMethod ),
<#@ include file="" #>

What is this mysterious mumbo-jumbo? That, sir (or madam), is T4: Microsoft’s Text Template Transformation Toolkit (aka a code generator). It is included in Visual Studio 2008, but it isn’t widely advertised.

My file is a horribly messy template that takes in the values I listed above, and translates them into the real source code example I pasted above. Besides immutable data structures, it also supports mutable members, including support for INotifyPropertyChanged and [Member]Changed events.

I’m rather liking this so far. If it turns out that this code generation is a horrible idea, I can simply delete my .tt files and use my auto-generated .cs files from then-on with little loss.

Note that the following source code is not well documented, and is not very error tolerant. If you do something silly, chances are you’ll get an obtuse compilation error. I recommend modifying it to suit your own needs.

Data Class Code Generator Source Code (11 KB, requires Visual Studio 2008)