Code Monkey home page Code Monkey logo

hozuki / libcgss Goto Github PK

View Code? Open in Web Editor NEW
87.0 8.0 8.0 495 KB

libcgss is a helper library for THE iDOLM@STER Cinderella Girls Starlight Stage (CGSS/DereSute/デレステ). It currently supports HCA audio decoding and ACB exploring. It also applies to other games like THE iDOLM@STER Million Live! Theater Days (MLTD/MiriShita/ミリシタ).

License: Other

C++ 81.74% C 6.46% CMake 2.89% Java 6.09% PowerShell 2.81%
cgss hca deresute idolmaster-cinderella-girls decoder acb hca-decoder criware mltd mirishita

libcgss's Introduction

libcgss

libcgss is a helper library originally for THE iDOLM@STER Cinderella Girls Starlight Stage (CGSS). It provides both C and C++ API for HCA audio and ACB archive manipulation.

AppVeyor GitHub contributors Libraries.io for GitHub GitHub (pre-)release Github All Releases

The project consists of a library (libcgss) and several other applications.

  • Library (libcgss)
  • Applications
    • hcaenc (obsolete): HCA encoder. Requires hcaenc_lite.dll[1]. C# equivalent
    • hcacc: HCA cipher converter. C# equivalent
    • hca2wav: HCA decoder. C# equivalent
    • hcainfo: HCA info viewer.
    • utftable: UTF table schema explorer, similar to utf_tab.
    • acbunpack: ACB archive unpacker. C# equivalent
    • acb2wavs: Batch converter for HCAs in ACB. C# equivalent
    • acb2hcas: Batch exporter for HCAs in ACB. Generates companion .hcakey files for vgmstream.
    • hcaenc: HCA encoder based on VGAudio/VGAudio-CPP. Does not rely on hcaenc_lite.dll.
    • hcadec: HCA decoder based on VGAudio/VGAudio-CPP.

Related projects:

  • This project has a sister project DereTore. However the strength of C API is better interoperability with other libraries. The pure C# version of hcaenc and hcacc can be found in DereTore as applications.
  • If you are looking for a faster HCA decoder with higher definition for *NIX and you are a DIY person, have a look at this.
  • If you are looking for a small native application for HCA encoding/decoding, have a look at this.

[1] Download ADX2LE from here, and use the DLL located at tools\hcaenc_lite.dll.

Downloads

Examples

Have a look at some examples here.

C# users can write a P/Invoke wrapper to utilize the C interface.

Building

Requirements:

  • General:
    • CMake (>=3.2)
  • Windows:
    • MSVC (>=14.0, VC++ 2015)
  • macOS and Linux:
    • GCC (>=6.0)

Steps:

  1. Run PowerShell script: scripts/configure-cmake.ps1;
  2. Run PowerShell script: scripts/build-project.ps1;

Artifacts can be found in bin directory.

More information:

API & Manual

API definition can be found at docs/api/cgss-api.md.

User manual can be found at docs/manual/user-manual.md.

License

MIT License. See LICENSE.md.

Disclaimer

See DISCLAIMER.md.

Notes

More tech details can be found in Behind the Scenes.

libcgss's People

Contributors

estertion avatar hozuki avatar towa0131 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

libcgss's Issues

Failed decryption and inconsistencies between libcgss and DereTore

I've been using this library and DereTore for extracting sound files from Shadowverse (another Cygames project which also uses the key 00003657 F27E3B22). I was updating my scripts for the new CriWare setup, but I had some errors with file decryption. Most files work fine either way, but I found some files which error on one or the other method.

I was able to decrypt this with DereTore but libcgss picks up the wrong number of internal wav files and outputs garbage: (there are four wav files and they sound something like a sick elephant)
vo_900841090.zip

I was able to decrypt this with libcgss but DereTore outputs an index access error: (there is one wav file with someone saying "Good work")
vo_708_000_004.zip

acb2wavs doesn't support looping?

Hello
I don't think acb2wavs supports looping or am I doing something wrong?
A track from Dragalia Lost gets outputted with a length of 1:29 when its actually meant to be 3:25.
I've attached the acb and awb files that I tried with.
raid.zip

Compatibility issue when one Cue has multiple sub wav files

当一个 cue 对应多个 wav 文件时,文件命名会发生错位。一般来说一个 cue 是对应一个 wav 文件的,但我这里遇到了一种 ACB+AWB+XML 的打包方式,可能是通过 XML 里的信息来定位的。

Snipaste_2020-04-13_13-29-38
比如上图的 CueID 92prd_cv_0001_prf01 对应 4 条音轨,但是只会将一个文件命名为 prd_cv_0001_prf01 下一个文件会被命名为 CueID 93 对应的文件名,导致 3 个文件的偏移。但只影响显示,不影响最终输出的音频。

本来是想通过自己写一个程序解决的,但是发现导出的 wav 文件数和 XML 中总音轨数不符。( #10 )

cv_0001.zip
-b 00000000 -a C59E7114

Feature: Add prefix to Cue name

Snipaste_2020-04-19_10-35-16
之前我犯蠢了,说成了 174 个,但其实是 131 个,和 "有名字的" cue 数量一致。所以是给 131 个命了名的文件加前缀,剩下没命名的暂时就不管了。

Not all HCA files are exported from ACB

对同一个 ACB 文件进行解包时,acb2hcas 导出了 170 个 hca 文件,而 VGMToolbox 导出了 174 个文件。
按照软件的命名顺序,缺失了 prd_cv_0001_coop_0022_08.hca prd_cv_0001_send_0153_01.hca prd_cv_0001_send_0153_02.hca prd_cv_0001_send_0153_03.hca 四个文件。

cv_0001.zip
-b 00000000 -a C59E7114

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.