tags:

views:

770

answers:

3

You have a static medium, a cd, so you can't change any files on it. So how do the updates work? I understand there is come code that runs and checks if the version isn't correct, and then downloads a patch if needed, but how does that path get integrated into the game?

Is there a bit of "update checking" that checks for patch files and loads them up? If that's the case, how do they design the code so that the developers can fix problems that were unforseen?

A: 

If you had an application that has an .exe file that is used to run the application or maybe some .dll files. How would you update your program? Why not just replace those files with newer versions and use them instead?

Maybe check a timestamp on the files saved to the hard drive rather than the files on the CD?

Peter D
What if the files you need to change are on the CD?
scottm
Then you put the newer version on the hd and make sure the search path checks it first.
jsight
+1  A: 

At a complete guess, I would say that simply by inserting a game into the Xbox, it saves a Manifest of some description to the HardDisk, or some flash memory medium in the box that maintains a list of Library versions & their location (either on CD or some path on the XBox HD)

When an update comes down, it would update that manifest file to say.

"When launching this game, use library X v1.1 from the HardDisk instead of libary X v1.0 from the CD."

Eoin Campbell
This would be my assumption as well - especially since the XBox360 hard disc is optional.
Rob Allen
So, every library in the game would be loaded manually, even if there aren't any patches currently?
scottm
xbox games don't use "updateable" libraries (except to interface with the system/dashboard); everything is statically linked into the executable
arolson101
+3  A: 

The patch contains a delta-compressed executable and any new data that that executable might need. The Xbox 360's executable loader checks for the patch (via the game's title id), and, if found, loads the old executable into memory, then modifies it in-memory with the delta-compressed version. (The process of making a delta-compressed executable can take upwards of an hour, but the resulting executable size is well worth it).

Microsoft doesn't supply any tools to patch data. Any updated data will also be in the patch, but it will be up to the executable to look for it in an "update" area and apply it appropriately.

As mentioned, the patch needs to be stored somewhere- it can be either on the hard disc or on a memory card. If on the memory card, it will be put into the 8MB system-reserved area (patches are encouraged to be <4MB, so that 2 patches can be stored on a memory card; this can be exceeded with permission from Microsoft).

All patches must be cumulative- if you update a title to version 1.1, when you come out with version 1.2 it must contain all the changes from 1.1.

arolson101