mirror of
https://github.com/vgmstream/vgmstream.git
synced 2025-01-23 23:04:05 +01:00
Merge pull request #1240 from bnnm/ymz-etc
- Add TXTH codec "YMZ" [VJ: Visual & Music Slap (AC)] - Add HCA key - Fix some Ogg Opus loops [Kuro no Kiseki (PC)] - Add .cads extension [Drakengard (PS2)]
This commit is contained in:
commit
845961bb1a
@ -523,7 +523,7 @@ static void replace_filename(char* dst, size_t dstsize, cli_config* cfg, VGMSTRE
|
|||||||
subsong = 0; /* for games without subsongs / bad config */
|
subsong = 0; /* for games without subsongs / bad config */
|
||||||
}
|
}
|
||||||
|
|
||||||
if (vgmstream->stream_name && vgmstream->stream_name[0] != '\0') {
|
if (vgmstream->stream_name[0] != '\0') {
|
||||||
snprintf(stream_name, sizeof(stream_name), "%s", vgmstream->stream_name);
|
snprintf(stream_name, sizeof(stream_name), "%s", vgmstream->stream_name);
|
||||||
clean_filename(stream_name, 1); /* clean subsong name's subdirs */
|
clean_filename(stream_name, 1); /* clean subsong name's subdirs */
|
||||||
}
|
}
|
||||||
|
@ -69,10 +69,12 @@ This guide is mainly geared towards beginner devs, introducing concepts in steps
|
|||||||
Common C compiler, most development is done with this.
|
Common C compiler, most development is done with this.
|
||||||
|
|
||||||
On **Windows** you need one of these somewhere in PATH:
|
On **Windows** you need one of these somewhere in PATH:
|
||||||
- MinGW-w64 (32bit version): https://sourceforge.net/projects/mingw-w64/
|
- MinGW-w64 (32bit version), in any config (for example: gcc-8.1.0, i686, win32, sjlj)
|
||||||
- Use this for easier standalone executables
|
- Use this for easier standalone executables
|
||||||
- [Latest online MinGW installer](https://sourceforge.net/projects/mingw-w64/files/Toolchains%20targetting%20Win32/Personal%20Builds/mingw-builds/installer/mingw-w64-install.exe/download) with any config should work (for example: gcc-8.1.0, i686, win32, sjlj).
|
- [Sourceforce project](https://sourceforge.net/projects/mingw-w64/)
|
||||||
|
- [Latest online MinGW installer](https://sourceforge.net/projects/mingw-w64/files/Toolchains%20targetting%20Win32/Personal%20Builds/mingw-builds/installer/mingw-w64-install.exe/download).
|
||||||
- Or download and unzip the [portable MinGW package](https://sourceforge.net/projects/mingw-w64/files/Toolchains%20targetting%20Win32/Personal%20Builds/mingw-builds/8.1.0/threads-win32/sjlj/i686-8.1.0-release-win32-sjlj-rt_v6-rev0.7z/download)
|
- Or download and unzip the [portable MinGW package](https://sourceforge.net/projects/mingw-w64/files/Toolchains%20targetting%20Win32/Personal%20Builds/mingw-builds/8.1.0/threads-win32/sjlj/i686-8.1.0-release-win32-sjlj-rt_v6-rev0.7z/download)
|
||||||
|
- Or get from [alt builds](https://github.com/niXman/mingw-builds-binaries/releases/) (may be more recent versions)
|
||||||
- MSYS2 with the MinGW-w64_shell (32bit) package: https://msys2.github.io/
|
- MSYS2 with the MinGW-w64_shell (32bit) package: https://msys2.github.io/
|
||||||
- Resulting binaries may depend on `msys*.dll`.
|
- Resulting binaries may depend on `msys*.dll`.
|
||||||
|
|
||||||
|
69
doc/TXTH.md
69
doc/TXTH.md
@ -74,9 +74,7 @@ as explained below, but often will use default values. Accepted codec strings:
|
|||||||
# - HEVAG Vita/PS4 ADPCM
|
# - HEVAG Vita/PS4 ADPCM
|
||||||
# * For some Vita/PS4 games
|
# * For some Vita/PS4 games
|
||||||
# * Interleave is multiple of 0x10 (default)
|
# * Interleave is multiple of 0x10 (default)
|
||||||
# - XBOX Xbox IMA ADPCM (mono/stereo)
|
#
|
||||||
# * For many XBOX games, and some PC games
|
|
||||||
# * Special interleave is multiple of 0x24 (mono) or 0x48 (stereo)
|
|
||||||
# - DSP|NGC_DSP Nintendo GameCube ADPCM
|
# - DSP|NGC_DSP Nintendo GameCube ADPCM
|
||||||
# * For many GC/Wii/3DS/Switch games
|
# * For many GC/Wii/3DS/Switch games
|
||||||
# * Interleave is multiple of 0x08 (default), often +0x1000
|
# * Interleave is multiple of 0x08 (default), often +0x1000
|
||||||
@ -84,6 +82,7 @@ as explained below, but often will use default values. Accepted codec strings:
|
|||||||
# * Should set ADPCM state (hist_offset/spacing/etc)
|
# * Should set ADPCM state (hist_offset/spacing/etc)
|
||||||
# - DTK|NGC_DTK Nintendo ADP/DTK ADPCM
|
# - DTK|NGC_DTK Nintendo ADP/DTK ADPCM
|
||||||
# * For rare GC games
|
# * For rare GC games
|
||||||
|
#
|
||||||
# - PCM16LE PCM 16-bit little endian
|
# - PCM16LE PCM 16-bit little endian
|
||||||
# * For many games (usually on PC)
|
# * For many games (usually on PC)
|
||||||
# * Interleave is multiple of 0x2 (default)
|
# * Interleave is multiple of 0x2 (default)
|
||||||
@ -102,27 +101,43 @@ as explained below, but often will use default values. Accepted codec strings:
|
|||||||
# - PCM_FLOAT_LE PCM 32-bit float little endian
|
# - PCM_FLOAT_LE PCM 32-bit float little endian
|
||||||
# * For few rare games [Ikinari Maou (Switch)]
|
# * For few rare games [Ikinari Maou (Switch)]
|
||||||
# * Interleave is multiple of 0x4 (default)
|
# * Interleave is multiple of 0x4 (default)
|
||||||
|
#
|
||||||
# - IMA IMA ADPCM (mono/stereo)
|
# - IMA IMA ADPCM (mono/stereo)
|
||||||
# * For some PC games, and rarely consoles
|
# * For some PC games, and rarely consoles
|
||||||
# * Special interleave is multiple of 0x1, often +0x80
|
# * Special interleave is multiple of 0x1, often +0x80
|
||||||
# - DVI_IMA IMA ADPCM (DVI order)
|
# - DVI_IMA IMA ADPCM (DVI order)
|
||||||
# * Variation with modified encoding
|
# * Variation with modified encoding
|
||||||
# - AICA Yamaha AICA ADPCM (mono/stereo)
|
# - XBOX Xbox IMA ADPCM (mono/stereo)
|
||||||
# * For some Dreamcast games, and some arcade (Naomi) games
|
# * For many XBOX games, and some PC games
|
||||||
# * Special interleave is multiple of 0x1
|
# * Special interleave is multiple of 0x24 (mono) or 0x48 (stereo)
|
||||||
# - APPLE_IMA4 Apple Quicktime IMA ADPCM
|
|
||||||
# * For some Mac/iOS games
|
|
||||||
# - MS_IMA Microsoft IMA ADPCM
|
# - MS_IMA Microsoft IMA ADPCM
|
||||||
# * For some PC games
|
# * For some PC games
|
||||||
# * Interleave (frame size) varies, often multiple of 0x100 [required]
|
# * Interleave (frame size) varies, often multiple of 0x100 [required]
|
||||||
|
# - APPLE_IMA4 Apple Quicktime IMA ADPCM
|
||||||
|
# * For some Mac/iOS games
|
||||||
|
# - IMA_HV High Voltage's IMA ADPCM
|
||||||
|
# * For some High Voltage Software PC games [NBA Hangtime (PC), NHL Open Ice (PC)]
|
||||||
|
#
|
||||||
# - MSADPCM Microsoft ADPCM (mono/stereo)
|
# - MSADPCM Microsoft ADPCM (mono/stereo)
|
||||||
# * For some PC games
|
# * For some PC games
|
||||||
# * Interleave (frame size) varies, often multiple of 0x100 [required]
|
# * Interleave (frame size) varies, often multiple of 0x100 [required]
|
||||||
|
#
|
||||||
|
# - AICA Yamaha AICA ADPCM (mono/stereo)
|
||||||
|
# * For some Dreamcast games, and some arcade (Naomi) games
|
||||||
|
# * Special interleave is multiple of 0x1
|
||||||
|
# - YMZ Yamaha YMZ263B/YMZ280B ADPCM (mono/stereo)
|
||||||
|
# * Variation of AICA
|
||||||
|
# * For rare arcade games [VJ: Visual & Music Slap (AC)]
|
||||||
|
# - CP_YM Capcom's Yamaha ADPCM
|
||||||
|
# * For rare Saturn games [Marvel Super Heroes vs Street Fighter (SAT)]
|
||||||
|
#
|
||||||
# - SDX2 Squareroot-delta-exact 8-bit DPCM
|
# - SDX2 Squareroot-delta-exact 8-bit DPCM
|
||||||
# * For many 3DO games
|
# * For many 3DO games
|
||||||
|
#
|
||||||
# - MPEG MPEG Audio Layer file (MP1/2/3)
|
# - MPEG MPEG Audio Layer file (MP1/2/3)
|
||||||
# * For some games (usually PC/PS3)
|
# * For some games (usually PC/PS3)
|
||||||
# * May set skip_samples (MP2: around 240 or 480, MP3: around 1152)
|
# * May set skip_samples (MP2: around 240 or 480, MP3: around 1152)
|
||||||
|
#
|
||||||
# - ATRAC3 Sony ATRAC3
|
# - ATRAC3 Sony ATRAC3
|
||||||
# * For some PS2 and PS3 games
|
# * For some PS2 and PS3 games
|
||||||
# * Interleave (frame size) can be 0x60/0x98/0xC0 * channels [required]
|
# * Interleave (frame size) can be 0x60/0x98/0xC0 * channels [required]
|
||||||
@ -134,45 +149,45 @@ as explained below, but often will use default values. Accepted codec strings:
|
|||||||
# Stereo: 0x0118|0178|0230|02E8|03A8|0460|05D0|0748|0800
|
# Stereo: 0x0118|0178|0230|02E8|03A8|0460|05D0|0748|0800
|
||||||
# 6/8 channels: multiple of one of the above
|
# 6/8 channels: multiple of one of the above
|
||||||
# * Should set skip_samples (around 2048+184 but varies)
|
# * Should set skip_samples (around 2048+184 but varies)
|
||||||
|
#
|
||||||
# - XMA1 Microsoft XMA1
|
# - XMA1 Microsoft XMA1
|
||||||
# * For early X360 games
|
# * For early X360 games
|
||||||
# - XMA2 Microsoft XMA2
|
# - XMA2 Microsoft XMA2
|
||||||
# * For later X360 games
|
# * For later X360 games
|
||||||
# - FFMPEG Any headered FFmpeg format
|
#
|
||||||
# * For uncommon games
|
|
||||||
# * May set skip_samples
|
|
||||||
# - AC3 AC3/SPDIF
|
# - AC3 AC3/SPDIF
|
||||||
# * For few PS2 games
|
# * For few PS2 games
|
||||||
# * Should set skip_samples (around 256 but varies)
|
# * Should set skip_samples (around 256 but varies)
|
||||||
# - PCFX PC-FX ADPCM
|
# - AAC Advanced Audio Coding (raw outside .mp4)
|
||||||
# * For many PC-FX games
|
# * For some 3DS games and many iOS games
|
||||||
# * Interleave is multiple of 0x1, often +0x8000
|
# * Should set skip_samples (typically 1024 but varies, 2112 is also common)
|
||||||
# * Sample rate may be ~31468/~15734/~10489/~7867
|
# - FFMPEG Any headered FFmpeg format
|
||||||
# - PCM4 PCM 4-bit signed
|
# * For uncommon games
|
||||||
# * For early consoles
|
# * May set skip_samples
|
||||||
# - PCM4_U PCM 4-bit unsigned
|
#
|
||||||
# * Variation with modified encoding
|
|
||||||
# - OKI16 OKI ADPCM with 16-bit output (not VOX/Dialogic 12-bit)
|
# - OKI16 OKI ADPCM with 16-bit output (not VOX/Dialogic 12-bit)
|
||||||
# * For rare PS2 games [Sweet Legacy (PS2), Hooligan (PS2)]
|
# * For rare PS2 games [Sweet Legacy (PS2), Hooligan (PS2)]
|
||||||
# - OKI4S OKI ADPCM with 16-bit output and adjusted tables
|
# - OKI4S OKI ADPCM with 16-bit output and adjusted tables
|
||||||
# * For later Konami arcade games [Gitadora (AC), Metal Gear Arcade (AC)]
|
# * For later Konami arcade games [Gitadora (AC), Metal Gear Arcade (AC)]
|
||||||
# - AAC Advanced Audio Coding (raw outside .mp4)
|
# - PCFX PC-FX ADPCM
|
||||||
# * For some 3DS games and many iOS games
|
# * For many PC-FX games
|
||||||
# * Should set skip_samples (typically 1024 but varies, 2112 is also common)
|
# * Interleave is multiple of 0x1, often +0x8000
|
||||||
|
# * Sample rate may be ~31468/~15734/~10489/~7867
|
||||||
|
#
|
||||||
|
# - PCM4 PCM 4-bit signed
|
||||||
|
# * For early consoles
|
||||||
|
# - PCM4_U PCM 4-bit unsigned
|
||||||
|
# * Variation with modified encoding
|
||||||
# - TGC Tiger Game.com 4-bit ADPCM
|
# - TGC Tiger Game.com 4-bit ADPCM
|
||||||
# * For Tiger Game.com games
|
# * For Tiger Game.com games
|
||||||
# - ASF Argonaut ASF ADPCM
|
# - ASF Argonaut ASF ADPCM
|
||||||
# * For rare Argonaut games [Croc (SAT)]
|
# * For rare Argonaut games [Croc (SAT)]
|
||||||
# - EAXA Electronic Arts EA-XA ADPCM
|
# - EAXA Electronic Arts EA-XA ADPCM
|
||||||
# * For rare EA games [Harry Potter and the Chamber of Secrets (PC)]
|
# * For rare EA games [Harry Potter and the Chamber of Secrets (PC)]
|
||||||
# - XA CD-XA ADPCM (ISO 2048 mode1/data streams without subchannels)
|
# - XA CD-XA ADPCM (ISO 2048 mode1 streams without subchannel data)
|
||||||
# * For rare Saturn and PS2 games [Phantasy Star Collection (SAT), Fantavision (PS2), EA SAT videos]
|
# * For rare Saturn and PS2 games [Phantasy Star Collection (SAT), Fantavision (PS2), EA SAT videos]
|
||||||
# - XA_EA Electronic Arts XA ADPCM variation
|
# - XA_EA Electronic Arts XA ADPCM variation
|
||||||
# * For rare Saturn games [EA SAT videos]
|
# * For rare Saturn games [EA SAT videos]
|
||||||
# - CP_YM Capcom's Yamaha ADPCM
|
|
||||||
# * For rare Saturn games [Marvel Super Heroes vs Street Fighter (SAT)]
|
|
||||||
# - IMA_HV High Voltage's IMA ADPCM
|
|
||||||
# * For some High Voltage Software PC games [NBA Hangtime (PC), NHL Open Ice (PC)]
|
|
||||||
codec = (codec string)
|
codec = (codec string)
|
||||||
```
|
```
|
||||||
|
|
||||||
|
@ -171,7 +171,7 @@ int msadpcm_check_coefs(STREAMFILE* sf, uint32_t offset);
|
|||||||
|
|
||||||
|
|
||||||
/* yamaha_decoder */
|
/* yamaha_decoder */
|
||||||
void decode_aica(VGMSTREAMCHANNEL* stream, sample_t* outbuf, int channelspacing, int32_t first_sample, int32_t samples_to_do, int channel, int is_stereo);
|
void decode_aica(VGMSTREAMCHANNEL* stream, sample_t* outbuf, int channelspacing, int32_t first_sample, int32_t samples_to_do, int channel, int is_stereo, int is_high_first);
|
||||||
void decode_cp_ym(VGMSTREAMCHANNEL* stream, sample_t* outbuf, int channelspacing, int32_t first_sample, int32_t samples_to_do, int channel, int is_stereo);
|
void decode_cp_ym(VGMSTREAMCHANNEL* stream, sample_t* outbuf, int channelspacing, int32_t first_sample, int32_t samples_to_do, int channel, int is_stereo);
|
||||||
void decode_aska(VGMSTREAMCHANNEL* stream, sample_t* outbuf, int channelspacing, int32_t first_sample, int32_t samples_to_do, int channel, size_t frame_size);
|
void decode_aska(VGMSTREAMCHANNEL* stream, sample_t* outbuf, int channelspacing, int32_t first_sample, int32_t samples_to_do, int channel, size_t frame_size);
|
||||||
void decode_nxap(VGMSTREAMCHANNEL* stream, sample_t* outbuf, int channelspacing, int32_t first_sample, int32_t samples_to_do);
|
void decode_nxap(VGMSTREAMCHANNEL* stream, sample_t* outbuf, int channelspacing, int32_t first_sample, int32_t samples_to_do);
|
||||||
|
@ -44,12 +44,12 @@ static void yamaha_adpcmb_expand_nibble(uint8_t byte, int shift, int32_t* hist1,
|
|||||||
|
|
||||||
/* Yamaha AICA expand, slightly filtered vs "ACM" Yamaha ADPCM, same as Creative ADPCM
|
/* Yamaha AICA expand, slightly filtered vs "ACM" Yamaha ADPCM, same as Creative ADPCM
|
||||||
* (some info from https://github.com/vgmrips/vgmplay, https://wiki.multimedia.cx/index.php/Creative_ADPCM) */
|
* (some info from https://github.com/vgmrips/vgmplay, https://wiki.multimedia.cx/index.php/Creative_ADPCM) */
|
||||||
static void yamaha_aica_expand_nibble(VGMSTREAMCHANNEL * stream, off_t byte_offset, int nibble_shift, int32_t* hist1, int32_t* step_size, int16_t *out_sample) {
|
static void yamaha_aica_expand_nibble(uint8_t byte, int shift, int32_t* hist1, int32_t* step_size, int16_t *out_sample) {
|
||||||
int code, delta, sample;
|
int code, delta, sample;
|
||||||
|
|
||||||
*hist1 = *hist1 * 254 / 256; /* hist filter is vital to get correct waveform but not done in many emus */
|
*hist1 = *hist1 * 254 / 256; /* hist filter is vital to get correct waveform but not done in many emus */
|
||||||
|
|
||||||
code = ((read_8bit(byte_offset,stream->streamfile) >> nibble_shift))&0xf;
|
code = (byte >> shift) & 0xf;
|
||||||
delta = (*step_size * scale_delta[code]) / 8; /* 'mul' IMA with table (not sure if part of encoder) */
|
delta = (*step_size * scale_delta[code]) / 8; /* 'mul' IMA with table (not sure if part of encoder) */
|
||||||
sample = *hist1 + delta;
|
sample = *hist1 + delta;
|
||||||
|
|
||||||
@ -108,8 +108,8 @@ static void yamaha_capcom_expand_nibble(uint8_t byte, int shift, int32_t* hist1,
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
|
|
||||||
/* Yamaha AICA ADPCM (also used in YMZ280B with high nibble first) */
|
/* Yamaha AICA ADPCM (also used in YMZ263B/YMZ280B with high nibble first) */
|
||||||
void decode_aica(VGMSTREAMCHANNEL * stream, sample_t * outbuf, int channelspacing, int32_t first_sample, int32_t samples_to_do, int channel, int is_stereo) {
|
void decode_aica(VGMSTREAMCHANNEL * stream, sample_t * outbuf, int channelspacing, int32_t first_sample, int32_t samples_to_do, int channel, int is_stereo, int is_high_first) {
|
||||||
int i, sample_count = 0;
|
int i, sample_count = 0;
|
||||||
int16_t out_sample;
|
int16_t out_sample;
|
||||||
int32_t hist1 = stream->adpcm_history1_16;
|
int32_t hist1 = stream->adpcm_history1_16;
|
||||||
@ -120,14 +120,16 @@ void decode_aica(VGMSTREAMCHANNEL * stream, sample_t * outbuf, int channelspacin
|
|||||||
if (step_size > 0x6000) step_size = 0x6000;
|
if (step_size > 0x6000) step_size = 0x6000;
|
||||||
|
|
||||||
for (i = first_sample; i < first_sample + samples_to_do; i++) {
|
for (i = first_sample; i < first_sample + samples_to_do; i++) {
|
||||||
off_t byte_offset = is_stereo ?
|
uint8_t byte;
|
||||||
|
off_t offset = is_stereo ?
|
||||||
stream->offset + i : /* stereo: one nibble per channel */
|
stream->offset + i : /* stereo: one nibble per channel */
|
||||||
stream->offset + i/2; /* mono: consecutive nibbles */
|
stream->offset + i/2; /* mono: consecutive nibbles */
|
||||||
int nibble_shift = is_stereo ?
|
int shift = is_high_first ?
|
||||||
(!(channel&1) ? 0:4) : /* even = low/L, odd = high/R */
|
is_stereo ? (!(channel&1) ? 4:0) : (!(i&1) ? 4:0) : /* even = high/L, odd = low/R */
|
||||||
(!(i&1) ? 0:4); /* low nibble first */
|
is_stereo ? (!(channel&1) ? 0:4) : (!(i&1) ? 0:4); /* even = low/L, odd = high/L */
|
||||||
|
|
||||||
yamaha_aica_expand_nibble(stream, byte_offset, nibble_shift, &hist1, &step_size, &out_sample);
|
byte = read_u8(offset, stream->streamfile);
|
||||||
|
yamaha_aica_expand_nibble(byte, shift, &hist1, &step_size, &out_sample);
|
||||||
outbuf[sample_count] = out_sample;
|
outbuf[sample_count] = out_sample;
|
||||||
sample_count += channelspacing;
|
sample_count += channelspacing;
|
||||||
}
|
}
|
||||||
|
@ -1354,10 +1354,11 @@ void decode_vgmstream(VGMSTREAM* vgmstream, int samples_written, int samples_to_
|
|||||||
case coding_AICA:
|
case coding_AICA:
|
||||||
case coding_AICA_int: {
|
case coding_AICA_int: {
|
||||||
int is_stereo = (vgmstream->channels > 1 && vgmstream->coding_type == coding_AICA);
|
int is_stereo = (vgmstream->channels > 1 && vgmstream->coding_type == coding_AICA);
|
||||||
|
int is_high_first = vgmstream->codec_config == 1;
|
||||||
for (ch = 0; ch < vgmstream->channels; ch++) {
|
for (ch = 0; ch < vgmstream->channels; ch++) {
|
||||||
decode_aica(&vgmstream->ch[ch], buffer+ch,
|
decode_aica(&vgmstream->ch[ch], buffer+ch,
|
||||||
vgmstream->channels, vgmstream->samples_into_block, samples_to_do, ch,
|
vgmstream->channels, vgmstream->samples_into_block, samples_to_do, ch,
|
||||||
is_stereo);
|
is_stereo, is_high_first);
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
@ -129,6 +129,7 @@ static const char* extension_list[] = {
|
|||||||
"bvg",
|
"bvg",
|
||||||
"bwav",
|
"bwav",
|
||||||
|
|
||||||
|
"cads",
|
||||||
"caf",
|
"caf",
|
||||||
"cbd2",
|
"cbd2",
|
||||||
"ccc", //fake extension (to be removed)
|
"ccc", //fake extension (to be removed)
|
||||||
|
@ -336,19 +336,26 @@ VGMSTREAM* init_vgmstream_ads_container(STREAMFILE* sf) {
|
|||||||
size_t subfile_size;
|
size_t subfile_size;
|
||||||
|
|
||||||
/* checks */
|
/* checks */
|
||||||
if (!check_extensions(sf, "ads"))
|
if (is_id32be(0x00,sf, "ADSC")) {
|
||||||
goto fail;
|
|
||||||
|
|
||||||
if (read_32bitBE(0x00,sf) == 0x41445343 && /* "ADSC" */
|
|
||||||
read_32bitBE(0x04,sf) == 0x01000000) {
|
|
||||||
/* Kenka Bancho 2, Kamen Rider Hibiki/Kabuto, Shinjuku no Okami */
|
/* Kenka Bancho 2, Kamen Rider Hibiki/Kabuto, Shinjuku no Okami */
|
||||||
|
if (read_u32le(0x04,sf) != 0x01)
|
||||||
|
goto fail;
|
||||||
|
|
||||||
|
if (!check_extensions(sf, "ads"))
|
||||||
|
goto fail;
|
||||||
|
|
||||||
subfile_offset = 0x08;
|
subfile_offset = 0x08;
|
||||||
}
|
}
|
||||||
else if (read_32bitBE(0x00,sf) == 0x63617669 && /* "cavi" */
|
else if (is_id32be(0x00,sf, "cavi") &&
|
||||||
read_32bitBE(0x04,sf) == 0x61207374 && /* "a st" */
|
is_id32be(0x04,sf, "a st") &&
|
||||||
read_32bitBE(0x08,sf) == 0x7265616D) { /* "ream" */
|
is_id32be(0x08,sf, "ream")) {
|
||||||
/* cavia games: Drakengard 1/2, Dragon Quest Yangus, GITS: Stand Alone Complex */
|
/* cavia games: Drakengard 1/2, Dragon Quest Yangus, GITS: Stand Alone Complex */
|
||||||
subfile_offset = 0x7d8;
|
subfile_offset = 0x7d8;
|
||||||
|
|
||||||
|
/* .ads: assumed
|
||||||
|
* .cads: probable extension (found in bigfiles as LE field) */
|
||||||
|
if (!check_extensions(sf, "ads,cads"))
|
||||||
|
goto fail;
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
goto fail;
|
goto fail;
|
||||||
|
@ -1051,6 +1051,9 @@ static const hcakey_info hcakey_list[] = {
|
|||||||
|
|
||||||
// Fairy Fencer F: Refrain Chord (multi)
|
// Fairy Fencer F: Refrain Chord (multi)
|
||||||
{348693553056839375}, // 04D6CEF0656BF6CF
|
{348693553056839375}, // 04D6CEF0656BF6CF
|
||||||
|
|
||||||
|
// Echoes of Mana (Android)
|
||||||
|
{1090221945250803295}, // 0F213F153D026E5F
|
||||||
};
|
};
|
||||||
|
|
||||||
#endif/*_HCA_KEYS_H_*/
|
#endif/*_HCA_KEYS_H_*/
|
||||||
|
@ -91,6 +91,13 @@ VGMSTREAM* init_vgmstream_ogg_opus(STREAMFILE* sf) {
|
|||||||
sscanf(strrchr(user_comment, '=') + 1, "%d-%d", &loop_start, &loop_end);
|
sscanf(strrchr(user_comment, '=') + 1, "%d-%d", &loop_start, &loop_end);
|
||||||
loop_flag = 1;
|
loop_flag = 1;
|
||||||
}
|
}
|
||||||
|
else if (strstr(user_comment,"loopstart=")==user_comment) { /* The Legend of Heroes: Kuro no Kiseki (PC) */
|
||||||
|
loop_start= atol(strrchr(user_comment,'=')+1);
|
||||||
|
loop_flag = (loop_start >= 0);
|
||||||
|
}
|
||||||
|
else if (strstr(user_comment,"loopend=")==user_comment) { /* LoopStart pair */
|
||||||
|
loop_end = atol(strrchr(user_comment,'=')+1);
|
||||||
|
}
|
||||||
|
|
||||||
//;VGM_LOG("OggOpus: user_comment=%s\n", user_comment);
|
//;VGM_LOG("OggOpus: user_comment=%s\n", user_comment);
|
||||||
offset += 0x04 + user_comment_size;
|
offset += 0x04 + user_comment_size;
|
||||||
|
@ -51,6 +51,7 @@ typedef enum {
|
|||||||
IMA_HV,
|
IMA_HV,
|
||||||
PCM8_SB,
|
PCM8_SB,
|
||||||
HEVAG,
|
HEVAG,
|
||||||
|
YMZ,
|
||||||
|
|
||||||
UNKNOWN = 99,
|
UNKNOWN = 99,
|
||||||
} txth_codec_t;
|
} txth_codec_t;
|
||||||
@ -258,6 +259,7 @@ VGMSTREAM* init_vgmstream_txth(STREAMFILE* sf) {
|
|||||||
case MPEG: coding = coding_MPEG_layer3; break; /* we later find out exactly which */
|
case MPEG: coding = coding_MPEG_layer3; break; /* we later find out exactly which */
|
||||||
#endif
|
#endif
|
||||||
case IMA: coding = coding_IMA; break;
|
case IMA: coding = coding_IMA; break;
|
||||||
|
case YMZ:
|
||||||
case AICA: coding = coding_AICA; break;
|
case AICA: coding = coding_AICA; break;
|
||||||
case MSADPCM: coding = coding_MSADPCM; break;
|
case MSADPCM: coding = coding_MSADPCM; break;
|
||||||
case NGC_DSP: coding = coding_NGC_DSP; break;
|
case NGC_DSP: coding = coding_NGC_DSP; break;
|
||||||
@ -386,7 +388,12 @@ VGMSTREAM* init_vgmstream_txth(STREAMFILE* sf) {
|
|||||||
vgmstream->codec_config = txth.codec_mode;
|
vgmstream->codec_config = txth.codec_mode;
|
||||||
}
|
}
|
||||||
|
|
||||||
vgmstream->allow_dual_stereo = 1; /* AICA and PSX */
|
if (txth.codec == YMZ) {
|
||||||
|
vgmstream->codec_config = 1; /* CONFIG_HIGH_NIBBLE */
|
||||||
|
}
|
||||||
|
|
||||||
|
//TODO recheck and use only for needed cases
|
||||||
|
vgmstream->allow_dual_stereo = 1; /* known to be used in: PSX, AICA, YMZ */
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case coding_PCFX:
|
case coding_PCFX:
|
||||||
@ -955,6 +962,7 @@ static txth_codec_t parse_codec(txth_header* txth, const char* val) {
|
|||||||
else if (is_string(val,"MPEG")) return MPEG;
|
else if (is_string(val,"MPEG")) return MPEG;
|
||||||
else if (is_string(val,"IMA")) return IMA;
|
else if (is_string(val,"IMA")) return IMA;
|
||||||
else if (is_string(val,"AICA")) return AICA;
|
else if (is_string(val,"AICA")) return AICA;
|
||||||
|
else if (is_string(val,"YMZ")) return YMZ;
|
||||||
else if (is_string(val,"MSADPCM")) return MSADPCM;
|
else if (is_string(val,"MSADPCM")) return MSADPCM;
|
||||||
else if (is_string(val,"NGC_DSP")) return NGC_DSP;
|
else if (is_string(val,"NGC_DSP")) return NGC_DSP;
|
||||||
else if (is_string(val,"DSP")) return NGC_DSP;
|
else if (is_string(val,"DSP")) return NGC_DSP;
|
||||||
@ -2129,6 +2137,7 @@ static int get_bytes_to_samples(txth_header* txth, uint32_t bytes) {
|
|||||||
case IMA_HV:
|
case IMA_HV:
|
||||||
return ima_bytes_to_samples(bytes, txth->channels);
|
return ima_bytes_to_samples(bytes, txth->channels);
|
||||||
case AICA:
|
case AICA:
|
||||||
|
case YMZ:
|
||||||
case CP_YM:
|
case CP_YM:
|
||||||
return yamaha_bytes_to_samples(bytes, txth->channels);
|
return yamaha_bytes_to_samples(bytes, txth->channels);
|
||||||
case PCFX:
|
case PCFX:
|
||||||
|
@ -788,7 +788,7 @@ int psb_node_exists(const psb_node_t* node, const char* key) {
|
|||||||
|
|
||||||
static void print_internal(psb_node_t* curr, int depth) {
|
static void print_internal(psb_node_t* curr, int depth) {
|
||||||
int i;
|
int i;
|
||||||
psb_node_t node;
|
psb_node_t node = { 0 };
|
||||||
const char* key;
|
const char* key;
|
||||||
psb_type_t type;
|
psb_type_t type;
|
||||||
psb_result_t res;
|
psb_result_t res;
|
||||||
@ -857,7 +857,7 @@ static void print_internal(psb_node_t* curr, int depth) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
void psb_print(psb_context_t* ctx) {
|
void psb_print(psb_context_t* ctx) {
|
||||||
psb_node_t node;
|
psb_node_t node = { 0 };
|
||||||
|
|
||||||
psb_get_root(ctx, &node);
|
psb_get_root(ctx, &node);
|
||||||
print_internal(&node, 0);
|
print_internal(&node, 0);
|
||||||
|
@ -529,7 +529,6 @@ VGMSTREAM* (*init_vgmstream_functions[])(STREAMFILE* sf) = {
|
|||||||
|
|
||||||
/* lower priority metas (no clean header identity, somewhat ambiguous, or need extension/companion file to identify) */
|
/* lower priority metas (no clean header identity, somewhat ambiguous, or need extension/companion file to identify) */
|
||||||
init_vgmstream_agsc,
|
init_vgmstream_agsc,
|
||||||
init_vgmstream_dtk,
|
|
||||||
init_vgmstream_rsf,
|
init_vgmstream_rsf,
|
||||||
init_vgmstream_ps2_wmus,
|
init_vgmstream_ps2_wmus,
|
||||||
init_vgmstream_mib_mih,
|
init_vgmstream_mib_mih,
|
||||||
@ -542,6 +541,7 @@ VGMSTREAM* (*init_vgmstream_functions[])(STREAMFILE* sf) = {
|
|||||||
|
|
||||||
/* lowest priority metas (should go after all metas, and TXTH should go before raw formats) */
|
/* lowest priority metas (should go after all metas, and TXTH should go before raw formats) */
|
||||||
init_vgmstream_txth, /* proper parsers should supersede TXTH, once added */
|
init_vgmstream_txth, /* proper parsers should supersede TXTH, once added */
|
||||||
|
init_vgmstream_dtk,
|
||||||
init_vgmstream_mpeg, /* semi-raw MP3 */
|
init_vgmstream_mpeg, /* semi-raw MP3 */
|
||||||
init_vgmstream_encrypted, /* encrypted stuff */
|
init_vgmstream_encrypted, /* encrypted stuff */
|
||||||
init_vgmstream_btsnd, /* semi-headerless */
|
init_vgmstream_btsnd, /* semi-headerless */
|
||||||
|
Loading…
x
Reference in New Issue
Block a user