One thing I find interesting about technology is that sometimes a trivial technological thing has huge differences to the end user.
I’ve been playing Grand Theft Auto a bit in my spare time, on the Xbox 360. After re-arranging some things, I’ve run into a strange problem where, when I power it up, it loads older game files, not the newest. I know exactly what’s wrong, but it’s kind of like the “roger tone” to “FRS” leap–intuitively understanding what’s wrong here borders on savantism.
When I rearranged things, I didn’t bother to plug the Xbox back into my switch. I think the cable it was using is out in another room right now. So the Xbox has no Ethernet connection. Are you seeing why my game loads really old saved data yet? Hint: the game doesn’t use the network in any way, shape, or form.
The Xbox, when it’s connected to the Internet, will grab the correct time via the web. (I’ve wondered about this, actually: is it using NTP? Is it syncing to time.windows.com? I’ve been tempted to try packet sniffing, but it would basically require ARP poisoning, which I’m reluctant to do right now, as both the Xbox and my laptop are essentially on the school’s network, so it wouldn’t be too easy to “safely” do it.)
For some reason, though, when shut down, the Xbox never runs a “systohw” call (or at least, that’s what it is under UNIX) — the system clock, which was just synchronized and is quite accurate, is never written to the hardware clock. So two weeks ago, when I booted my Xbox, it was March 14, 2008. I saved a game, shut down the console, and went to bed. And then I rearranged stuff and realized that there was no reason for my Xbox to be online, so I moved the cable to the common room.
So the Xbox, now booting with no Internet connection, thinks it’s November of 2006, since the software clock never got committed to hardware. And the game, not anticipating bizarre things like this, automatically loads the game with the newest timestamp. As far as it’s concerned, the game I saved two weeks ago is a year and a half “newer” than what I saved earlier today.
So there you have it — whether I have an Ethernet cable hooked up or not changes the year on my Xbox, which causes it to load old games. And it’s all because the Xbox, for reasons I can’t understand, never writes the time to the hardware clock. (To me, this is a bug, and one that would require adding one line of code.) And it shows something neat (or scary, depending on your perspective) about programming — trivial details (like whether you sync the hardware clock to the software clock when you shut down) manifest in entirely unexpected ways, like which save file my video game opens.
Kyle’s pointed out, and I’ve just confirmed, that the time is “saved” in a volatile way. If you power the Xbox off, it retains the time. But when you unplug it entirely, it loses its time and seems to restore to a generic start date, suggesting that it has no proper clock battery?
So then it’s not so much a “bug” as a “design flaw,” although I admit that “Retains time when unplugged” is about #351 of things I look for in a console, so it’s hardly a big deal.