Merge pull request #1428 from bnnm/ww-key

- Add .wiive extension [Rubik World (Wii)]
- Add HCA key
- Fix 5.0ch .wem Opus [Bayonetta 3 (Switch)]
- cleanup
This commit is contained in:
bnnm 2023-09-30 21:19:24 +02:00 committed by GitHub
commit 55bdd1f22e
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
11 changed files with 23 additions and 16 deletions

View File

@ -117,6 +117,7 @@ def main():
name = get_txtp_name(args, file)
if not name in txtps:
txtps[name] = []
file = file.replace('\\', '/')
txtps[name].append(file)

View File

@ -271,7 +271,7 @@ different internally (encrypted, different versions, etc) and not always can be
- RIFF WAVE header (ctrl looping) [*RIFF_WAVE_MWV*]
- RIFX WAVE header [*RIFX_WAVE*]
- RIFX WAVE header (smpl looping) [*RIFX_WAVE_smpl*]
- *riff*: `.wav .lwav .xwav .mwv .da .dax .cd .med .snd .adx .adp .xss .xsew .adpcm .adw .wd .(extensionless) .sbv .wvx .str .at3 .rws .aud .at9 .ckd .saf .ima .nsa .pcm .xvag .ogg .logg .p1d .xms .mus .dat .ldat`
- *riff*: `.wav .lwav .xwav .mwv .da .dax .cd .med .snd .adx .adp .xss .xsew .adpcm .adw .wd .(extensionless) .sbv .wvx .str .at3 .rws .aud .at9 .ckd .saf .ima .nsa .pcm .xvag .ogg .logg .p1d .xms .mus .dat .ldat .wma .lwma`
- *rifx*: `.wav .lwav`
- Codecs: AICA_int PCM32LE PCM24LE PCM16BE PCM16LE PCM8_U MSADPCM IMA PCMFLOAT MS_IMA AICA MPEG_custom XBOX_IMA MS_IMA_3BIT DVI_IMA L5_555 OGG_VORBIS ATRAC9 ATRAC3 MPEG MSADPCM_int
- **nwa.c**
@ -1120,10 +1120,6 @@ different internally (encrypted, different versions, etc) and not always can be
- *opus_sqex*: `.wav .lwav`
- *opus_rsnd*: `.rsnd`
- Codecs: Opus
- **nxa.c**
- Entergram NXA header [*NXA*]
- *opus_nxa*: `.nxa`
- Codecs: Opus
- **pc_ast.c**
- Capcom AST (PC) header [*PC_AST*]
- *pc_ast*: `.ast`
@ -1370,6 +1366,10 @@ different internally (encrypted, different versions, etc) and not always can be
- Maxis UTK header [*UTK*]
- *utk*: `.utk`
- Codecs: EA_MT
- **nxa1.c**
- Entergram NXA1 header [*NXA1*]
- *nxa1*: `.nxa`
- Codecs: Opus
- **adpcm_capcom.c**
- Capcom .ADPCM header [*ADPCM_CAPCOM*]
- *adpcm_capcom*: `.adpcm .mca`

View File

