Jump to content
Setting up an AI agent? ReverseEngineering.wiki skill (works from the command line, no configuration): https://reverseengineering.wiki/skill/rewiki/SKILL.md · setup for every client, including MCP: https://reverseengineering.wiki/llms.txt · REWiki:Connect

Format:HCA

From ReverseEngineering.wiki
Format
Developer CRI Middleware
Magic HCA\0 (masked by 7F7F7F7F if encrypted)
Extensions .hca
Endianness big
License proprietary; readers: vgmstream (ISC), VGAudio
On this wiki Facts · Code · Notes · Topics

CRI's DCT audio codec/container (.hca) of ADX2/Atom: magic HCA, big-endian header with chunks fmt, comp (or dec), vbr, ath, loop, ciph, rva, comm, pad, a CRC16, then fixed-size frames; versions 1.1 to 3.0 (0x0101 to 0x0300).

Layout

Big-endian. Header: HCA\0, u16 version (0x0101 V1.1, 0x0102 V1.2, 0x0103 V1.3-1.4, 0x0200 V2.0, 0x0300 V3.0), u16 header size, then chunks that must come in a fixed order; each chunk's 4-char tag is stored with bit 7 of every byte set when the file is key-encrypted (hence the 7F7F7F7F mask): fmt\0 (u8 channels, u24 sample rate, u32 frame count, u16 encoder delay, u16 padding), comp (v2+: u16 frame size, min/max resolution, track count, channel config, band counts, HFR group, MS stereo) or dec\0 (v1), vbr\0, ath\0, loop (start/end frame, start delay, end padding), ciph (u16 type: 0 none, 1 key-less, 56 keyed), rva\0 (float volume), comm (comment), pad\0. The header ends with a CRC16 that checks the whole header (CRC of the header bytes is 0). Frames follow, each frame size bytes with a CRC16 and a bit-packed DCT payload (CBR). See Fact:HCA/struct/HCA header chunks.

Library versions

The CRI decoder identifies itself with the string 'HCA Decoder (Float)' and a version; vgmstream's clHCA comment lists known versions: V1.1 (2011), 1.2, Ver.1.40 (2011-04, header mask), Ver.2.00.02 (2012-06), Ver.2.06.05 (2018-12, subkey API), Ver.3.01.00 (2020-11), Ver.3.02.02 (2021, ambisonics), Ver.3.04.01 (2024), Ver.3.10.00 (2025). The header version changes only when the decoding changes. Useful to date the middleware a game was built with.

Encrypted HCA needs a per-game key (plus an optional 16-bit subkey from the AWB); not published here.

Related

Library:CRIWARE, Format:AFS2 (AWB), Format:ADX.

Evidence & references

  • vgmstream commit db77f98f405a45ad08df98aa444cae3848f95e6c (ISC): src/coding/libs/clhca.c lines 28-80 and 696-900, src/meta/hca.c.