mirror of
https://github.com/vgmstream/vgmstream.git
synced 2025-01-31 04:13:47 +01:00
Add .dsb [Taiko no Tatsujin DS: Dororon! Yokai Daikessen!! (DS)]
This commit is contained in:
parent
d263b9c080
commit
aa58da7ca1
@ -150,6 +150,7 @@ static const char* extension_list[] = {
|
|||||||
"diva",
|
"diva",
|
||||||
"dmsg",
|
"dmsg",
|
||||||
"ds2", //txth/reserved [Star Wars Bounty Hunter (GC)]
|
"ds2", //txth/reserved [Star Wars Bounty Hunter (GC)]
|
||||||
|
"dsb",
|
||||||
"dsf",
|
"dsf",
|
||||||
"dsp",
|
"dsp",
|
||||||
"dspw",
|
"dspw",
|
||||||
|
@ -660,6 +660,10 @@
|
|||||||
RelativePath=".\meta\dmsg_segh.c"
|
RelativePath=".\meta\dmsg_segh.c"
|
||||||
>
|
>
|
||||||
</File>
|
</File>
|
||||||
|
<File
|
||||||
|
RelativePath=".\meta\dsb.c"
|
||||||
|
>
|
||||||
|
</File>
|
||||||
<File
|
<File
|
||||||
RelativePath=".\meta\dsf.c"
|
RelativePath=".\meta\dsf.c"
|
||||||
>
|
>
|
||||||
|
@ -316,6 +316,7 @@
|
|||||||
<ClCompile Include="meta\derf.c" />
|
<ClCompile Include="meta\derf.c" />
|
||||||
<ClCompile Include="meta\diva.c" />
|
<ClCompile Include="meta\diva.c" />
|
||||||
<ClCompile Include="meta\dmsg_segh.c" />
|
<ClCompile Include="meta\dmsg_segh.c" />
|
||||||
|
<ClCompile Include="meta\dsb.c" />
|
||||||
<ClCompile Include="meta\dsf.c" />
|
<ClCompile Include="meta\dsf.c" />
|
||||||
<ClCompile Include="meta\dsp_adx.c" />
|
<ClCompile Include="meta\dsp_adx.c" />
|
||||||
<ClCompile Include="meta\dsp_bdsp.c" />
|
<ClCompile Include="meta\dsp_bdsp.c" />
|
||||||
|
@ -457,6 +457,9 @@
|
|||||||
<ClCompile Include="meta\dmsg_segh.c">
|
<ClCompile Include="meta\dmsg_segh.c">
|
||||||
<Filter>meta\Source Files</Filter>
|
<Filter>meta\Source Files</Filter>
|
||||||
</ClCompile>
|
</ClCompile>
|
||||||
|
<ClCompile Include="meta\dsb.c">
|
||||||
|
<Filter>meta\Source Files</Filter>
|
||||||
|
</ClCompile>
|
||||||
<ClCompile Include="meta\dsf.c">
|
<ClCompile Include="meta\dsf.c">
|
||||||
<Filter>meta\Source Files</Filter>
|
<Filter>meta\Source Files</Filter>
|
||||||
</ClCompile>
|
</ClCompile>
|
||||||
|
54
src/meta/dsb.c
Normal file
54
src/meta/dsb.c
Normal file
@ -0,0 +1,54 @@
|
|||||||
|
#include "meta.h"
|
||||||
|
#include "../coding/coding.h"
|
||||||
|
|
||||||
|
/* .dsb - from Namco games [Taiko no Tatsujin DS: Dororon! Yokai Daikessen!! (DS)] */
|
||||||
|
VGMSTREAM* init_vgmstream_dsb(STREAMFILE* sf) {
|
||||||
|
VGMSTREAM* vgmstream = NULL;
|
||||||
|
STREAMFILE* temp_sf = NULL;
|
||||||
|
off_t subfile_offset;
|
||||||
|
size_t subfile_size;
|
||||||
|
|
||||||
|
|
||||||
|
/* checks */
|
||||||
|
if (!check_extensions(sf,"dsb"))
|
||||||
|
goto fail;
|
||||||
|
if (read_u32be(0x00,sf) != 0x44535342) /* "DSSB" */
|
||||||
|
goto fail;
|
||||||
|
if (read_u32be(0x40,sf) != 0x44535354) /* "DSST" */
|
||||||
|
goto fail;
|
||||||
|
|
||||||
|
/* - DDSB:
|
||||||
|
* 0x04: chunk size
|
||||||
|
* 0x08: file name
|
||||||
|
* 0x14: sample rate
|
||||||
|
* 0x18: v01?
|
||||||
|
* 0x1c: file size
|
||||||
|
* 0x20: DSST offset
|
||||||
|
*
|
||||||
|
* - DDST:
|
||||||
|
* 0x44: chunk size
|
||||||
|
* 0x48: file name
|
||||||
|
* 0x58: small signed number?
|
||||||
|
* 0x5c: data size (with padding)
|
||||||
|
* 0x60: small signed number?
|
||||||
|
* 0x64: ?
|
||||||
|
* rest: null
|
||||||
|
*/
|
||||||
|
|
||||||
|
subfile_offset = 0x80;
|
||||||
|
subfile_size = read_u32be(0x80 + 0x04, sf) + 0x08; /* files are padded so use BNSF */
|
||||||
|
|
||||||
|
temp_sf = setup_subfile_streamfile(sf, subfile_offset, subfile_size, "bnsf");
|
||||||
|
if (!temp_sf) goto fail;
|
||||||
|
|
||||||
|
vgmstream = init_vgmstream_bnsf(temp_sf);
|
||||||
|
if (!vgmstream) goto fail;
|
||||||
|
|
||||||
|
close_streamfile(temp_sf);
|
||||||
|
return vgmstream;
|
||||||
|
|
||||||
|
fail:
|
||||||
|
close_streamfile(temp_sf);
|
||||||
|
close_vgmstream(vgmstream);
|
||||||
|
return NULL;
|
||||||
|
}
|
@ -913,4 +913,6 @@ VGMSTREAM* init_vgmstream_adp_konami(STREAMFILE* sf);
|
|||||||
|
|
||||||
VGMSTREAM* init_vgmstream_zwv(STREAMFILE* sf);
|
VGMSTREAM* init_vgmstream_zwv(STREAMFILE* sf);
|
||||||
|
|
||||||
|
VGMSTREAM* init_vgmstream_dsb(STREAMFILE* sf);
|
||||||
|
|
||||||
#endif /*_META_H*/
|
#endif /*_META_H*/
|
||||||
|
@ -506,6 +506,7 @@ VGMSTREAM* (*init_vgmstream_functions[])(STREAMFILE* sf) = {
|
|||||||
init_vgmstream_ktsc,
|
init_vgmstream_ktsc,
|
||||||
init_vgmstream_adp_konami,
|
init_vgmstream_adp_konami,
|
||||||
init_vgmstream_zwv,
|
init_vgmstream_zwv,
|
||||||
|
init_vgmstream_dsb,
|
||||||
|
|
||||||
/* 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 */
|
||||||
|
Loading…
x
Reference in New Issue
Block a user