Previous Page | Next Page

by furrybob at 7:30 PM EDT on September 21, 2017
@bnnm
Yeah, that does seem a little hacky, but hey, it works.

HCA is more complex than most video-game-specific audio codecs. MDCT-based codecs aren't used too often. I can think of ATRAC9 and HCA off the top of my head.

If you had trouble with VGAudio's HCA code, you could always consult the clHCA.c used in vgmstream =P

I've learned a lot from REing ATRAC9, and I plan on revisiting HCA to improve the code and write documentation for the format.

The code in vgmstream isn't just bad, it's wrong in a few places, so it's been on my todo list to port my decoder, but who knows when/if I'll get around to that.

@kode54
I don't mean decrypting when I say unpack. I mean it in the same way as an MP3 frame would be unpacked.

If you decrypt the frame with an invalid key and then unpack the frame, it usually won't unpack successfully, making it a perfect (almost) test for valid keys.

edited 7:36 PM EDT September 21, 2017
by bnnm at 10:05 AM EDT on September 22, 2017
@furrybob - more/better codecs are always welcome :)
Most codec theory is beyond my skill unfortunately, but I'm all for accuracy.

MDCT I'd say it's quite common with ogg/at3/mp3/xma around though.
One thing I wonder though, as you can find ATRAC3 even in PS2 games, or hardware-decoded, I'm guessing that various implementations sacrify some accuracy for speed? Ex. I believe Wwise used fixed-point Vorbis, that stuff could be documented.

Also vgmstream's clHCA (now found here) doesn't use the latest version, it's possible they fixed stuff.
I know of one example that decodes wrong (very muffled) vs CRI's tools though didn't try the latest.
by furrybob at 10:36 AM EDT on September 22, 2017
@bnnm
Do you happen to have a link to that sample that doesn't decode correctly?

MDCT is quite common, but less so for codecs created specifically for video game audio. XMA must have slipped my mind earlier. I'm surprised nobody's publicly RE'd that codec yet.

by bnnm at 11:23 AM EDT on September 22, 2017
@furrybob - example. It's an HCA inside an AIX though. Now that I think about it maybe I compared vs an earlier HCA decoder instead of CRI tools; sounds strange with clHCA anyway.

I see what you mean now. XMA doesn't even qualify then, since it's just WMA Pro with very minor config.

A note, FFmpeg's WMA Pro/XMA decoding seems very accurate, comparing waveform/samples (maybe they just RE'd xmaencode.exe or xWMAEncode.exe), but gets wrong sample counts (encoder delay, last frame). While FFmpeg's ATRAC3 seemed not very accurate, and ATRAC3plus was ok-ish.
by furrybob at 1:25 PM EDT on September 24, 2017
Oh, I wasn't aware that FFmpeg supported XMA files.

As for that sample, it's using HCA version 1.1. Recent CRI SDKs refuse to decode any HCA files of version 1.1 or below, or of a version above 2.0. Forcing it to decode the file results in audio similar to the audio that VGAudio produces for that file.
Edit: That is, the audio sounds choppy.

I haven't run across any HCA files below version 1.2 before, so I'll have to look into that sometime.

edited 12:37 PM EDT September 25, 2017
by Swiftie24 at 5:12 PM EDT on September 24, 2017
A bit late , but thank you so much @bxaimc

I found a converter. It helped me with a sound replacement in a 3DS game.
by furrybob at 8:26 PM EDT on September 25, 2017
@Bnnm
I noticed your comment here.

HCA encryption keys are only 56-bits, hence the 56 in the Cipher Type field of encrypted HCA files' headers. That's why the keys work the same.

edited 8:26 PM EDT September 25, 2017
by bnnm at 4:02 PM EDT on September 26, 2017
Good to know. Since the person posting HCA keys in 2ch (clHCA author, user here ssh too?) gets keys directly from code and have the upper bits, I assume they are part of the key even if unused.
Tokyo Ghoul: Re Invoke .ACB and .HCA sound issue by TheGoldenChild at 7:59 PM EDT on September 26, 2017
Man, how are you all evening finding the codes? I try to go through an .ACB, extract the files convert to .Bin but when its finally converted I get a garbled mess.

http://www.mediafire.com/file/66bgk5i3gvlur87/TK_VO_53_IBF2_00000000.hca

The only place that has something sensible is the .ACB file when it comes to the top lines.

https://i.imgur.com/GPw5ncC.png

Anything out of that when in HxD it looks odd.

by datschge at 8:32 PM EDT on September 26, 2017
@TheGoldenChild - As the games need to know the key to decrypt the audio for playback the key must be stored somewhere, usually close to where the audio code is initialized. That was quite easy to track down in older games, though I admit I haven't had luck with these newer Unity games unfortunately.

Previous Page | Next Page
Go to Page 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36

Search this thread

Show all threads

Reply to this thread:

User Name Tags:

bold: [b]bold[/b]
italics: [i]italics[/i]
emphasis: [em]emphasis[/em]
underline: [u]underline[/u]
small: [small]small[/small]
Link: [url=http://www.google.com]Link[/url]

[img=https://www.hcs64.com/images/mm1.png]
Password
Subject
Message

HCS Forum Index
Halley's Comet Software
forum source