Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

How do I make a hca file header that is a C8 C3 C1 file? #55

Open
huashao2019 opened this issue May 24, 2019 · 2 comments
Open

How do I make a hca file header that is a C8 C3 C1 file? #55

huashao2019 opened this issue May 24, 2019 · 2 comments

Comments

@huashao2019
Copy link

I extracted some hca from the game, I found that their file headers are C8 C3 C1, now how do I generate such a file, the file headers I make using hcaenc are 48 43 41

Test hca download link https://www.lanzous.com/i4a3upc

@hozuki
Copy link
Member

hozuki commented May 31, 2020

The headers are simply XORed with 0x80. You can write a simple program, or use any hex editor to do that. By the way, most HCA decoders accept both c8 c3 c1 and 48 43 41.

@segfault-bilibili
Copy link
Contributor

I think what you generated was simply unencrypted HCA, while the HCA extracted from the game is encrypted - therefore you should then encrypt your generated HCA with correct key (otherwise you'll get incorrect waveform, which sounds like unpleasant noise) if you want to replace such audio resource in the game.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants