diff --git a/src/formats.c b/src/formats.c index e604de75..a44f282b 100644 --- a/src/formats.c +++ b/src/formats.c @@ -1021,7 +1021,7 @@ static const meta_info meta_info_list[] = { {meta_LEG, "Legaia 2 - Duel Saga LEG Header"}, {meta_FILP, "Bio Hazard - Gun Survivor FILp Header"}, {meta_IKM, "MiCROViSiON IKM header"}, - {meta_SFS, "String .SFS header"}, + {meta_STER, "ALCHEMY STER header"}, {meta_SAT_DVI, "Konami KCEN DVI. header"}, {meta_DC_KCEY, "Konami KCEY KCEYCOMP header"}, {meta_BG00, "Falcom BG00 Header"}, @@ -1140,7 +1140,6 @@ static const meta_info meta_info_list[] = { {meta_PONA_PSX, "Policenauts BGM header"}, {meta_NGC_DSP_AAAP, "Acclaim Austin AAAp DSP header"}, {meta_NGC_DSP_KONAMI, "Konami DSP header"}, - {meta_PS2_STER, "STER Header"}, {meta_BNSF, "Namco Bandai BNSF header"}, {meta_PS2_WB, "Shooting Love. ~TRIZEAL~ WB header"}, {meta_S14, "Namco .S14 raw header"}, diff --git a/src/libvgmstream.vcxproj b/src/libvgmstream.vcxproj index 929aa4e8..bd4577af 100644 --- a/src/libvgmstream.vcxproj +++ b/src/libvgmstream.vcxproj @@ -492,7 +492,6 @@ - diff --git a/src/libvgmstream.vcxproj.filters b/src/libvgmstream.vcxproj.filters index 4f4894c8..a7108931 100644 --- a/src/libvgmstream.vcxproj.filters +++ b/src/libvgmstream.vcxproj.filters @@ -955,9 +955,6 @@ meta\Source Files - - meta\Source Files - meta\Source Files diff --git a/src/meta/meta.h b/src/meta/meta.h index 19541b02..57608abe 100644 --- a/src/meta/meta.h +++ b/src/meta/meta.h @@ -225,7 +225,7 @@ VGMSTREAM * init_vgmstream_filp(STREAMFILE * streamFile); VGMSTREAM* init_vgmstream_ikm(STREAMFILE* sf); -VGMSTREAM * init_vgmstream_sfs(STREAMFILE * streamFile); +VGMSTREAM* init_vgmstream_ster(STREAMFILE* sf); VGMSTREAM * init_vgmstream_sat_dvi(STREAMFILE * streamFile); @@ -451,8 +451,6 @@ VGMSTREAM * init_vgmstream_dmsg(STREAMFILE* streamFile); VGMSTREAM * init_vgmstream_ngc_dsp_konami(STREAMFILE* streamFile); -VGMSTREAM * init_vgmstream_ps2_ster(STREAMFILE* streamFile); - VGMSTREAM * init_vgmstream_bnsf(STREAMFILE* streamFile); VGMSTREAM * init_vgmstream_ps2_wb(STREAMFILE* streamFile); diff --git a/src/meta/ps2_sfs.c b/src/meta/ps2_sfs.c index 97de7a32..293ea80e 100644 --- a/src/meta/ps2_sfs.c +++ b/src/meta/ps2_sfs.c @@ -1,8 +1,8 @@ #include "meta.h" #include "../coding/coding.h" -/* SFS - from Sting games [Baroque (PS2)] */ -VGMSTREAM* init_vgmstream_sfs(STREAMFILE* sf) { +/* STER - from Silicon Studios/Vicarious Visions's ALCHEMY middleware [Baroque (PS2), Star Soldier (PS2)] */ +VGMSTREAM* init_vgmstream_ster(STREAMFILE* sf) { VGMSTREAM* vgmstream = NULL; off_t start_offset; int loop_flag, channels, sample_rate; @@ -10,8 +10,9 @@ VGMSTREAM* init_vgmstream_sfs(STREAMFILE* sf) { /* checks */ - /* .sfs: bigfile extension (no apparent names) */ - if (!check_extensions(sf, "sfs")) + /* .ster: header id (no apparent names/extensions) + * .sfs: generic bigfile extension (to be removed?)*/ + if (!check_extensions(sf, "ster,sfs")) goto fail; if (!is_id32be(0x00,sf, "STER")) @@ -20,9 +21,10 @@ VGMSTREAM* init_vgmstream_sfs(STREAMFILE* sf) { loop_start = read_u32le(0x08, sf); /* absolute (ex. offset 0x50 for full loops) */ /* 0x0c: data size BE */ sample_rate = read_s32be(0x10,sf); + /* 0x14~20: null */ loop_flag = loop_start != 0xFFFFFFFF; - channels = 2; + channels = 2; /* mono files are simply .VAG */ start_offset = 0x30; @@ -30,7 +32,7 @@ VGMSTREAM* init_vgmstream_sfs(STREAMFILE* sf) { vgmstream = allocate_vgmstream(channels, loop_flag); if (!vgmstream) goto fail; - vgmstream->meta_type = meta_SFS; + vgmstream->meta_type = meta_STER; vgmstream->sample_rate = sample_rate; vgmstream->num_samples = ps_bytes_to_samples(channel_size, 1); diff --git a/src/meta/ps2_ster.c b/src/meta/ps2_ster.c deleted file mode 100644 index f56e57c5..00000000 --- a/src/meta/ps2_ster.c +++ /dev/null @@ -1,66 +0,0 @@ -#include "meta.h" -#include "../util.h" - -/* STER (from Juuni Kokuki: Kakukaku Taru Ou Michi Beni Midori no Uka) */ -VGMSTREAM * init_vgmstream_ps2_ster(STREAMFILE *streamFile) { - VGMSTREAM * vgmstream = NULL; - char filename[PATH_LIMIT]; - off_t start_offset; - - int loop_flag; - int channel_count; - - /* check extension, case insensitive */ - streamFile->get_name(streamFile,filename,sizeof(filename)); - if (strcasecmp("ster",filename_extension(filename))) goto fail; - - /* check header */ - if (read_32bitBE(0x00,streamFile) != 0x53544552) /* "STER" */ - goto fail; - - - loop_flag = (read_16bitLE(0xB,streamFile)==0); - channel_count = 2; - - /* build the VGMSTREAM */ - vgmstream = allocate_vgmstream(channel_count,loop_flag); - if (!vgmstream) goto fail; - - /* fill in the vital statistics */ - start_offset = 0x30; - vgmstream->channels = channel_count; - vgmstream->sample_rate = read_32bitBE(0x10,streamFile); - vgmstream->coding_type = coding_PSX; - vgmstream->num_samples = read_32bitLE(0x4,streamFile)*56/32; - if (loop_flag) { - vgmstream->loop_start_sample = read_32bitLE(0x8,streamFile)*28/32; - vgmstream->loop_end_sample = vgmstream->num_samples; - } - - vgmstream->layout_type = layout_interleave; - vgmstream->interleave_block_size = 0x10; - vgmstream->meta_type = meta_PS2_STER; - - /* open the file for reading */ - { - int i; - STREAMFILE * file; - file = streamFile->open(streamFile,filename,STREAMFILE_DEFAULT_BUFFER_SIZE); - if (!file) goto fail; - for (i=0;ich[i].streamfile = file; - - vgmstream->ch[i].channel_start_offset= - vgmstream->ch[i].offset=start_offset+ - vgmstream->interleave_block_size*i; - - } - } - - return vgmstream; - - /* clean up anything we may have opened */ -fail: - if (vgmstream) close_vgmstream(vgmstream); - return NULL; -} diff --git a/src/vgmstream.c b/src/vgmstream.c index 25a5dd1e..143e14db 100644 --- a/src/vgmstream.c +++ b/src/vgmstream.c @@ -93,7 +93,7 @@ VGMSTREAM* (*init_vgmstream_functions[])(STREAMFILE* sf) = { init_vgmstream_leg, init_vgmstream_filp, init_vgmstream_ikm, - init_vgmstream_sfs, + init_vgmstream_ster, init_vgmstream_bg00, init_vgmstream_sat_dvi, init_vgmstream_dc_kcey, @@ -216,7 +216,6 @@ VGMSTREAM* (*init_vgmstream_functions[])(STREAMFILE* sf) = { init_vgmstream_dmsg, init_vgmstream_ngc_dsp_aaap, init_vgmstream_ngc_dsp_konami, - init_vgmstream_ps2_ster, init_vgmstream_ps2_wb, init_vgmstream_bnsf, init_vgmstream_ps2_gcm, diff --git a/src/vgmstream.h b/src/vgmstream.h index 126ab0ed..55240954 100644 --- a/src/vgmstream.h +++ b/src/vgmstream.h @@ -383,7 +383,7 @@ typedef enum { meta_LEG, /* Legaia 2 [no header_id] */ meta_FILP, /* Resident Evil - Dead Aim */ meta_IKM, - meta_SFS, /* Baroque */ + meta_STER, meta_BG00, /* Ibara, Mushihimesama */ meta_PS2_RSTM, /* Midnight Club 3 */ meta_PS2_KCES, /* Dance Dance Revolution */ @@ -513,7 +513,6 @@ typedef enum { meta_AST_MMV, meta_DMSG, /* Nightcaster II - Equinox (XBOX) */ meta_NGC_DSP_AAAP, /* Turok: Evolution (NGC), Vexx (NGC) */ - meta_PS2_STER, /* Juuni Kokuki: Kakukaku Taru Ou Michi Beni Midori no Uka */ meta_PS2_WB, /* Shooting Love. ~TRIZEAL~ */ meta_S14, /* raw Siren 14, 24kbit mono */ meta_SSS, /* raw Siren 14, 48kbit stereo */