Super Mario
August 29th, 2009Super Lego Bros.
August 18th, 2009In Memorium
July 5th, 2009Over 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, 2009Even 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
- Hddss.bin – the new firmware you’ll be using.
Google for it, and download it using a torrent, or dump it from your existing hard drive. - hddhackr 0.91 – tool that dumps/flashes/restores Xbox 360 hard drive firmware.
There is a 1.0 version available, but it didn’t work for me, and several others reported issues. - DOS 6.22 Boot Image
- Virtual Floppy Drive 2.1
- HP USB Disk Storage Format Tool 2.06
Create USB Flash Drive DOS Boot Disk
- Run Virtual Floppy Drive, install and start the drive.
- Load the DOS 6.22 Boot Image into the fake floppy drive.
- Plug in your USB Flash Drive (backup any files you wish to save).
- Run HP USB Disk Storage Format Tool
- Create a DOS Startup Disk using DOS System Files located at the fake floppy drive (click Start).
- Twiddle your thumbs for a bit.
- Copy the contents of the fake floppy drive to the flash drive.
- Copy hddss.bin to the flash drive.
- Copy hddhackr to the flash drive.
- 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).
- If you see a DOS prompt, congratulations. Don’t do anything yet!
Disassemble Xbox 360 Hard Drive Enclosure
- 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.
- Use T10 Torx to remove aluminum hard drive shield.
- Disconnect cables by holding them with your thumb while sliding drive forward.
- ‘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
- Shut down your computer.
- Disconnect all SATA drives (so the software has no chance of screwing up).
- Connect your new 120 GB hard drive.
- Plug in the USB Flash Drive.
- Start the computer.
- 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.
- Boot into DOS.
- Enter the command: hddhackr -f
- 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.
- Enter the number associated with your hard drive, and follow the prompts.
- Shut down your computer for 10 seconds.
- Start up, boot into DOS.
- Enter the command: hddhackr -f
- hddhackr will display something a different hard drive name, something with ‘Hitachi’ in it, if successful.
- Shut down the computer.
- Disconnect your new Xbox 360 120GB drive.
- Re-connect your old drives.
- 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.
Tada!
Avoiding Gmail’s Spamblocker
June 2nd, 2009From: Marmo Subject: Brighten up your life with a bra that lights upp Content: (None) Attachment: securings.rts Contents of securings.rtf: http://blahblahblah.cn - 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, 2009Of 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; return; } 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="DataClass.tt" #>
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 DataClass.tt 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)
Fallout 3: The Lone Wanderer Fights for Decency
May 11th, 2009The Lone Wanderer killed everything in the Satellite Facility. They deserved it, after all. With Liberty Prime… well, let’s just say Broken Steel, the Enclave deserved every laser and plasma blast.
In fact, he was in such a zeal for death and destruction that many of the crates and shelves were simply skipped past. Upon downloading the encrypted transmission, the Lone Wanderer back-tracked and hunted for any spare ammo and other goodies.
However, fate had something different in mind.
Lo! As the Lone Wanderer imagined himself falling down the stairwell to his death (it felt like deja vu), the Enclave had him surrounded! He turned on V.A.T.S. and noticed… they weren’t wearing… clothes. Well, sure, t-shirts and shorts, but their armor was missing.
Now, in addition to killing just about every good person in sight, the Enclave had now declared a war on Decency. This could not stand.
What Is Up With The Feet?
April 20th, 2009I Need To Do Dishes More Often
April 18th, 2009The following pictures document what I found in my sink’s garbage disposal just minutes ago. I am not kidding.
As near as I can tell, this is what you get when you throw cantalope seeds down the drain, but you forget to turn the garbage disposal on.