Archive for January, 2007

Generate the Atari Rainbow Effect

Monday, January 29th, 2007

Remember the classic rainbow effect in so many Atari games and demos? I dug around for some information on how to do it, and distilled it into a mini howto on the recently launched Hackszine Blog. So break out your favorite 8-bit Atari computer or emulator, and get ready for some type-in fun!

My First Make Controller Project

Thursday, January 25th, 2007

Make Controller RSS Reader
I’ve been working on a little piece of code to pull down RSS feeds and display them on a small LCD attached to the controller. It’s pretty basic now; it just looks for stuff inside of <description> tags and pulls it out. You can see the gory details at my Making Things Member Page.

Make Visits the Steel Yard

Sunday, January 21st, 2007

PT at the Steel Yard
Some of the folks from the Make team through Providence last week, and our first stop was the Steel Yard. I’m embarrassed to admit that this was only my first visit to the Steel Yard as well.

Make: The Steel Yard – Providence, RI
(see also: Craft: An Afternoon at RISD’s Apparel Department)

Remove Boot Camp Partitions from a Three Partition Setup

Tuesday, January 2nd, 2007

A while back, I split my MacBook Pro hard drive into three partitions so I could have a small FAT32 partition for sharing files between Windows and Mac OS X. After getting a dedicated Vista system, I wanted to delete the extra partitions I created and get all my disk space back. The only problem is that Boot Camp refuses to work on a disk that is partitioned this way, and the command-line tools are complex. I finally got up enough courage to give them a whirl.

This stuff is tricky, and I expected there was a very good chance I’d make a mistake that would force me to restore from backups. If you decide to give this a try, be careful.

I used SuperDuper to clone my Mac hard drive (in case I screwed up big time) onto an external disk drive, booted into the cloned operating system (your Mac OS X install disc should work too), and got a list of gpt partitions:

$ sudo gpt show rdisk0
gpt show: /dev/rdisk0: Suspicious MBR at sector 0
    start      size index  contents
        0         1        MBR
        1         1        Pri GPT header
        2        32        Pri GPT table
       34         6
       40    409600     1  GPT part - C12A7328-F81F-11D2-BA4B-00A0C93EC93B
   409640 142270944     2  GPT part - 48465300-0000-11AA-AA11-00306543ECAC
142680584    262144
142942728  10485760     3  GPT part - EBD0A0A2-B9E5-4433-87C0-68B6B72699C7
153428488  41680896     4  GPT part - 48465300-0000-11AA-AA11-00306543ECAC
195109384    262151
195371535        32        Sec GPT table
195371567         1        Sec GPT header

To delete the 5GB and 20GB partition, I used this command:

$ sudo gpt remove -i 4 rdisk0
gpt remove: /dev/rdisk0: Suspicious MBR at sector 0
gpt remove: /dev/rdisk0: 1 partition(s) removed

$ sudo gpt remove -i 3 rdisk0
gpt remove: /dev/rdisk0: Suspicious MBR at sector 0
gpt remove: /dev/rdisk0: 1 partition(s) removed

Using the original output of gpt, I calculated the disk space I had to work with (10485760+41680896)/2=26083328K and restored my original bootcamp config:

$ sudo diskutil resizeVolume disk0s2 72842723328B \
  "MS-DOS FAT32" Windows 26083328K
Started resizing on disk disk0s2 Macintosh HD
Verifying
Resizing Volume
Adjusting Partitions
Formatting new partitions
Formatting Disk
100% ..
Finished resizing on disk disk0

Then I rebooted from my internal hard drive, used Boot Camp Assistant to restore the Mac to a single partition, and it reclaimed all that disk space.