Remove fake .tec extension (use .str + TXTH)

This commit is contained in:
bnnm 2022-08-14 12:28:46 +02:00
parent 98f07890d8
commit b880c480d3
8 changed files with 1 additions and 104 deletions

View File

@ -69,7 +69,7 @@ as explained below, but often will use default values. Accepted codec strings:
# * For many PS1/PS2/PS3 games
# * Interleave is multiple of 0x10 (default), often +0x1000
# - PSX_bf PlayStation ADPCM with bad flags
# * Variation with garbage data, for rare PS2 games
# * Variation with garbage data, for rare PS2 games [Fatal Frame (PS2)]
# - HEVAG Vita/PS4 ADPCM
# * For some Vita/PS4 games
# * Interleave is multiple of 0x10 (default)

View File

@ -539,7 +539,6 @@ static const char* extension_list[] = {
"szd3",
"tad",
"tec",
"tgq",
"tgv",
"thp",
@ -1060,7 +1059,6 @@ static const meta_info meta_info_list[] = {
{meta_PS2_PCM, "Konami KCEJ East .PCM header"},
{meta_PS2_RKV, "Legacy of Kain - Blood Omen 2 RKV PS2 header"},
{meta_PS2_VAS, "Konami .VAS header"},
{meta_PS2_TEC, "assumed TECMO badflagged stream by .tec extension"},
{meta_PS2_ENTH, ".enth Header"},
{meta_SDT, "High Voltage .sdt header"},
{meta_NGC_TYDSP, ".tydsp Header"},

View File

@ -504,7 +504,6 @@
<ClCompile Include="meta\ps2_sps.c" />
<ClCompile Include="meta\svag_kcet.c" />
<ClCompile Include="meta\svag_snk.c" />
<ClCompile Include="meta\ps2_tec.c" />
<ClCompile Include="meta\ps2_tk5.c" />
<ClCompile Include="meta\vag.c" />
<ClCompile Include="meta\ps2_vas.c" />

View File

@ -976,9 +976,6 @@
<ClCompile Include="meta\svag_snk.c">
<Filter>meta\Source Files</Filter>
</ClCompile>
<ClCompile Include="meta\ps2_tec.c">
<Filter>meta\Source Files</Filter>
</ClCompile>
<ClCompile Include="meta\ps2_tk5.c">
<Filter>meta\Source Files</Filter>
</ClCompile>

View File

@ -255,8 +255,6 @@ 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_ps2_tec(STREAMFILE * streamFile);
VGMSTREAM * init_vgmstream_ps2_enth(STREAMFILE * streamFile);
VGMSTREAM * init_vgmstream_sdt(STREAMFILE * streamFile);

View File

@ -1,93 +0,0 @@
#include "meta.h"
#include "../util.h"
/* TEC (from TECMO games) */
/* probably TECMO Vag Stream */
VGMSTREAM * init_vgmstream_ps2_tec(STREAMFILE *streamFile) {
VGMSTREAM * vgmstream = NULL;
char filename[PATH_LIMIT];
int loop_flag;
int channel_count;
int current_chunk;
off_t start_offset;
int dataBuffer = 0;
int Founddata = 0;
/* check extension, case insensitive */
streamFile->get_name(streamFile,filename,sizeof(filename));
if (strcasecmp("tec",filename_extension(filename))) goto fail;
loop_flag = 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 = 0x0;
vgmstream->channels = channel_count;
vgmstream->sample_rate = 44100;
vgmstream->coding_type = coding_PSX_badflags;
vgmstream->num_samples = get_streamfile_size(streamFile)*28/16/channel_count;
if (loop_flag) {
vgmstream->loop_start_sample = 0;
vgmstream->loop_end_sample = get_streamfile_size(streamFile)*28/16/channel_count;
}
// Check the first frame header (should be always zero)
if ((uint8_t)(read_8bit(0x00,streamFile) != 0x0))
goto fail;
// Scan for Interleave
{
current_chunk = 16;
while (!Founddata && current_chunk < 65536) {
dataBuffer = (uint8_t)(read_8bit(current_chunk,streamFile));
if (dataBuffer == 0x0) { /* "0x0" */
Founddata = 1;
break;
}
current_chunk = current_chunk + 16;
}
}
// Cancel if we can't find an interleave
if (Founddata == 0) {
goto fail;
} else if (Founddata == 1) {
vgmstream->layout_type = layout_interleave;
vgmstream->interleave_block_size = current_chunk;
}
// Cancel if the first flag isn't invalid/bad
if ((uint8_t)(read_8bit(0x01,streamFile) == 0x0))
goto fail;
if ((uint8_t)(read_8bit(0x01+current_chunk,streamFile) == 0x0))
goto fail;
vgmstream->meta_type = meta_PS2_TEC;
/* 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;i<channel_count;i++) {
vgmstream->ch[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;
}

View File

@ -102,7 +102,6 @@ VGMSTREAM* (*init_vgmstream_functions[])(STREAMFILE* sf) = {
init_vgmstream_ps2_rkv,
init_vgmstream_ps2_vas,
init_vgmstream_ps2_vas_container,
init_vgmstream_ps2_tec,
init_vgmstream_ps2_enth,
init_vgmstream_sdt,
init_vgmstream_aix,

View File

@ -395,7 +395,6 @@ typedef enum {
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_PS2_TEC, /* TECMO badflagged stream */
meta_PS2_ENTH, /* Enthusia */
meta_SDT, /* Baldur's Gate - Dark Alliance */
meta_NGC_TYDSP, /* Ty - The Tasmanian Tiger */