Code Monkey home page Code Monkey logo

pycricodecs's Issues

Having trouble with a cpk file from a 3DS game

NOTE: This issue has been fixed.
Only one issue remains for Style Savvy: Styling Star. See my next post for more info.

As this tool seems to be more up to date than others, I thought I might have a better luck here.

I'm having trouble with a cpk file (character_motion.cpk) from a Nintendo 3DS game called Style Savvy: Styling Star.
Whenever I use a newly created one by this tool or others (CriPakTools and YACpkTool), the game is unable to boot, and stays on black screens.

I've tried all of the CPK modes from 1-3 (0 refused to work, due to an error related to the compress flag), with and without compression, and even forcing Tver to CPKMC2.49.32, DLL3.24.00, all with no luck.
In addition, the extraction feature only extracts the first 445 files out of the 3,570 files from the cpk file.

To look into the file, download it here: https://www.dropbox.com/s/gqpagh7fa311fo7/character_motion.cpk?dl=1

Inside the file are only ID-numbered files with no filenames.
The header is structured like this in the file, and doesn't seem to match what's currently in the source code for the CPK modes.

UpdateDateTime
FileSize
ContentOffset
ContentSize
TocOffset
TocSize
TocCrc
HtocOffset
HtocSize
EtocOffset
EtocSize
ItocOffset
ItocSize
ItocCrc
GtocOffset
GtocSize
GtocCrc
HgtocOffset
HgtocSize
EnabledPackedSize
EnabledDataSize
TotalDataSize
Tocs
Files
Groups
Attrs
TotalFiles
Directories
Updates
Version
Revision
Align
Sorted
EnableFileName
EID
CpkMode
Tvers
Comment
Codec
DpkItoc
EnableTocCrc
EnableFileCrc
CrcMode
CrcTable

Extracted HCA from USM can't be decoded

When trying to decode a HCA I extracted from an USM (Lost Judgment opening), the audio file can't be decoded:
ValueError: Header decoding error, the header is not a valic HCA header.
I also tried playing the audio file in foobar2000 with vgmstream plugin, it resulted in silence. However, when extracting the USM with VGMToolbox, the resulting HCA was smaller and played properly in foobar2000. PyCriCodecs still couldn't decode it, however.

I noticed the header for both HCAs is the same, the differences happen later on. I attached the two audio files I tested with.
files.zip

Extracting audio from a multi track USM combines the tracks

I tried extracting USMs from Judgment, which uses ADX for USM audio. They use 2 audio tracks - one for Japanese audio and one for English audio. The extracted files seem to cut off early, sound laggy and have both tracks combined when played in foobar2000.
If I use PyCriCodecs to decode the ADX, it's just a mess. I attached an ADX file where it happens. If needed, I can also send the USM.

Summary_p02.wav.adx.zip

Asking for DM

Hey Author, could we talk in DM ? Twitter @iseriously_ (or Discord : iSeriously#0001) thanks!

.ADX encoding loop / DC

Regardless of specifying loop points or not in .WAV via SMPL chunk, the resulting ADX won't loop on Dreamcast.

Doesn't compatible on linux aarch64

Always ended up on failed installation.

OS: Ubuntu 22.04.2 LTS
Arch: aarch64
Kernel: 6.2.1-PRoot-Distro

In file included from CriCodecs/CriCodecs.cpp:4:
CriCodecs/adx.cpp: In function ‘bool Decode(int*, unsigned char*, AdxHeader, int*)’:
CriCodecs/adx.cpp:126:19: error: ‘_byteswap_ushort’ was not declared in this scope
  126 |         int scale=_byteswap_ushort(*(unsigned short *)s);s+=2;
      |                   ^~~~~~~~~~~~~~~~
In file included from CriCodecs/CriCodecs.cpp:4:
CriCodecs/adx.cpp: In function ‘PyObject* AdxEncode(PyObject*, PyObject*)’:
CriCodecs/adx.cpp:276:26: error: ‘_byteswap_ushort’ was not declared in this scope
  276 |                 bscale = _byteswap_ushort(12 - power);
      |                          ^~~~~~~~~~~~~~~~
CriCodecs/adx.cpp:250:17: warning: unused variable ‘md’ [-Wunused-variable]
  250 |             int md = 0;
      |                 ^~
CriCodecs/adx.cpp:251:17: warning: unused variable ‘y’ [-Wunused-variable]
  251 |             int y=0;
      |                 ^
CriCodecs/adx.cpp:225:18: warning: unused variable ‘count_forout’ [-Wunused-variable]
  225 |     unsigned int count_forout = 0;
      |                  ^~~~~~~~~~~~
CriCodecs/adx.cpp: In function ‘PyObject* AdxDecode(PyObject*, PyObject*)’:
CriCodecs/adx.cpp:312:13: error: ‘_byteswap_ushort’ was not declared in this scope
  312 |     data += _byteswap_ushort((header.dataoffset))+4;
      |             ^~~~~~~~~~~~~~~~
CriCodecs/adx.cpp:313:26: error: ‘_byteswap_ulong’ was not declared in this scope
  313 |     header.samplecount = _byteswap_ulong(header.samplecount);

Installation issues over PIP

Hello! I've had problems trying to install the WHL package via pip. It seems to be some kind of incompatibility:
ERROR: PyCriCodecs-0.2.0-cp39-cp39-win_amd64.whl is not a supported wheel on this platform.

The install command is:
pip install PyCriCodecs-0.2.0-cp39-cp39-win_amd64.whl

My current version of pip and python is as follows:
pip 22.2.2 from C:\Users\[MY_USER]\AppData\My_Programs\Python\lib\site-packages\pip (python 3.10)

My platform architecture is 64-bit and OS is Windows 11.

I also tried downloading the code from the repository, but I get an error asking to install "Microsoft Visual C++ 14.0 (or later)".
What am I doing wrong?

ModuleNotFoundError: No module named 'CriCodecs'

Hi,

I followed the install instructions and tried to run the examples provided, but I got a ModuleNotFoundError.

I tried installing the setup.py in CriCodecs folder, but that also failed for me.

Is there anything I'm missing?

Thanks!

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.