Patching Files: Difference between revisions

From wowdev
Jump to navigation Jump to search
No edit summary
No edit summary
Line 19: Line 19:


althought it shows "BSDIFF40" in it's header, but it is not a bsdiff?
althought it shows "BSDIFF40" in it's header, but it is not a bsdiff?
-- chuanhsing
----------------
I got some information about files in pre-download mpq. All files
inside it are "patch" files.
Followings are for binary/new patch header:
  4bytes: signature,
  * 0x01040018 means binary patch
  8 bytes: unknown, always 8 bytes 0x00
  4 bytes: file size n
  6 bytes: unknown
  2 bytes: always 0xc8 0x01
  n bytes: the real thing
Followings are for plain text patch header:
  4bytes: signature,
  * 0x04040018 means plain text patch
  8 bytes: maybe timestamp
  4 bytes: file size
  8 bytes: maybe timestamp
  4 bytes: file size
  1 byte: unknown
  8 bytes: signature, "BSDIFF40"
  n bytes: unknown
For the new files, I can skip heading 24 bytes and get the real
thing! But I still can't understand the things after BSDIFF40.


-- chuanhsing
-- chuanhsing

Revision as of 04:00, 23 July 2009

For updating files WoW uses bsdiff. Have a look at "http://www.daemonology.net/bsdiff/" or "http://www.pokorra.de/coding/bsdiff.html"


I had try bsdiff, but it doesn't work.

 1. extract achievement.dbc from enUS\DBFilesClient in Patches\WoW-3.1.3-to-3.2.0-enUS-Win-patch\wow-partial-1.MPQ
 2. rename it to achievement.dbc.patch (45K)
 3. extract achievement.dbc from DBFilesClient in Data\enUS\patch-enUS-2.MPQ
 4. rename it to achievement.dbc.old
 5. bsdiff
   usage: bspatch.exe oldfile newfile patchfile
 6. bsdiff chievement.dbc.old achievement.dbc achievement.dbc.patch
   Corrupt patch
 7. extract achievement.dbc from DBFilesClient in PTR:Data\enUS\patch-enUS-2.MPQ
 8. rename it to achievement.dbc.ptr
 9. bsdiff achievement.dbc.old achievement.dbc.ptr achievement.dbc.patch-ptr (20K)

althought it shows "BSDIFF40" in it's header, but it is not a bsdiff?

-- chuanhsing


I got some information about files in pre-download mpq. All files inside it are "patch" files.

Followings are for binary/new patch header:

 4bytes: signature,
 * 0x01040018 means binary patch
 8 bytes: unknown, always 8 bytes 0x00
 4 bytes: file size n
 6 bytes: unknown
 2 bytes: always 0xc8 0x01
 n bytes: the real thing

Followings are for plain text patch header:

 4bytes: signature,
 * 0x04040018 means plain text patch
 8 bytes: maybe timestamp
 4 bytes: file size
 8 bytes: maybe timestamp
 4 bytes: file size
 1 byte: unknown
 8 bytes: signature, "BSDIFF40"
 n bytes: unknown

For the new files, I can skip heading 24 bytes and get the real thing! But I still can't understand the things after BSDIFF40.

-- chuanhsing