Skip to content

HCA Decoder

George (Tong) Wu edited this page Apr 24, 2019 · 2 revisions

HCA decoder is used to decode HCA files to WAV files. Generated WAV files will always be 16-bit stereo, 44100 Hz.

Usage

hca2wav.exe <input HCA> [options]

Options:

  -o, --out             Output file name
  -a, --key1            (Default: f27e3b22) Key 1 (8 hex digits)
  -b, --key2            (Default: 00003657) Key 2 (8 hex digits)
  --infinite            (Default: False) Enables infinite loop
  -l, --loop            (Default: 0) Number of simulated loops
  -e, --no-header       (Default: False) Do not emit wave header
  --overrides-cipher    (Default: False) Overrides original cipher type
  -c, --cipher          (Default: 0) Overridden cipher type
  --key-mod             (Default: 0) Key modifier (for ACB v1.30+)

Arguments

  • Input HCA: The HCA file to decode.
  • Output WAV: The WAV file to write to. If not specified, it is default to the name of HCA file with the .wav extension (i.e. "abc.hca"→"abc.wav").
  • Key 1, Key 2: The cipher keys. These are only used when cipher type is 56 (0x38). If not specified, their values correspond to CGSS's keys.
  • Overrides cipher type: Enables cipher type override. It is disabled by default, and the cipher type is read from the HCA file. You should not turn this on unless you know exactly what you are doing.
  • Overridden cipher type: The overridden cipher type. Possible values are 0, 1, and 56. It only works when cipher type override is enabled.
  • Infinite: Enables infinite loop. Experimental, DO NOT USE.
  • Loop count: Number of simulated loops. It is used only when the HCA file contains looping information. If not specified, the count is 1 so that generated WAV sounds as if the original HCA is not looped.
  • No WAV header: Generated WAV file will not contain a WAV header, only PCM blocks. Disabled by default.

Examples

hca2wav some_hca.hca
hca2wav some_hca.hca -a 01234567 -b 89abcdef
hca2wav some_hca.hca -a 01234567 -b 89abcdef --key-mod a1b2
hca2wav some_hca.hca -o other_wav.wav --overrides-cipher -c 0
Clone this wiki locally