This commit is contained in:
bnnm 2024-04-08 23:22:41 +02:00
parent cd468a9b1f
commit 68eba67c48
7 changed files with 36 additions and 36 deletions

View File

@ -1087,7 +1087,7 @@ static const meta_info meta_info_list[] = {
{meta_SCD_PCM, "Lunar: Eternal Blue .PCM header"},
{meta_PS2_PCM, "Konami .PCM header"},
{meta_PS2_RKV, "Legacy of Kain - Blood Omen 2 RKV PS2 header"},
{meta_PS2_VAS, "Konami .VAS header"},
{meta_VAS_KCEO, "Konami .VAS header"},
{meta_LP_AP_LEP, "Konami LP/AP/LEP header"},
{meta_SDT, "High Voltage .sdt header"},
{meta_WVS, "Swingin' Ape .WVS header"},
@ -1431,7 +1431,7 @@ static const meta_info meta_info_list[] = {
{meta_NXOF, "Nihon Falcom FDK header"},
{meta_GWB_GWD, "Ubisoft GWB+GWD header"},
{meta_CBX, "Traveller's Tales CBX header"},
{meta_VAS, "Manhunt 2 .VAS header"},
{meta_VAS_ROCKSTAR, "Rockstar .VAS header"},
};
void get_vgmstream_coding_description(VGMSTREAM* vgmstream, char* out, size_t out_size) {

View File

@ -77,7 +77,7 @@ VGMSTREAM * init_vgmstream_rfrm(STREAMFILE *streamFile);
VGMSTREAM* init_vgmstream_ads(STREAMFILE* sf);
VGMSTREAM* init_vgmstream_ads_container(STREAMFILE* sf);
VGMSTREAM * init_vgmstream_nps(STREAMFILE *streamFile);
VGMSTREAM* init_vgmstream_npsf(STREAMFILE* sf);
VGMSTREAM * init_vgmstream_rs03(STREAMFILE *streamFile);
@ -248,8 +248,8 @@ VGMSTREAM * init_vgmstream_ps2_pcm(STREAMFILE * streamFile);
VGMSTREAM * init_vgmstream_ps2_rkv(STREAMFILE * streamFile);
VGMSTREAM * init_vgmstream_ps2_vas(STREAMFILE * streamFile);
VGMSTREAM * init_vgmstream_ps2_vas_container(STREAMFILE * streamFile);
VGMSTREAM* init_vgmstream_vas_kceo(STREAMFILE* sf);
VGMSTREAM* init_vgmstream_vas_kceo_container(STREAMFILE* sf);
VGMSTREAM* init_vgmstream_lp_ap_lep(STREAMFILE* sf);
@ -1002,6 +1002,6 @@ VGMSTREAM* init_vgmstream_gwb_gwd(STREAMFILE* sf);
VGMSTREAM* init_vgmstream_cbx(STREAMFILE* sf);
VGMSTREAM* init_vgmstream_vas(STREAMFILE* sf);
VGMSTREAM* init_vgmstream_vas_rockstar(STREAMFILE* sf);
#endif /*_META_H*/

View File

@ -2,25 +2,25 @@
#include "../coding/coding.h"
/* NPFS - found in Namco NuSound v1 games [Tekken 5 (PS2), Venus & Braves (PS2), Ridge Racer (PSP)] */
VGMSTREAM* init_vgmstream_nps(STREAMFILE* sf) {
VGMSTREAM * vgmstream = NULL;
VGMSTREAM* init_vgmstream_npsf(STREAMFILE* sf) {
VGMSTREAM* vgmstream = NULL;
off_t start_offset;
uint32_t channel_size;
int loop_flag, channel_count, loop_start, sample_rate;
int loop_flag, channels, loop_start, sample_rate;
/* checks */
if (!is_id32be(0x00, sf, "NPSF"))
return NULL;
/* .nps: referenced extension (ex. Venus & Braves, Ridge Racer data files)
* .npsf: header id (Namco Production Sound File?) */
if ( !check_extensions(sf,"nps,npsf"))
goto fail;
if (!check_extensions(sf,"nps,npsf"))
return NULL;
if (read_u32be(0x00, sf) != 0x4E505346) /* "NPSF" */
goto fail;
/* 0x04: version? (0x00001000 = 1.00?) */
channel_size = read_s32le(0x08, sf);
channel_count = read_s32le(0x0C, sf);
channels = read_s32le(0x0C, sf);
start_offset = read_s32le(0x10, sf); /* interleave? */
loop_start = read_s32le(0x14, sf);
sample_rate = read_s32le(0x18, sf);
@ -36,7 +36,7 @@ VGMSTREAM* init_vgmstream_nps(STREAMFILE* sf) {
/* build the VGMSTREAM */
vgmstream = allocate_vgmstream(channel_count, loop_flag);
vgmstream = allocate_vgmstream(channels, loop_flag);
if (!vgmstream) goto fail;
vgmstream->sample_rate = sample_rate;

View File

@ -2,8 +2,8 @@
#include "../coding/coding.h"
/* .VAS - from Konami Jikkyou Powerful Pro Yakyuu games */
VGMSTREAM* init_vgmstream_ps2_vas(STREAMFILE* sf) {
/* .VAS - from Konami Computer Enterntainment Osaka games [Jikkyou Powerful Pro Yakyuu 8 (PS2), Jikkyou World Soccer 2000 (PS2)] */
VGMSTREAM* init_vgmstream_vas_kceo(STREAMFILE* sf) {
VGMSTREAM* vgmstream = NULL;
off_t start_offset;
int loop_flag, channels;
@ -11,9 +11,9 @@ VGMSTREAM* init_vgmstream_ps2_vas(STREAMFILE* sf) {
/* checks */
if (!check_extensions(sf, "vas"))
goto fail;
return NULL;
if (read_u32le(0x00,sf) + 0x800 != get_streamfile_size(sf))
goto fail;
return NULL;
loop_flag = (read_u32le(0x10,sf) != 0);
channels = 2;
@ -25,10 +25,10 @@ VGMSTREAM* init_vgmstream_ps2_vas(STREAMFILE* sf) {
/* build the VGMSTREAM */
vgmstream = allocate_vgmstream(channels,loop_flag);
vgmstream = allocate_vgmstream(channels, loop_flag);
if (!vgmstream) goto fail;
vgmstream->meta_type = meta_PS2_VAS;
vgmstream->meta_type = meta_VAS_KCEO;
vgmstream->sample_rate = read_s32le(0x04,sf);
vgmstream->coding_type = coding_PSX;
@ -50,7 +50,7 @@ fail:
/* .VAS in containers */
VGMSTREAM* init_vgmstream_ps2_vas_container(STREAMFILE* sf) {
VGMSTREAM* init_vgmstream_vas_kceo_container(STREAMFILE* sf) {
VGMSTREAM* vgmstream = NULL;
STREAMFILE* temp_sf = NULL;
off_t subfile_offset = 0;
@ -60,7 +60,7 @@ VGMSTREAM* init_vgmstream_ps2_vas_container(STREAMFILE* sf) {
/* checks */
if (!check_extensions(sf, "vas"))
goto fail;
return NULL;
if (read_u32be(0x00, sf) == 0xAB8A5A00) { /* fixed value */
@ -139,7 +139,7 @@ VGMSTREAM* init_vgmstream_ps2_vas_container(STREAMFILE* sf) {
temp_sf = setup_subfile_streamfile(sf, subfile_offset,subfile_size, NULL);
if (!temp_sf) goto fail;
vgmstream = init_vgmstream_ps2_vas(temp_sf);
vgmstream = init_vgmstream_vas_kceo(temp_sf);
if (!vgmstream) goto fail;
vgmstream->num_streams = total_subsongs;

View File

@ -2,7 +2,7 @@
#include "../coding/coding.h"
/* VAS - Manhunt 2 [PSP] blocked audio format */
VGMSTREAM* init_vgmstream_vas(STREAMFILE* sf) {
VGMSTREAM* init_vgmstream_vas_rockstar(STREAMFILE* sf) {
VGMSTREAM* vgmstream = NULL;
off_t stream_offset;
size_t data_size, stream_size, block_size = 0x40;
@ -14,10 +14,10 @@ VGMSTREAM* init_vgmstream_vas(STREAMFILE* sf) {
/* VAGs: v1, used in prerelease builds
* 2AGs: v2, used in the final release */
if (!is_id32be(0x00, sf, "VAGs") && !is_id32be(0x00, sf, "2AGs"))
goto fail;
return NULL;
if (!check_extensions(sf, "vas"))
goto fail;
return NULL;
/* parse header */
@ -26,7 +26,7 @@ VGMSTREAM* init_vgmstream_vas(STREAMFILE* sf) {
if (read_u8(0x0A, sf)) goto fail; /* always 0? */
num_streams = read_u8(0x0B, sf);
if (num_streams < 1 || num_streams > 32) goto fail;
if (target_subsong < 0 || num_streams < 1 || num_streams > 32) goto fail;
if (!target_subsong) target_subsong = 1;
channels = 1; /* might be read_u8(0x0A, sf) + 1? */
@ -56,7 +56,7 @@ VGMSTREAM* init_vgmstream_vas(STREAMFILE* sf) {
vgmstream = allocate_vgmstream(channels, loop_flag);
if (!vgmstream) goto fail;
vgmstream->meta_type = meta_VAS;
vgmstream->meta_type = meta_VAS_ROCKSTAR;
vgmstream->coding_type = coding_PSX;
vgmstream->num_streams = num_streams;
vgmstream->sample_rate = sample_rate;

View File

@ -39,7 +39,7 @@ init_vgmstream_t init_vgmstream_functions[] = {
init_vgmstream_cstr,
init_vgmstream_gcsw,
init_vgmstream_ads,
init_vgmstream_nps,
init_vgmstream_npsf,
init_vgmstream_xa,
init_vgmstream_rxws,
init_vgmstream_ngc_dsp_stm,
@ -98,8 +98,6 @@ init_vgmstream_t init_vgmstream_functions[] = {
init_vgmstream_vsv,
init_vgmstream_ps2_pcm,
init_vgmstream_ps2_rkv,
init_vgmstream_ps2_vas,
init_vgmstream_ps2_vas_container,
init_vgmstream_lp_ap_lep,
init_vgmstream_sdt,
init_vgmstream_aix,
@ -524,11 +522,13 @@ init_vgmstream_t init_vgmstream_functions[] = {
init_vgmstream_gwb_gwd,
init_vgmstream_s_pack,
init_vgmstream_cbx,
init_vgmstream_vas,
init_vgmstream_vas_rockstar,
/* lower priority metas (no clean header identity, somewhat ambiguous, or need extension/companion file to identify) */
init_vgmstream_scd_pcm,
init_vgmstream_agsc,
init_vgmstream_scd_pcm,
init_vgmstream_vas_kceo,
init_vgmstream_vas_kceo_container,
init_vgmstream_ps2_wmus,
init_vgmstream_mib_mih,
init_vgmstream_mjb_mjh,

View File

@ -344,7 +344,7 @@ typedef enum {
meta_SCD_PCM, /* Lunar - Eternal Blue */
meta_PS2_PCM, /* Konami KCEJ East: Ephemeral Fantasia, Yu-Gi-Oh! The Duelists of the Roses, 7 Blades */
meta_PS2_RKV, /* Legacy of Kain - Blood Omen 2 (PS2) */
meta_PS2_VAS, /* Pro Baseball Spirits 5 */
meta_VAS_KCEO,
meta_LP_AP_LEP,
meta_SDT, /* Baldur's Gate - Dark Alliance */
meta_STR_SEGA,
@ -705,7 +705,7 @@ typedef enum {
meta_NXOF,
meta_GWB_GWD,
meta_CBX,
meta_VAS,
meta_VAS_ROCKSTAR,
} meta_t;