CASC

From wowdev
Revision as of 12:11, 14 October 2014 by Simca (talk | contribs) (There are neither beginnings or endings to the turning of the Wheel of Time. But it was a beginning.)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search

CASC is the name of the new file system that Blizzard has created to replace the outdated format of MPQ.

CASC v1

The CASC file system made its first debut in the Heroes of the Storm Technical Alpha, which was hosted on Blizzard's servers in late January. The form of CASC that Heroes of the Storm uses is designated by Blizzard as "CASC". In contrast, World of Warcraft's "build-playbuild-installer" config line clearly states it is generated by "ngdptool_casc2" (NGDP stands for Next Generation Download Procotol). These are the two most substantial changes between CASC v1 and CASC v2:

  • Sections of CASC v1 data files are grouped together in collections of files we call "packages". These packages all have the same root folder, and if all of the files are not properly added with the package's base directory, the extraction process will produce an incredibly mangled directory output.
  • CASC v1's root file relates content hashes to file names. CASC v2's root file relates content hashes

The remainder of this article will refer exclusively to the system called CASC v2. While many parts of the file system are identical between v1 and v2, there are enough changes to make explaining both formats at once inadvisable.

NGDP

CASC was introduced simultaneously with a new system for managing configuration, blob, and installation files called NGDP, or Next Generation Download Protocol. When the acronym 'NGDP' is used in conjunction with the term CASC, it is typically referring to the hosted components of the CASC file system, and its ability to stream data on the fly.

NGDP URLs

CASC Online

Standard URL Hash Format

URL Format: http://cdnsHost/cdnsPath/config/FirstTwoHexOfHash/SecondTwoHexOfHash/FullHash Example URL: http://dist.blizzard.com.edgesuite.net/tpr/wow/config/5b/27/5b277d732299a79a935bc5a3f6ed3240

Config Files

Build Config

Example file: http://dist.blizzard.com.edgesuite.net/tpr/wow/config/4d/8b/4d8bb3b6fd0416aa9371a80aaefd2e93

CDN Config

Example file: http://dist.blizzard.com.edgesuite.net/tpr/wow/config/5b/27/5b277d732299a79a935bc5a3f6ed3240

Patch Config

This configuration file was added after all of the others. It first appeared in CASC v1 for Heroes of the Storm in August 2014. It then appeared in WoW for CASC v2 around build 19000 (approximately October 1st, 2014). The purpose of this file is to reduce redundant downloads. It achieves this by directing the system to download patch files to apply and update previously downloaded material. The structure and purpose of all of the fields of this file are unknown at this time.

Data Files

Patch Files

File signature = "PA" The structure and purpose of all of the fields of this file are unknown at this time.

States of CASC Data

Blizzard-Created Archives

In its natural state, the vast majority of the data for any CASC-based game exists in the archives. These are compressed files roughly 256 MB in size, hosted on Blizzard's CDNs. They follow the standard URL hash format. The archives are defined in the

.INDEX Files

Archive-Group

Archive-group is actually a very special '.index' file. While virtually all '.index' files are under 2 MB, the archive-group '.index' file is always over 15 MB. It is essentially a merger of all .index files

Archives

Journal-based Data Files

During the installation process for a Blizzard game, the program will download the required files as requested by root, encoding, download, and install. It stores the downloaded data fragments in data files in "INSTALL_DIR\Data\data\". The program will record the content hash (BLTE-compressed hash), size, and position of the file as well as the number of the data file that it is in. It places those four parameters into journal files with the extension '.idx'.

.IDX Journals

Example file path: INSTALL_DIR\Data\data\0e00000054.idx

.XXX Data Files

Example file path: INSTALL_DIR\Data\data\data.015