From 948c55f4f958dbf9f36b3e003d3d24e1808f8dc0 Mon Sep 17 00:00:00 2001 From: bnnm Date: Sat, 30 Dec 2023 17:02:34 +0100 Subject: [PATCH] Add .svg VAG [ModernGroove: Ministry of Sound Edition (PS2)] --- src/meta/vag.c | 15 +++++++++++++-- 1 file changed, 13 insertions(+), 2 deletions(-) diff --git a/src/meta/vag.c b/src/meta/vag.c index 791513fa..27868672 100644 --- a/src/meta/vag.c +++ b/src/meta/vag.c @@ -25,8 +25,9 @@ VGMSTREAM* init_vgmstream_vag(STREAMFILE* sf) { * .l/r: Crash Nitro Kart (PS2), Gradius V (PS2) * .vas: Kingdom Hearts II (PS2) * .xa2: Shikigami no Shiro (PS2) - * .snd: Alien Breed (Vita) */ - if (!check_extensions(sf,"vag,swag,str,vig,l,r,vas,xa2,snd")) + * .snd: Alien Breed (Vita) + * .svg: ModernGroove: Ministry of Sound Edition (PS2) */ + if (!check_extensions(sf,"vag,swag,str,vig,l,r,vas,xa2,snd,svg")) return NULL; file_size = get_streamfile_size(sf); @@ -148,6 +149,16 @@ VGMSTREAM* init_vgmstream_vag(STREAMFILE* sf) { loop_flag = ps_find_loop_offsets(sf, start_offset, channel_size*channels, channels, interleave, &loop_start_sample, &loop_end_sample); } + else if (version == 0x00000020 && is_id32be(0x800,sf, "VAGp")) { + /* ModernGroove: Ministry of Sound Edition (PS2) */ + start_offset = 0x30; + channels = 2; + interleave = 0x800; + interleave_first = interleave - start_offset; /* includes header */ + interleave_first_skip = start_offset; + + loop_flag = 0; + } else if (version == 0x40000000) { /* Killzone (PS2) */ start_offset = 0x30;