@ -629,6 +629,7 @@ static const char* extension_list[] = {
"wd",
"wem",
"wii",
"wiive", //txth/semi [Rubik World (Wii)]
"wic", //txth/reserved [Road Rash (SAT)-videos]
"wip", //txth/reserved [Colin McRae DiRT (PC)]
"wlv", //txth/reserved [ToeJam & Earl III: Mission to Earth (DC)]
@ -1327,7 +1328,7 @@ static const meta_info meta_info_list[] = {
{meta_XAU_KONAMI, "Konami XAU header"},
{meta_DERF, "Xilam DERF header"},
{meta_UTK, "Maxis UTK header"},
{meta_NXA, "Entergram NXA header"},
{meta_NXA1, "Entergram NXA1 header"},
{meta_ADPCM_CAPCOM, "Capcom .ADPCM header"},
{meta_UE4OPUS, "Epic Games UE4OPUS header"},
{meta_XWMA, "Microsoft XWMA RIFF header"},

View File

@ -533,7 +533,7 @@
<ClCompile Include="meta\nus3bank.c" />
<ClCompile Include="meta\nwa.c" />
<ClCompile Include="meta\nwav.c" />
<ClCompile Include="meta\nxa.c" />
<ClCompile Include="meta\nxa1.c" />
<ClCompile Include="meta\nxap.c" />
<ClCompile Include="meta\nxof.c" />
<ClCompile Include="meta\ogg_opus.c" />

View File

@ -1420,7 +1420,7 @@
<ClCompile Include="meta\nwav.c">
<Filter>meta\Source Files</Filter>
</ClCompile>
<ClCompile Include="meta\nxa.c">
<ClCompile Include="meta\nxa1.c">
<Filter>meta\Source Files</Filter>
</ClCompile>
<ClCompile Include="meta\nxap.c">

View File

@ -1257,6 +1257,9 @@ static const hcakey_info hcakey_list[] = {
// Star Ocean: The Second Story R Demo (PC, Switch)
{533948357975462459}, // 0768F733DD87D23B
// Girls' Frontline 2: Exilium (Android)
{8930254087621254}, // 001FBA04CEA58A86
};
#endif/*_HCA_KEYS_H_*/

View File

@ -618,7 +618,6 @@ VGMSTREAM* init_vgmstream_opus_nop(STREAMFILE* sf);
VGMSTREAM* init_vgmstream_opus_shinen(STREAMFILE* sf);
VGMSTREAM* init_vgmstream_opus_nus3(STREAMFILE* sf);
VGMSTREAM* init_vgmstream_opus_sps_n1(STREAMFILE* sf);
VGMSTREAM* init_vgmstream_opus_nxa(STREAMFILE* sf);
VGMSTREAM* init_vgmstream_opus_opusx(STREAMFILE* sf);
VGMSTREAM* init_vgmstream_opus_prototype(STREAMFILE* sf);
VGMSTREAM* init_vgmstream_opus_opusnx(STREAMFILE* sf);
@ -758,6 +757,8 @@ VGMSTREAM * init_vgmstream_derf(STREAMFILE *streamFile);
VGMSTREAM * init_vgmstream_utk(STREAMFILE *streamFile);
VGMSTREAM* init_vgmstream_nxa1(STREAMFILE* sf);
VGMSTREAM * init_vgmstream_adpcm_capcom(STREAMFILE *streamFile);
VGMSTREAM * init_vgmstream_ue4opus(STREAMFILE *streamFile);

View File

@ -2,8 +2,8 @@
#include "../coding/coding.h"
/* Entergram NXA Opus [Higurashi no Naku Koro ni Hou (Switch), Gensou Rougoku no Kaleidoscope (Switch)] */
VGMSTREAM* init_vgmstream_opus_nxa(STREAMFILE* sf) {
/* Entergram NXA1 Opus [Higurashi no Naku Koro ni Hou (Switch), Gensou Rougoku no Kaleidoscope (Switch)] */
VGMSTREAM* init_vgmstream_nxa1(STREAMFILE* sf) {
VGMSTREAM* vgmstream = NULL;
off_t start_offset;
int loop_flag, channels, type, sample_rate;
@ -11,10 +11,10 @@ VGMSTREAM* init_vgmstream_opus_nxa(STREAMFILE* sf) {
size_t data_size, frame_size;
/* checks */
if (!check_extensions(sf, "nxa"))
goto fail;
if (!is_id32be(0x00, sf, "NXA1"))
goto fail;
if (!check_extensions(sf, "nxa"))
goto fail;
start_offset = 0x30;
type = read_u32le(0x04, sf);
@ -36,7 +36,7 @@ VGMSTREAM* init_vgmstream_opus_nxa(STREAMFILE* sf) {
vgmstream = allocate_vgmstream(channels, loop_flag);
if (!vgmstream) goto fail;
vgmstream->meta_type = meta_NXA;
vgmstream->meta_type = meta_NXA1;
vgmstream->sample_rate = sample_rate;
vgmstream->num_samples = num_samples;
vgmstream->loop_start_sample = loop_start;

View File

@ -575,6 +575,7 @@ VGMSTREAM* init_vgmstream_wwise_bnk(STREAMFILE* sf, int* p_prefetch) {
switch(ww.channel_layout) {
case mapping_7POINT1_surround: cfg.coupled_count = 3; break; /* 2ch+2ch+2ch+1ch+1ch, 5 streams */
case mapping_5POINT1_surround: /* 2ch+2ch+1ch+1ch, 4 streams */
case mapping_5POINT0_surround: /* 2ch+2ch+1ch, 3 streams [Bayonetta 3 (Switch)] */
case mapping_QUAD_side: cfg.coupled_count = 2; break; /* 2ch+2ch, 2 streams */
case mapping_2POINT1_xiph: /* 2ch+1ch, 2 streams */
case mapping_STEREO: cfg.coupled_count = 1; break; /* 2ch, 1 stream */

View File

@ -308,7 +308,6 @@ init_vgmstream_t init_vgmstream_functions[] = {
init_vgmstream_opus_shinen,
init_vgmstream_opus_nus3,
init_vgmstream_opus_sps_n1,
init_vgmstream_opus_nxa,
init_vgmstream_pc_ast,
init_vgmstream_naac,
init_vgmstream_ubi_sb,
@ -386,6 +385,7 @@ init_vgmstream_t init_vgmstream_functions[] = {
init_vgmstream_xau_konami,
init_vgmstream_derf,
init_vgmstream_utk,
init_vgmstream_nxa1,
init_vgmstream_adpcm_capcom,
init_vgmstream_ue4opus,
init_vgmstream_xwma,

View File

@ -612,7 +612,7 @@ typedef enum {
meta_DERF, /* Stupid Invaders (PC) */
meta_SADF,
meta_UTK,
meta_NXA,
meta_NXA1,
meta_ADPCM_CAPCOM,
meta_UE4OPUS,
meta_XWMA,