Categories
Narrated

The Incredible Invincible Hard Drive

Despite all of my technology training and knowledge, occasionally I manage to do something immensely stupid to my computers. I am not immune to stupid keystrokes or misreading instructions. I have hardware issues just the same as everyone else.

Rarely, however, are such problems fixed by magic.

Categories
Best Of Debated

Save Yourself

Back in July, in a fit of self-documenting, I took two pictures relating to my gaming library. I caught a small amount of hell because the PSP library is larger than the DS library by at least a 2:1 ratio. (It should be noted that games are missing from both pictures, and this ratio has not changed since the pictures were taken.)

There are many reasons for this, but this post is not about why. At least, this is not about most of the reasons why. Instead, it’s about one reason that is not solely limited to the DS, although it does happen there more than anywhere else.

Save The Data

Many video games are too long to finish in one sitting. Because of this, ways to save the game state have been created over the years. Three have stood out.

First was the idea of passwords: usually a string of letters which you can re-enter later and the game deciphers it to drop you back around where you were. Some games used other methods – symbols, numbers, and in the case of Capcom’s Mega Man series, a grid. Mega Man 3 is pictured at right with a password that starts you at the end of the game – two colored symbols placed in key locations on a 6×6 grid.

Passwords were painful for two reasons: one, they were often long and unwieldy. Passwords for the NES game Rambo were 32 characters long and case-sensitive. This made most passwords hard to capture, hard to re-enter, and easy to mess up. Two, passwords can only capture so much information – so for games with detailed inventories or statistics, a password is rarely able to save the state properly.

Next came per-game battery backups. By adding a small battery and some RAM to a game cartridge, games could save their state and have it maintained with the power off. Often users were given three or four “slots” in which to save state. This worked terribly well for most games that needed to save more data. Pictured at right is Nintendo’s Startropics – the save screen is familiar to anyone who’s every played The Legend Of Zelda

Still, battery backups were not flawless. They added cost to the production of the game, which was difficult to justify when saving things like settings or high scores. But even more problematic was when the gaming media of choice shifted from cartridges (which could be read-write) to CD-ROM media (read-only). In a related sense, as games grew and grew, the amount of data that needed to be stored also grew – and battery backup didn’t provide a lot of space.

The answer to this problem – and in a way, where we still stand today – became memory cards, or at least user-controlled storage. Gamers could have a small card that they plugged into their consoles, and the games knew how to interface with them to read and write their data files.

Besides being portable and not associated with any one copy of the game, there’s an added benefit to memory cards. Saves are basically files, so they can be copied between cards, deleted if no longer needed, and with the right software, modified/edited/hacked. The PSP’s memory stick is treated by most computers as just an attached disk, so it’s very easy to backup all of your game saves or load in other people’s saves. At right is a listing of a handful of the 105 saves and add-ons I have backed up from my PSP memory card.

Even arcade games have memory cards now – Konami, Namco, and Sega have multiple games that support small magnetized cards for saving stats and profiles.

The Multi-Gamer Problem

(At this point, the people who game a lot are getting restless with this post – this is all reasonably common knowledge. Stay with me.)

I live in a house where everyone is a gamer. (This includes my cat.) Katie and I both game – me considerably more than her, but she does have her own DS, her own PSP, her own 360 profile, her own PS2 memory cards. Not every game we purchase is shared, but there is a reasonable amount of overlap.

For the PS2, sharing games isn’t a problem, outside of occasionally figuring out which save is hers. The 360 works beautifully – her profile only shows her games and her stats, and nothing of mine. On her PSP, her memory stick contains all of her saves – no problem there.

The DS, on the other hand, is a nightmare for multi-gamer households. This manifests itself in two ways:

First, because it has no internal memory, all games must use battery backup. For reasons that escape me, too many games only offer a single slot. Feel The Magic, Phoenix Wright: Ace Attorney, Mario Kart DS, Meteos, Ouendan, Tetris DS, Point Blank DS, and Cooking Mama (the game that sparked this post) – all only support a single profile. I’m sure there are more; these are just the ones I’ve purchased and can remember. (I’m fairly sure Metroid Prime Hunters and Starfox DS don’t either.)

The response to this might be “Who cares?” – an appropriate response for most gaming complaints, I will admit. What it boils down to is the integrity of my data. I want to know how far I am in the game. I want to see what my best times are. I want to load from where I left off. If someone else wants to borrow these games, they are only able to work off of my game. My records are no longer guaranteed to be my records.

The second manifestation is even more dire; it lies in Nintendo’s Wi-Fi implementation. To connect to other people using Nintendo’s Wi-Fi Connection (or WFC), you have to exchange friends codes, a 12-digit number that is generated based on the game you have in and the DS you’re using.

Having it generate based off the game you’re playing means that for a gamer with fives WFC-capable games, they have five different codes to give to all of their friends, and all of their friends also have five codes. Having it generate based off the DS you’re using means that you can’t go online with a different DS without erasing all of your existing WFC data. (If you’re permanently switching DSes, there is a transfer mechanism, but again, this de-activates the code on the first unit – and this has to be done for each game.)

This is, quite frankly, bullshit. Why is my “account” – and I do use that term very loosely, as very little is stored on the cart – tied to my device, instead of on the server? Why is there an assumption that the game will only ever be used in one handheld, by one unique player?

This Is Ridiculous

It’s hard to deny that the technology world has focused on multi-user systems in the last 10 years. Social networking is big; “collaborative software” actually means something; all major OSes support individual user profiles to great extent.

With multi-user gaming, there are plenty of instances of things going right. Xbox Live, despite the overwhelming population of southern racist teenagers, nails how to do user profiles. It’s in fact one of my favorite features about my Xbox 360. Sony’s standardization on memory cards have made multiple users support a no-brainer for almost all Playstation-family games.

