mirror of
https://github.com/vgmstream/vgmstream.git
synced 2024-11-23 22:41:05 +01:00
Merge pull request #1634 from bnnm/awc-etc
- Add .awc Opus/RIFF [Red Dead Redemption (PC)] - Add HCA key - CLI: fix infinite loop with non-ascii filenames
This commit is contained in:
commit
73ef7c6c15
@ -79,7 +79,8 @@ void replace_filename(char* dst, size_t dstsize, cli_config_t* cfg, VGMSTREAM* v
|
||||
}
|
||||
else {
|
||||
/* not recognized */
|
||||
continue;
|
||||
// TO-DO should move buf or swap "?" with "_"? may happen with non-ascii on Windows; for now break to avoid infinite loops
|
||||
break;
|
||||
}
|
||||
|
||||
/* copy result to buf again, so it can be used as format in next replace
|
||||
|
@ -156,7 +156,7 @@ VGMSTREAM* init_vgmstream_awc(STREAMFILE* sf) {
|
||||
#endif
|
||||
|
||||
#ifdef VGM_USE_ATRAC9
|
||||
case 0x0F: { /* ATRAC9 (PC) [Red Dead Redemption (PS4)] */
|
||||
case 0x0F: { /* ATRAC9 (PS4) [Red Dead Redemption (PS4)] */
|
||||
if (awc.is_streamed) {
|
||||
vgmstream->layout_data = build_layered_awc(sf_body, &awc);
|
||||
if (!vgmstream->layout_data) goto fail;
|
||||
@ -205,6 +205,50 @@ VGMSTREAM* init_vgmstream_awc(STREAMFILE* sf) {
|
||||
}
|
||||
break;
|
||||
|
||||
#ifdef VGM_USE_ATRAC9
|
||||
case 0x0D: { /* OPUS (PC) [Red Dead Redemption (PC)] */
|
||||
if (awc.is_streamed) {
|
||||
vgmstream->layout_data = build_layered_awc(sf_body, &awc);
|
||||
if (!vgmstream->layout_data) goto fail;
|
||||
vgmstream->layout_type = layout_layered;
|
||||
vgmstream->coding_type = coding_FFmpeg;
|
||||
}
|
||||
else {
|
||||
VGM_LOG("AWC: unknown non-streamed Opus mode\n");
|
||||
goto fail;
|
||||
}
|
||||
break;
|
||||
}
|
||||
#endif
|
||||
|
||||
case 0x11: { /* RIFF-MSADPCM (PC) [Red Dead Redemption (PC)] */
|
||||
if (awc.is_streamed) {
|
||||
VGM_LOG("AWC: unknown streamed mode for codec 0x%02x\n", awc.codec);
|
||||
goto fail;
|
||||
}
|
||||
else {
|
||||
VGMSTREAM* temp_vs = NULL;
|
||||
STREAMFILE* temp_sf = NULL;
|
||||
|
||||
temp_sf = setup_subfile_streamfile(sf_body, awc.stream_offset, awc.stream_size, "wav");
|
||||
if (!temp_sf) goto fail;
|
||||
|
||||
temp_vs = init_vgmstream_riff(temp_sf);
|
||||
close_streamfile(temp_sf);
|
||||
if (!temp_vs) goto fail;
|
||||
|
||||
temp_vs->num_streams = vgmstream->num_streams;
|
||||
temp_vs->stream_size = vgmstream->stream_size;
|
||||
temp_vs->meta_type = vgmstream->meta_type;
|
||||
strcpy(temp_vs->stream_name, vgmstream->stream_name);
|
||||
|
||||
close_vgmstream(vgmstream);
|
||||
//vgmstream = temp_vs;
|
||||
return temp_vs;
|
||||
}
|
||||
break;
|
||||
}
|
||||
|
||||
case 0xFF:
|
||||
vgmstream->coding_type = coding_SILENCE;
|
||||
snprintf(vgmstream->stream_name, STREAM_NAME_SIZE, "[%s]", "midi");
|
||||
@ -617,6 +661,24 @@ static VGMSTREAM* build_blocks_vgmstream(STREAMFILE* sf, awc_header* awc, int ch
|
||||
break;
|
||||
}
|
||||
#endif
|
||||
#ifdef VGM_USE_FFMPEG
|
||||
case 0x0D: {
|
||||
opus_config cfg = {0};
|
||||
|
||||
/* read from first block (all blocks have it but same thing), see awc_streamfile.h */
|
||||
uint32_t frame_size_offset = awc->stream_offset + 0x10 * awc->channels + 0x70 * channel + 0x04;
|
||||
|
||||
cfg.frame_size = read_u16le(frame_size_offset, sf); // always 0x50?
|
||||
cfg.channels = 1;
|
||||
|
||||
vgmstream->codec_data = init_ffmpeg_fixed_opus(temp_sf, substream_offset, substream_size, &cfg);
|
||||
if (!vgmstream->codec_data) goto fail;
|
||||
vgmstream->coding_type = coding_FFmpeg;
|
||||
vgmstream->layout_type = layout_none;
|
||||
|
||||
break;
|
||||
}
|
||||
#endif
|
||||
#ifdef VGM_USE_ATRAC9
|
||||
case 0x0F: {
|
||||
atrac9_config cfg = {0};
|
||||
@ -669,9 +731,8 @@ fail:
|
||||
// independently.
|
||||
//
|
||||
// This can be simulated by making one decoder per block (segmented, but opens too many SFs and can't skip
|
||||
// samples correctly), or with a custom STREAMFILE that skips repeated block (works ok-ish but not all codecs).
|
||||
// samples correctly), or with a custom STREAMFILE that skips repeated block (works ok-ish).
|
||||
static layered_layout_data* build_layered_awc(STREAMFILE* sf, awc_header* awc) {
|
||||
int i;
|
||||
layered_layout_data* data = NULL;
|
||||
|
||||
|
||||
@ -680,7 +741,7 @@ static layered_layout_data* build_layered_awc(STREAMFILE* sf, awc_header* awc) {
|
||||
if (!data) goto fail;
|
||||
|
||||
/* open each layer subfile */
|
||||
for (i = 0; i < awc->channels; i++) {
|
||||
for (int i = 0; i < awc->channels; i++) {
|
||||
data->layers[i] = build_blocks_vgmstream(sf, awc, i);
|
||||
if (!data->layers[i]) goto fail;
|
||||
}
|
||||
|
@ -61,9 +61,9 @@ typedef struct {
|
||||
* 0x00: "D11A"
|
||||
* 0x04: frame size
|
||||
* 0x06: frame samples
|
||||
* 0x08: flags? (0x0103=AT9, 0x0104=DSP)
|
||||
* 0x08: flags? (0x0101=OPUS, 0x0103=AT9, 0x0104=DSP)
|
||||
* 0x0a: sample rate
|
||||
* 0x0c: ATRAC9 config (repeated but same for all blocks) or "D11E" (DSP)
|
||||
* 0x0c: ATRAC9 config (repeated but same for all blocks) or "D11E" (OPUS/DSP)
|
||||
* 0x10-0x70: padding with 0x77 (ATRAC3) or standard DSP header for original full file (DSP)
|
||||
* - padding up to data start, depending on codec (DSP/ATRAC9: none, others: aligned to 0x800)
|
||||
*/
|
||||
@ -91,6 +91,7 @@ static bool read_awc_block(STREAMFILE* sf, awc_block_info_t* bi) {
|
||||
extra_entry_size = 0x00;
|
||||
header_padding = 0x800;
|
||||
break;
|
||||
case 0x0D: /* OPUS */
|
||||
case 0x0F: /* ATRAC9 */
|
||||
channel_entry_size = 0x10;
|
||||
seek_entry_size = 0x00;
|
||||
@ -136,6 +137,7 @@ static bool read_awc_block(STREAMFILE* sf, awc_block_info_t* bi) {
|
||||
bi->blk[ch].chunk_size = align_size_to_block(bi->blk[ch].channel_size, 0x10);
|
||||
//bi->blk[ch].channel_size = (pre-loaded);
|
||||
break;
|
||||
case 0x0D: /* OPUS */
|
||||
case 0x0F: /* ATRAC9 */
|
||||
bi->blk[ch].frame_size = read_u16(offset + 0x04, sf);
|
||||
bi->blk[ch].chunk_size = bi->blk[ch].entries * bi->blk[ch].frame_size;
|
||||
@ -217,6 +219,7 @@ static uint32_t get_block_repeated_size(STREAMFILE* sf, awc_block_info_t* bi, in
|
||||
return skip_size; /* skip_size fills frame size */
|
||||
}
|
||||
|
||||
case 0x0D: /* OPUS */
|
||||
case 0x0F: /* ATRAC9 */
|
||||
default:
|
||||
VGM_LOG("AWC: found channel skip in codec %x\n", bi->codec); /* not seen */
|
||||
|
@ -44,8 +44,8 @@ static const hcakey_info hcakey_list[] = {
|
||||
// - Seitokai no Ichizon Lv. 2 Portable (PSP)
|
||||
// - Koi wa Kousoku ni Shibararenai! (PSP)
|
||||
// - StormLover 2nd (PSP)
|
||||
// - Prince of Stride (PSVita)
|
||||
// - Ro-Kyu-Bu! Naisho no Shutter Chance (PSVita)
|
||||
// - Prince of Stride (Vita)
|
||||
// - Ro-Kyu-Bu! Naisho no Shutter Chance (Vita)
|
||||
{1234253142}, // 0000000049913556
|
||||
|
||||
// THE iDOLM@STER Cinderella Girls: Starlight Stage (iOS/Android)
|
||||
@ -141,7 +141,7 @@ static const hcakey_info hcakey_list[] = {
|
||||
// Schoolgirl Strikers ~Twinkle Melodies~ (iOS/Android)
|
||||
{15806334760965177344u}, // DB5B61B8343D0000
|
||||
|
||||
// Bad Apple Wars (PSVita)
|
||||
// Bad Apple Wars (Vita)
|
||||
{241352432}, // 000000000E62BEF0
|
||||
|
||||
// Koi to Senkyo to Chocolate Portable (PSP)
|
||||
@ -150,7 +150,7 @@ static const hcakey_info hcakey_list[] = {
|
||||
// Custom Drive (PSP)
|
||||
{2012062010}, // 0000000077EDA13A
|
||||
|
||||
// Root Letter (PSVita)
|
||||
// Root Letter (Vita)
|
||||
{1547531215412131}, // 00057F78B05F9BA3
|
||||
|
||||
// Pro Evolution Soccer 2018 / Winning Eleven 2018 (Android)
|
||||
@ -418,13 +418,14 @@ static const hcakey_info hcakey_list[] = {
|
||||
|
||||
/* D4DJ Groovy Mix (Android) [base files] */
|
||||
{393410674916959300}, // 0575ACECA945A444
|
||||
/* D4DJ Groovy Mix (Android) [music_* files, per-song later mixed with subkey] */
|
||||
|
||||
/* D4DJ Groovy Mix (Android) [music_* files, per-song also mixed with subkey] */
|
||||
{0x59f449354d063308}, // music_0000001
|
||||
{0xf19d4cb84172f7ab}, // music_0000004
|
||||
{0xc4276ffaee4aadec}, // music_0000005
|
||||
{0x683d739be9679e61}, // music_0000006
|
||||
{0xa3adc531c32bb128}, // music_0000007
|
||||
{0xbb8f42a806d1fa6}, //music_0000008
|
||||
{0x0bb8f42a806d1fa6}, // music_0000008
|
||||
{0xfd6e5a721921d936}, // music_0000009
|
||||
{0x7749847207a5f0da}, // music_0000010
|
||||
{0x5fcc1b142892c55c}, // music_0000011
|
||||
@ -442,7 +443,7 @@ static const hcakey_info hcakey_list[] = {
|
||||
{0xfcce3164db70522d}, // music_0110013
|
||||
{0x47f52330df2ead11}, // music_0110014
|
||||
{0x2f778c736a8a4597}, // music_0110015
|
||||
{0xa90c8ebf8463d05}, //music_0110016
|
||||
{0x0a90c8ebf8463d05}, // music_0110016
|
||||
{0x750beaf22ddc700b}, // music_0110018
|
||||
{0x16ccc93f976a8329}, // music_0110019
|
||||
{0x9f7a0810034669fe}, // music_0110020
|
||||
@ -465,7 +466,7 @@ static const hcakey_info hcakey_list[] = {
|
||||
{0x417822c4c107541c}, // music_0110037
|
||||
{0xfb647d074e53fab6}, // music_0120001
|
||||
{0xc24049b9f7ed3105}, // music_0120002
|
||||
{0xdc128f2fd48bf4b}, //music_0120003
|
||||
{0x0dc128f2fd48bf4b}, // music_0120003
|
||||
{0xaef2954dc3657336}, // music_0120004
|
||||
{0x567d295828f1b08a}, // music_0120005
|
||||
{0x1bbad843d5971358}, // music_0120006
|
||||
@ -485,7 +486,7 @@ static const hcakey_info hcakey_list[] = {
|
||||
{0x514fa9879fd07278}, // music_0120021
|
||||
{0x3841dd3467659916}, // music_0120022
|
||||
{0xe6b3826413d0dbfc}, // music_0120023
|
||||
{0x1cc0a87f19dd7ca}, //music_0120024
|
||||
{0x01cc0a87f19dd7ca}, // music_0120024
|
||||
{0x480905d4a216f5a6}, // music_0120025
|
||||
{0x253fe8e15f9682b6}, // music_0140001
|
||||
{0x4fffee4065d22bec}, // music_0210001
|
||||
@ -500,7 +501,7 @@ static const hcakey_info hcakey_list[] = {
|
||||
{0x5ef795cdbcdcba91}, // music_0210010
|
||||
{0x868acc0102c59a38}, // music_0210011
|
||||
{0x6dc5ff77263450a5}, // music_0210012
|
||||
{0x1dca436afdd18d9}, //music_0210013
|
||||
{0x01dca436afdd18d9}, // music_0210013
|
||||
{0xaecee65d0f181d3b}, // music_0210014
|
||||
{0x2822bba0a5c4f18c}, // music_0210015
|
||||
{0xff579d3fcfa8453a}, // music_0210016
|
||||
@ -512,7 +513,7 @@ static const hcakey_info hcakey_list[] = {
|
||||
{0xcc7e1e54049f4719}, // music_0210022
|
||||
{0x4c06e4b2e072abaa}, // music_0210023
|
||||
{0xc60bc5aeec280870}, // music_0210024
|
||||
{0xc59613fc788cec7}, //music_0210025
|
||||
{0x0c59613fc788cec7}, // music_0210025
|
||||
{0xf61a0cfac4072903}, // music_0210026
|
||||
{0xa316e41cc9303921}, // music_0210027
|
||||
{0x15bb78c31db0a0b6}, // music_0220001
|
||||
@ -524,11 +525,11 @@ static const hcakey_info hcakey_list[] = {
|
||||
{0xd2cb7692d690b3a7}, // music_0220007
|
||||
{0x2b4a83e7d54d0554}, // music_0220008
|
||||
{0xa691936caf4d91d0}, // music_0220009
|
||||
{0xd40ccba5e10385a}, //music_0220010
|
||||
{0x0d40ccba5e10385a}, // music_0220010
|
||||
{0xf0c624dc0385adae}, // music_0220011
|
||||
{0xce0796d2a956dc5a}, // music_0220012
|
||||
{0xf9d6fb07c0b4e967}, // music_0220013
|
||||
{0x4aa31e0c4f787a8}, //music_0220014
|
||||
{0x04aa31e0c4f787a8}, // music_0220014
|
||||
{0x94466db0d3c10f4b}, // music_0220015
|
||||
{0xe6d1fd6effa46736}, // music_0220017
|
||||
{0xd23bdacd616fc4c9}, // music_0220018
|
||||
@ -605,7 +606,7 @@ static const hcakey_info hcakey_list[] = {
|
||||
{0x75927596a180f3e3}, // music_0410019
|
||||
{0xc3d36676d54255c5}, // music_0410020
|
||||
{0x41283c6f06db3cdd}, // music_0410021
|
||||
{0x198c53b5d345997}, //music_0410022
|
||||
{0x0198c53b5d345997}, // music_0410022
|
||||
{0xd5dcbaceb12dd205}, // music_0410023
|
||||
{0x4b71388640b83c6c}, // music_0410024
|
||||
{0x5b7c2a41095c7b76}, // music_0410025
|
||||
@ -619,17 +620,17 @@ static const hcakey_info hcakey_list[] = {
|
||||
{0x867d47a7d8376402}, // music_0420008
|
||||
{0xf7e11ec9c94402f1}, // music_0420009
|
||||
{0x1bb363adcf4eb3f8}, // music_0420010
|
||||
{0xd80d3dcc7c75cea}, //music_0420011
|
||||
{0x0d80d3dcc7c75cea}, // music_0420011
|
||||
{0x52723f026d5238e8}, // music_0420012
|
||||
{0xd13a315c0005f0}, //music_0420013
|
||||
{0x35f2d3cec84aba1}, //music_0420014
|
||||
{0xdad11fe0e397ede}, //music_0420015
|
||||
{0xc94236c936f50cc}, //music_0420016
|
||||
{0x00d13a315c0005f0}, // music_0420013
|
||||
{0x035f2d3cec84aba1}, // music_0420014
|
||||
{0x0dad11fe0e397ede}, // music_0420015
|
||||
{0x0c94236c936f50cc}, // music_0420016
|
||||
{0xbf8a2d951bc01dff}, // music_0420017
|
||||
{0xb945505638f972e4}, // music_0420018
|
||||
{0xe00590890f7f3219}, // music_0420019
|
||||
{0x8f7e24e32cbceb6a}, // music_0440001
|
||||
{0xdf31e26a7b036a2}, //music_0510001
|
||||
{0x0df31e26a7b036a2}, // music_0510001
|
||||
{0xb2770dced3cfd9a7}, // music_0510002
|
||||
{0x6c6c1fd51e28a1e7}, // music_0510003
|
||||
{0xdcd2a403fb01e164}, // music_0510004
|
||||
@ -643,16 +644,16 @@ static const hcakey_info hcakey_list[] = {
|
||||
{0x1980271cfe0da9bd}, // music_0510012
|
||||
{0x75c5bd4e3a01a8a4}, // music_0510013
|
||||
{0xec5f5fbe92bbb771}, // music_0510014
|
||||
{0xb8c3233338ad8e0}, //music_0510015
|
||||
{0x0b8c3233338ad8e0}, // music_0510015
|
||||
{0xda4ce04dbda1bd7e}, // music_0510016
|
||||
{0x7878df60f0549c4}, //music_0510017
|
||||
{0x07878df60f0549c4}, // music_0510017
|
||||
{0x8e5b7068022828e0}, // music_0510018
|
||||
{0xb069a5c5e2d93edf}, // music_0510019
|
||||
{0x30f9dcefa450733a}, // music_0510020
|
||||
{0xf85695960e2dcb7f}, // music_0510021
|
||||
{0x212604f36a4ddb0c}, // music_0510022
|
||||
{0xef7ee9169b194770}, // music_0510023
|
||||
{0xf3bc872fcb7784b}, //music_0510024
|
||||
{0x0f3bc872fcb7784b}, // music_0510024
|
||||
{0x8e779c6c28690617}, // music_0510025
|
||||
{0x468e4ffeae5afa0e}, // music_0510027
|
||||
{0x15f82c1617013c36}, // music_0520001
|
||||
@ -664,13 +665,13 @@ static const hcakey_info hcakey_list[] = {
|
||||
{0x9de6ace9a0e62f44}, // music_0520007
|
||||
{0x35128087963cd5be}, // music_0520008
|
||||
{0xdf30ed86c3d00ffb}, // music_0520009
|
||||
{0xde4959221bc2675}, //music_0520010
|
||||
{0x0de4959221bc2675}, // music_0520010
|
||||
{0xeeaf8d2458ccdb36}, // music_0520011
|
||||
{0xb140168a47d55b92}, // music_0520012
|
||||
{0x2e8d1134ce415f8c}, // music_0520013
|
||||
{0x1bf43def1e4b103a}, // music_0520014
|
||||
{0x6721ad5109e4840d}, // music_0520015
|
||||
{0xc488dd62fc89090}, //music_0520016
|
||||
{0x0c488dd62fc89090}, // music_0520016
|
||||
{0xd3d24f1db0b74363}, // music_0520019
|
||||
{0xbc99855ebbfa8e97}, // music_0520020
|
||||
{0xb2b54877e3fa1bc6}, // music_0520021
|
||||
@ -680,12 +681,12 @@ static const hcakey_info hcakey_list[] = {
|
||||
{0xe5e83d31e64273f8}, // music_0610003
|
||||
{0xaf9d7a05b0fc3d9e}, // music_0610004
|
||||
{0xcee66d585d689851}, // music_0610005
|
||||
{0x65c2f8500bc12c8}, //music_0610006
|
||||
{0x065c2f8500bc12c8}, // music_0610006
|
||||
{0x7148dda3afa76439}, // music_0610007
|
||||
{0x42548fe4544c2ed7}, // music_0610008
|
||||
{0x9e68da734cc472f}, //music_0610009
|
||||
{0x09e68da734cc472f}, // music_0610009
|
||||
{0xa01c597d1aa13358}, // music_0610010
|
||||
{0x6492e7708204838}, //music_0610011
|
||||
{0x06492e7708204838}, // music_0610011
|
||||
{0x957e4d3948427952}, // music_0610012
|
||||
{0x7081f083ac3d6f0a}, // music_0610013
|
||||
{0xfcfa4dbd1ec6cfcb}, // music_0610014
|
||||
@ -707,11 +708,11 @@ static const hcakey_info hcakey_list[] = {
|
||||
{0x1dd21a1244ca12f1}, // music_0620002
|
||||
{0xfdec74b23d8b494b}, // music_0620003
|
||||
{0x6f9735c02faf6aae}, // music_0620004
|
||||
{0xe978d394512cfd}, //music_0620005
|
||||
{0x00e978d394512cfd}, // music_0620005
|
||||
{0xaba147637d52efbe}, // music_0620006
|
||||
{0xe67f4da6012c5d24}, // music_0620007
|
||||
{0xc352bbf3d519256e}, // music_0620008
|
||||
{0x37d1452c192b1e6}, //music_0620009
|
||||
{0x037d1452c192b1e6}, // music_0620009
|
||||
{0xf7e53533d82d48dd}, // music_0620010
|
||||
{0x33848be13a2884a3}, // music_0620011
|
||||
{0xfab3596f11cc4d7a}, // music_0620012
|
||||
@ -760,9 +761,9 @@ static const hcakey_info hcakey_list[] = {
|
||||
{0x2a47feac8dc3ca9c}, // music_3010001
|
||||
{0x9ebbaf63ffe9d9ef}, // music_3010002
|
||||
{0xe553dba6592293d8}, // music_3010003
|
||||
{0x31e072678ad18a3}, //music_3010004
|
||||
{0x031e072678ad18a3}, // music_3010004
|
||||
{0x4ba9a9471f49b74e}, // music_3010005
|
||||
{0xc917cb864231982}, //music_3010006
|
||||
{0x0c917cb864231982}, // music_3010006
|
||||
{0x7a708e291692abb9}, // music_3010007
|
||||
{0x1ab266a4cbb5133a}, // music_3010008
|
||||
{0x7d4719615fbb2f4d}, // music_3010009
|
||||
@ -792,7 +793,7 @@ static const hcakey_info hcakey_list[] = {
|
||||
{0x46e91ff3014e07f5}, // music_3010034
|
||||
{0xf1895742954806b8}, // music_3010035
|
||||
{0x189b84400394043d}, // music_3010036
|
||||
{0x637e592d471df60}, //music_3010037
|
||||
{0x0637e592d471df60}, // music_3010037
|
||||
{0xa633022c4198673a}, // music_3010038
|
||||
{0x8d410b922905a207}, // music_3010039
|
||||
{0xfd3ea450350d666f}, // music_3020001
|
||||
@ -804,7 +805,7 @@ static const hcakey_info hcakey_list[] = {
|
||||
{0x402b13df5481d4e6}, // music_3020007
|
||||
{0x729efd67aede1a40}, // music_3020008
|
||||
{0xb7b9a143742fa51e}, // music_3020009
|
||||
{0xc7750328bcd329f}, //music_3020010
|
||||
{0x0c7750328bcd329f}, // music_3020010
|
||||
{0xc3dba12eeb4cc308}, // music_3020011
|
||||
{0x5761fe7462b17a3b}, // music_3020012
|
||||
{0x98c7a1d1c45df640}, // music_3020013
|
||||
@ -823,7 +824,7 @@ static const hcakey_info hcakey_list[] = {
|
||||
{0x4ec96dd7db2adfd7}, // music_3020026
|
||||
{0x4876142f5d34d944}, // music_3020027
|
||||
{0x9f12a5003f112aaa}, // music_3020028
|
||||
{0xc8c46d327667edc}, //music_3020029
|
||||
{0x0c8c46d327667edc}, // music_3020029
|
||||
{0x38edf73f19401e1c}, // music_3020030
|
||||
{0xfa2c72797fa3e388}, // music_3020031
|
||||
{0x3966399f31d9de81}, // music_3020032
|
||||
@ -831,7 +832,7 @@ static const hcakey_info hcakey_list[] = {
|
||||
{0x9faba30aa051f691}, // music_3020034
|
||||
{0xaa06f3d3301a97d2}, // music_3020037
|
||||
{0x5b6e11b92acc7903}, // music_3020038
|
||||
{0x44c84f5efae5311}, //music_3020039
|
||||
{0x044c84f5efae5311}, // music_3020039
|
||||
{0x49ade60a55212fc5}, // music_3020040
|
||||
{0xabd145c0bc3a69dc}, // music_3020041
|
||||
{0xd8883291d950e928}, // music_3040001
|
||||
@ -848,7 +849,7 @@ static const hcakey_info hcakey_list[] = {
|
||||
{0xfd9fa5bcb347c01b}, // music_5030011
|
||||
{0x4a4462cb0375001e}, // music_5030012
|
||||
{0xa3711cc06f9b86c2}, // music_5030013
|
||||
{0xaebfdf85aae4424}, //music_5030014
|
||||
{0x0aebfdf85aae4424}, // music_5030014
|
||||
{0x1ed521f6dd691255}, // music_5030015
|
||||
{0xb2bd99fa559b9062}, // music_5030016
|
||||
{0xaff9df030e63e5ba}, // music_5030017
|
||||
@ -856,7 +857,7 @@ static const hcakey_info hcakey_list[] = {
|
||||
{0xa6cefd4472568948}, // music_5030019
|
||||
{0x447d08ca3148599d}, // music_5030020
|
||||
{0xfe31517282d40690}, // music_5030021
|
||||
{0xa6a15cc9722257d}, //music_5030022
|
||||
{0x0a6a15cc9722257d}, // music_5030022
|
||||
{0x55912db4388961ac}, // music_5030023
|
||||
{0x8f5f05c835f7280e}, // music_5030024
|
||||
{0x6750f4d05183bc01}, // music_5030025
|
||||
@ -899,7 +900,7 @@ static const hcakey_info hcakey_list[] = {
|
||||
{0x7679587f7292b057}, // music_5030062
|
||||
{0xc9c804e6fed3387c}, // music_5030063
|
||||
{0xc72eb23bcdc43f42}, // music_5030064
|
||||
{0xf7cedd212a06307}, //music_5030065
|
||||
{0x0f7cedd212a06307}, // music_5030065
|
||||
{0x850ad05f415d6018}, // music_5030066
|
||||
{0x36f62d41aa4203c9}, // music_5030067
|
||||
{0x2174d57bfeafc637}, // music_5030068
|
||||
@ -918,14 +919,14 @@ static const hcakey_info hcakey_list[] = {
|
||||
{0x1dd99ac6f1a07f00}, // music_5030081
|
||||
{0x2fd298ade03f7f0f}, // music_5030082
|
||||
{0xbeb0df818f88b99c}, // music_5030083
|
||||
{0x886df2bdcc645cc}, //music_5030084
|
||||
{0x6420fc8d2d67ef1}, //music_5030085
|
||||
{0x0886df2bdcc645cc}, // music_5030084
|
||||
{0x06420fc8d2d67ef1}, // music_5030085
|
||||
{0x29d61d19434b640b}, // music_5030086
|
||||
{0xf4d7569bb4fa06ab}, // music_5030087
|
||||
{0x1de64ce0c1054a5a}, // music_5030088
|
||||
{0xd51e8d88fff1aa5c}, // music_5030089
|
||||
{0xa2ea81812297bf73}, // music_5030090
|
||||
{0x276f1e23c97cf8d}, //music_5030091
|
||||
{0x0276f1e23c97cf8d}, // music_5030091
|
||||
{0xb59a0df1213c36c9}, // music_5030092
|
||||
{0xebf7bfebb82a4411}, // music_5030093
|
||||
{0xb991fcb8b74f46d7}, // music_5030094
|
||||
@ -950,7 +951,7 @@ static const hcakey_info hcakey_list[] = {
|
||||
{0xf877dea1180b9b90}, // music_5040008
|
||||
{0xcd3fb92065d9f373}, // music_5040009
|
||||
{0xee8da2806a13eecf}, // music_5040010
|
||||
{0x46fd87a21859ac}, //music_5040011
|
||||
{0x0046fd87a21859ac}, // music_5040011
|
||||
{0x90fefcd350bd2cb8}, // music_5040012
|
||||
{0xf7edc5d72fdd6ceb}, // music_5040013
|
||||
{0x4c7d7c251c6bfa95}, // music_5040014
|
||||
@ -962,8 +963,8 @@ static const hcakey_info hcakey_list[] = {
|
||||
{0x7465c7c473e53a40}, // music_5040022
|
||||
{0xfadb1b0f28e951e1}, // music_5040023
|
||||
{0x2f1a04b23ceef9d4}, // music_5040024
|
||||
{0x5e3eba376e0b3dd}, //music_5050001
|
||||
{0xa8ee7a3a20ce822}, //music_5050002
|
||||
{0x05e3eba376e0b3dd}, // music_5050001
|
||||
{0x0a8ee7a3a20ce822}, // music_5050002
|
||||
{0xf42d31b5ecd1aec1}, // music_5050003
|
||||
{0x56ecfc7ef4c65be8}, // music_5050004
|
||||
{0xad071dce0c070e65}, // music_5050005
|
||||
@ -999,8 +1000,8 @@ static const hcakey_info hcakey_list[] = {
|
||||
{0xf8d72c405d3f0456}, // music_5050036
|
||||
{0xd4d5fa6c87342e6b}, // music_5050037
|
||||
{0xd8cbc946fa660944}, // music_5050038
|
||||
{0xfac398719cd9e4a}, //music_5050039
|
||||
{0x9c4ba796548a019}, //music_5050040
|
||||
{0x0fac398719cd9e4a}, // music_5050039
|
||||
{0x09c4ba796548a019}, // music_5050040
|
||||
{0x7e7c462ba7d473cf}, // music_5050041
|
||||
{0x8a9a7af1379840fb}, // music_5050042
|
||||
{0xa0aa0097e5631019}, // music_5050043
|
||||
@ -1017,7 +1018,7 @@ static const hcakey_info hcakey_list[] = {
|
||||
{0x69fe38ae5970d450}, // music_5050054
|
||||
{0x414200bd8ac11b40}, // music_5050055
|
||||
{0xbce9e85d31089fb2}, // music_5050056
|
||||
{0x817b919679c96d7}, //music_5050057
|
||||
{0x0817b919679c96d7}, // music_5050057
|
||||
{0x3e0e51043bd7d5e5}, // music_5050058
|
||||
{0x86d17e28b2f2b91c}, // music_5050059
|
||||
{0x115f906b6b7fb845}, // music_5050060
|
||||
@ -1034,7 +1035,7 @@ static const hcakey_info hcakey_list[] = {
|
||||
{0x7ff6630286d2d93b}, // music_5050071
|
||||
{0xc6deecd2d1391713}, // music_5050072
|
||||
{0x78bec41dd27d8788}, // music_5050074
|
||||
{0xf86991a3b9aec2b}, //music_5050075
|
||||
{0x0f86991a3b9aec2b}, // music_5050075
|
||||
{0x8f750fabaa794130}, // music_5050076
|
||||
{0x3c68e8102dbec720}, // music_5050077
|
||||
{0xf653b47bc8d4d1cd}, // music_5050079
|
||||
@ -1082,7 +1083,7 @@ static const hcakey_info hcakey_list[] = {
|
||||
{0x9dbfafd78a550632}, // music_5050123
|
||||
{0xf95b5bbf7e04f6f7}, // music_5050124
|
||||
{0x72eab426f4800cdf}, // music_5050125
|
||||
{0xfbaaa063a92e3fa}, //music_5050126
|
||||
{0x0fbaaa063a92e3fa}, // music_5050126
|
||||
{0x1b837c9a98b7d123}, // music_5050127
|
||||
{0x94f28e181640e219}, // music_5050128
|
||||
{0x5d931d29d1432b4c}, // music_5050129
|
||||
@ -1090,7 +1091,7 @@ static const hcakey_info hcakey_list[] = {
|
||||
{0xeb7796684409adfa}, // music_5050131
|
||||
{0x13ef11289cf31dad}, // music_5050132
|
||||
{0xd446d0ea96dfdf76}, // music_5050133
|
||||
{0x4c56ec4e341a717}, //music_5050134
|
||||
{0x04c56ec4e341a717}, // music_5050134
|
||||
{0x82523f6386d6a38a}, // music_5050135
|
||||
{0x520868bafa84e471}, // music_5050136
|
||||
{0x7aab43829c6be9be}, // music_5050137
|
||||
@ -1120,7 +1121,7 @@ static const hcakey_info hcakey_list[] = {
|
||||
{0x6f321adde08396e3}, // music_5050163
|
||||
{0x58afa6381eeb1425}, // music_5050164
|
||||
{0x751daf7d1a5401cb}, // music_5050165
|
||||
{0xff2ea77b81c3ff6}, //music_5050166
|
||||
{0x0ff2ea77b81c3ff6}, // music_5050166
|
||||
{0xbd6b66823f854f68}, // music_5050167
|
||||
{0xceb902b93eba45d8}, // music_5050168
|
||||
{0x2550e145b93723ae}, // music_5050169
|
||||
@ -1160,7 +1161,7 @@ static const hcakey_info hcakey_list[] = {
|
||||
{0x7fe1bc7cbda4a457}, // music_5050203
|
||||
{0x928964b93fce5bc9}, // music_5050204
|
||||
{0x58a46c0179f0d6ff}, // music_5050205
|
||||
{0x929ca6a5e8e0445}, //music_5050206
|
||||
{0x0929ca6a5e8e0445}, // music_5050206
|
||||
{0xf0de6097ea78513c}, // music_5050207
|
||||
{0xcde0de0e1216bdea}, // music_5050208
|
||||
{0xb496e9301bfc57c4}, // music_5050209
|
||||
@ -1188,7 +1189,7 @@ static const hcakey_info hcakey_list[] = {
|
||||
{0x2de61d98bc2cea48}, // music_5050231
|
||||
{0x249fb9a25c75632b}, // music_5050232
|
||||
{0x60cf8b7ef1f1ba8c}, // music_5050233
|
||||
{0xe42f74d5567bd5e}, //music_5050234
|
||||
{0x0e42f74d5567bd5e}, // music_5050234
|
||||
{0x3e2b8152d40c4111}, // music_5050235
|
||||
{0x812e320bf455509e}, // music_5050236
|
||||
{0x55882d342d85c5bf}, // music_5050237
|
||||
@ -1200,7 +1201,7 @@ static const hcakey_info hcakey_list[] = {
|
||||
{0x2ade6f09d4c00bdf}, // music_5050245
|
||||
{0xa92c33355f232b5a}, // music_5050246
|
||||
{0xa0a3629f5d35eef4}, // music_5050247
|
||||
{0x7e30b53c3bc4efe}, //music_5050248
|
||||
{0x07e30b53c3bc4efe}, // music_5050248
|
||||
{0x3fcd37732e64f44a}, // music_5050249
|
||||
{0x8e42f8b651700386}, // music_5050250
|
||||
{0x51e07b700d1bc711}, // music_5050251
|
||||
@ -1222,13 +1223,13 @@ static const hcakey_info hcakey_list[] = {
|
||||
{0xf72c77898bfc4678}, // music_5050269
|
||||
{0xbe0d5c4c95e909ff}, // music_5050270
|
||||
{0x1f74bfe24e614687}, // music_5050271
|
||||
{0x2b24e5c7c7b6e9d}, //music_5050272
|
||||
{0x02b24e5c7c7b6e9d}, // music_5050272
|
||||
{0xf48f21a99fda09cf}, // music_5050273
|
||||
{0x5ef1786f364bce23}, // music_5050274
|
||||
{0x9577c9645a6ffd5e}, // music_5050275
|
||||
{0xafc13a64a56884e8}, // music_5050276
|
||||
{0x76dfb4c3728fe8d9}, // music_5050277
|
||||
{0x71a776b3ed5ab17}, //music_5050278
|
||||
{0x071a776b3ed5ab17}, // music_5050278
|
||||
{0x880a35323f69b612}, // music_5050284
|
||||
{0x5c8623402d1c822d}, // music_5050286
|
||||
{0xca545af62852a7b7}, // music_5050287
|
||||
@ -1415,7 +1416,7 @@ static const hcakey_info hcakey_list[] = {
|
||||
// Girls' Frontline 2: Exilium (PC)
|
||||
{7152097263845921}, // 001968CB68CF8221
|
||||
|
||||
// Girls' Frontline 2: Exilium (PC)
|
||||
// SD Shin Kamen Rider Rumble (PC)
|
||||
{4079616028775461768}, // 389DB529D726B388
|
||||
|
||||
// Persona 3 Reload (PC)
|
||||
@ -1481,8 +1482,11 @@ static const hcakey_info hcakey_list[] = {
|
||||
// DRAGON BALL: Sparking! ZERO (multi)
|
||||
{13238534807163085345u}, // B7B8B9442F99A221
|
||||
|
||||
// TOUHOU GENSOU MAHJONG (both demo and main)
|
||||
{7757726886},
|
||||
// TOUHOU GENSOU MAHJONG (PC) [demo and release]
|
||||
{7757726886}, // 00000001CE6584A6
|
||||
|
||||
// NARUTO X BORUTO NINJA VOLTAGE (Android)
|
||||
{15607939238842976091u}, // D89A8A0B171DC75B
|
||||
};
|
||||
|
||||
#endif
|
||||
|
@ -109,7 +109,7 @@ VGMSTREAM* init_vgmstream_sgxd(STREAMFILE* sf) {
|
||||
uint32_t stream_offset;
|
||||
chunk_offset += 0x08 + 0x38 * (target_subsong-1); /* position in target header*/
|
||||
|
||||
/* 0x00: ? (00/01/02) */
|
||||
/* 0x00: flags? (00/01/02) */
|
||||
name_offset = read_u32le(chunk_offset+0x04,sf_head);
|
||||
codec = read_u8(chunk_offset+0x08,sf_head);
|
||||
channels = read_u8(chunk_offset+0x09,sf_head);
|
||||
@ -119,16 +119,14 @@ VGMSTREAM* init_vgmstream_sgxd(STREAMFILE* sf) {
|
||||
/* 0x10: info_type, meaning of the next value
|
||||
* (00=null, 30/40=data size without padding (ADPCM, ATRAC3plus), 80/A0=block size (AC3) */
|
||||
/* 0x14: info_value (see above) */
|
||||
/* 0x18: unknown (ex. 0x0008/0010/3307/CC02/etc, RGND related?) x2 */
|
||||
/* 0x18: vol L + vol R? */
|
||||
/* 0x1c: null */
|
||||
|
||||
num_samples = read_s32le(chunk_offset+0x20,sf_head);
|
||||
loop_start_sample = read_s32le(chunk_offset+0x24,sf_head);
|
||||
loop_end_sample = read_s32le(chunk_offset+0x28,sf_head);
|
||||
stream_size = read_u32le(chunk_offset+0x2c,sf_head); /* stream size (without padding) / interleave (for type3) */
|
||||
|
||||
stream_offset = read_u32le(chunk_offset+0x30,sf_head);
|
||||
|
||||
/* 0x34: SGD/SGH = stream size (with padding) / interleave */
|
||||
|
||||
loop_flag = loop_start_sample != -1 && loop_end_sample != -1;
|
||||
@ -216,6 +214,8 @@ VGMSTREAM* init_vgmstream_sgxd(STREAMFILE* sf) {
|
||||
}
|
||||
#endif
|
||||
|
||||
// 0x00: PCM16LE?
|
||||
// https://github.com/Nenkai/010GameTemplates/blob/main/Sony/SGXD.bt
|
||||
default:
|
||||
VGM_LOG("SGDX: unknown codec %i\n", codec);
|
||||
goto fail;
|
||||
|
Loading…
Reference in New Issue
Block a user