CD Image Via Twitter: A Handcrafted Game Disc

Humans can turn anything into a competition. Someone always wants to be faster or drive a ball farther. Technical pursuits are no different, which is why a lot of people overclock or play regular expression golf. [Alok Menghrajani] sets himself some odd challenges. A few years ago, he hand-built a bootable floppy image that had a simple game onboard and managed to fit it in a Twitter message. Twitter has increased their number of characters, so — you guessed it — this time he’s back with a CDROM image.

His tweet is a command line that starts with perl. The text is base64-encoded binary and if you run the Tweet from a shell — which is an odd thing to do with a Tweet, we grant you, you’ll be rewarded with a file called cd.iso. You could burn that to a CDROM, but it is more likely you’ll just mount in a virtual machine and boot that. [Alok] says it does work in QEMU, VirtualBox, and — yes — even a real CD.

This might seem frivolous. The game is certainly nothing spectacular. However, if you want to understand how the ISO9660 standard creates bootable disks (the El Torito extension), you’ll enjoy this fun approach to how it all goes together.

Of course, you could read the standard. A good tip from the post is that while buying a legal copy of the standard is expensive, you can get ECMA 119 which is the same document for free. However, the El Torito specification apparently is pretty hard to read and has typos in it. So seeing a hands-on example is pretty useful.

It is interesting just how short the NASM assembler code for the game and bootloader is. No megabytes of shared GUI libraries here!

If you want more details about how to write a bootloader for x86, we’ve got that. If you haven’t done much x86 assembly, you could start with this gentle interactive introduction.

6 thoughts on “CD Image Via Twitter: A Handcrafted Game Disc

  1. “Humans can turn anything into a competition.”

    Bungie-jumping into a live volcano.

    “A few years ago, he hand-built a bootable floppy image that had a simple game onboard and managed to fit it in a Twitter message. ”

    Now just think what one could do sending DNA via Twitter?

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

This site uses Akismet to reduce spam. Learn how your comment data is processed.