From d09ac8fdaedf621e0a6c7c580c97a1345244dc3d Mon Sep 17 00:00:00 2001 From: bxaimc Date: Mon, 11 Dec 2017 17:58:57 -0500 Subject: [PATCH 1/2] Add type 3 GCM/IDSP variant for Lego LOTR (Wii) --- src/meta/ngc_dsp_std.c | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/src/meta/ngc_dsp_std.c b/src/meta/ngc_dsp_std.c index b9fb5381..71d4b9a5 100644 --- a/src/meta/ngc_dsp_std.c +++ b/src/meta/ngc_dsp_std.c @@ -1214,6 +1214,7 @@ fail: Lego Indiana Jones - The Original Adventures (Wii) Lego Indiana Jones 2 - The Adventure Continues (Wii) Lego Star Wars - The Complete Saga (Wii) + Lego The Lord of the Rings (Wii) The Chronicles of Narnia - Prince Caspian (Wii) */ VGMSTREAM * init_vgmstream_wii_idsp(STREAMFILE *streamFile) { VGMSTREAM * vgmstream = NULL; @@ -1249,6 +1250,14 @@ VGMSTREAM * init_vgmstream_wii_idsp(STREAMFILE *streamFile) { start_offset = 0xe0; } + else if (read_32bitBE(0x4, streamFile) == 3 && //Lego The Lord of the Rings (Wii) + read_32bitBE(0x8, streamFile) == 0x12c) + { + if (read_dsp_header(&ch0_header, 0x20, streamFile)) goto fail; + if (read_dsp_header(&ch1_header, 0x80, streamFile)) goto fail; + + start_offset = 0xe0; + } else goto fail; interleave = read_32bitBE(0xc, streamFile); From a8369ed21b52ce1fe4ffb2c5e44f3ad6f201ddca Mon Sep 17 00:00:00 2001 From: bxaimc Date: Thu, 14 Dec 2017 19:48:54 -0500 Subject: [PATCH 2/2] Modified a header check to reduce some -pickiness- which rejected some playable EALayer3 files --- src/meta/ea_eaac.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/meta/ea_eaac.c b/src/meta/ea_eaac.c index 20724ca9..2f77004e 100644 --- a/src/meta/ea_eaac.c +++ b/src/meta/ea_eaac.c @@ -48,8 +48,9 @@ VGMSTREAM * init_vgmstream_ea_sps(STREAMFILE * streamFile) { if (!check_extensions(streamFile,"sps")) goto fail; - /* seems to be fixed */ - if ((read_32bitBE(0x00,streamFile) & 0xFFFFFF00) != 0x48000000) + /* Very hacky but the original check for 0x48000000 rejected some playable files */ + if (((read_16bitBE(0x00,streamFile) & 0xFFFFFF00) != 0x4800) && + ((read_8bit(0x00, streamFile) & 0xFFFFFF00) != 0x00)) goto fail; start_offset = read_8bit(0x03, streamFile);