The issues with the DS I’ve listed above are show-stoppers for me. I cannot get the very basic functionality I want out of games I have purchased. There is nothing I can do, short of buying a second copy of any game I intend on sharing.

Worst of all, this is not limited to third parties. I could understand if it was just Taito, or even just Namco or Capcom, but no – Nintendo, alleged savior of the gaming world, is doing this with their AAA titles. It’s their system, and even they can’t get it right. (Maybe this is brilliance on Nintendo’s part. Forcing parents to buy each one of their kids their own copy of Pokemon sure seems like an easy way to sell more games…)

We had games with multiple save slots twenty years ago. We shouldn’t be regressing.

Categories
Explained

Dissecting iPod Games

Over at [random()type](http://www.randomtype.com/?p=190), someone noticed that dropping an iPod game onto Stuffit Expander results in a decompressed bundle.
I have purchased six iPod Games at this point, so I figured some poking around may be useful for the sake of science.

The files are compressed using standard ZIP compression.

# Standard Files

There are a handful of files that are common across all games:

`/Executables/`

This folder contains two files for each game: a .bin file, and a .sinf. The name of the bin file is of the following construction:

`Gamename_PlatformID_PlatformVersion_BuildID.bin`

The name of the sinf file is exactly the same as that of the bin file – include the .bin extension – with an extra .sinf extension.

The .bin is the executable, as shown in the manifest below; the .sinf file appears to have something to do with the FairPlay DRM as my name is recorded in the file.

Nothing useful comes out if you try and run strings on the binary.

`/iTunesArtwork`

This is presumable the “album art” photo that shows up when you view a game in iTunes. [Ben Sinclair noted](http://bensinclair.com/article/whats-inside-an-ipod-game) that it’s a JPEG file.

`/iTunesMetaData`

This file contains resource-fork style data with the metadata that shows up when you get info on a game in iTunes.

`/Manifest.plist`

The manifest file describes all of the files internal to the bundle. All files get a Digest (not md5, can’t determine the algorithm), a Path, and a Size.

There are two extra plist keys used for the binary: one called *DRM* (set to true) and one labeled *Verify* (also set to true).

At the end of the manifest is an array with the key of “Platforms”. This contains keys that we’ve seen before – *BuildID*, *PlatformID*, *PlatformVersion*, and *Size* – as well as ExecutablePath (specifies the binary) and *LaunchingArtwork* (specifies the file to display while the game loads).

`/Manifest.plist.p7b`

This is the PKCS #7 format certificate for the Manifest.plist file. This is undoubtedly to check the integrity of your Manifest.plist. Certificate is signed by the [Apple Root CA](https://www.apple.com/certificateauthority/).

`/Resources/`

The Resources folder is used locally by iTunes to show the help screen when you view it in your library. There is typically a JPEG, which is what displays to the user, as well as an XML file (Description.xml) which basically sets the layout.

Resources contains separate folders for each localization. Note that all the localizations are listed in the manifest, so trying to remove them would probably break your game if iTunes is actively checking the bundle integrity.

# Bundles Tidyness, Audio, and Images

It’s a crap shoot. Some games have very tidy bundles – Apple’s two games in particular – and some are a mess, like Mini Golf.

All of the in-game audio tends to be as a .wav or a .m4a, and there’s no copy protection on them. If you’re dying to hear that Tetris remix somewhere outside the game, well, there you go.

Other files are in a wide range of formats – ipd, pix, raw, lcd5, ro, anm, and so on.

# Strings

## Cubis2

Cubis2 has localized strings files, but without delimiters, it’s difficult to tell what they’re for.

## Mini Golf

Mini Golf’s bundle is a mess because all the course data is loose in the root folder. This includes localizations like hole names. Yeesh.

## Tetris

Tetris has Strings.dta, which is tab delimited and contains all the strings for all the languages. Very easy to read, and amusing to read the rules of Tetris in multiple languages.

## Texas Hold Em

This one was a lot of fun.

Holdem has a Localization folder, and three files full of strings. Apparently there are a number of secret characters – two aliens (one “with a crazy inappropriate name” of BUTCH, on “with big mouth” named MOUTH), three robots, and five dogs – a rottweiler, a bull mastiff, a pug, a bulldog, and in what may be the funniest easter egg I’ve seen from Apple in a while, a chihuahua named BERTRAM. There’s also a secret cheat menu as evidenced in strings.strings,

Also in strings.strings are a list of locations in the game, including an Apple Conference Room, The Dog House, and Zythlgrak (in the Alpha Centauri System, natch).
There’s also a strings file for the tutorial, which includes a number of strings with graphic placement data named things like “DO NOT LOCALIZE ME 16”. This is additionally funny since all of them are preceded with a comment of “do not localize this”. Perhaps I should localize it.

There’s also a string titled “YOU LOST POT”. Snicker.

## Vortex

Vortex has a text.strings file that mentions a cheat mode. Oddly, it’s not constructed at all in the same way as Texas Hold Em, and is considerably less fun.

## Zuma

All of Zuma’s text is in graphic form, so no stringy goodness.

—-

# Summing Up

* Modifying the games is difficult at best, if not impossible, because of the checksumming of every file in the bundle, and then the certificate against the manifest.
* Game resource files, particularly audio, aren’t obfuscated and can be extracted successfully.
* Homebrew is probably an impossibility at this point because of the expectation of a signed cert from Apple.
* The fact that there are platform identifiers in the plists makes me wonder what Apple’s future plans entail. Maybe this would just be for later iPod revisions, or maybe they’re just looking forward. Still, quite interesting.

If you find anything else interesting, let me know, and I’ll add it to the post.