Join also our Discord channel! Click here.

EA Layer 3 Extractor/Decoder

Get help on any and all audio formats, or chip in and help others!
flaaaat
ultra-n00b
Posts: 2
Joined: Wed Feb 08, 2012 5:52 am
Been thanked: 1 time

Re: EA Layer 3 Extractor/Decoder

Post by flaaaat » Thu Feb 09, 2012 5:03 pm

It seems to choke on many of the RA3 Uprising cdata files.

edit - nevermind, it didn't work because I haven't used mus.exe to demux the files.

OrangeC
double-veteran
double-veteran
Posts: 860
Joined: Sun Apr 20, 2008 2:58 am
Has thanked: 5 times
Been thanked: 34 times

Re: EA Layer 3 Extractor/Decoder

Post by OrangeC » Mon Feb 13, 2012 8:57 pm

http://www.mediafire.com/?ek2zc3d11f8tf32

Zench or if anyone can help this seems to be a new EA xa variant that can support and is multichannel and it might be mpeg based as well.

Greatly appreciated if you can add support for this format.

kilik
mega-veteran
mega-veteran
Posts: 174
Joined: Sat Dec 08, 2012 11:14 am
Has thanked: 20 times
Been thanked: 2 times

Re: EA Layer 3 Extractor/Decoder

Post by kilik » Sat Dec 15, 2012 4:39 am

i try simpson the game is ea this tool can do it ? i don't find the cmd i need use

for this time i have parser could not be initialized
the bitstream format is nor readable

OrangeC
double-veteran
double-veteran
Posts: 860
Joined: Sun Apr 20, 2008 2:58 am
Has thanked: 5 times
Been thanked: 34 times

Re: EA Layer 3 Extractor/Decoder

Post by OrangeC » Wed Apr 03, 2013 9:12 pm

Im putting this out there!!

If anyone can continue zenchs work on updating the ea layer 3 tool for newer EA variants it would greatly help!

Luriam
beginner
Posts: 38
Joined: Mon Jun 25, 2012 8:44 am
Has thanked: 47 times

Re: EA Layer 3 Extractor/Decoder

Post by Luriam » Mon Apr 08, 2013 8:11 pm

I'm not sure if it's ok to post this here, but I think that these are related. Any help is appreciated. Thanks!

viewtopic.php?f=10&t=10295

daemon1
M-M-M-Monster veteran
M-M-M-Monster veteran
Posts: 1945
Joined: Tue Mar 24, 2015 8:12 pm
Has thanked: 51 times
Been thanked: 1506 times

Re: EA Layer 3 Extractor/Decoder

Post by daemon1 » Tue Mar 31, 2015 5:19 pm

Hello all!

I was able to compile Zench's project and make some corrections so now it can convert all Dead Space 2/3 files it was unable to convert before. I'm not an MP3 format expert, but let's hope with minor changes of headers I can now make it extract any new Ealayer3 game files.

I don't know how to handle Zench's license and everything, so here is the new .exe for now.
You do not have the required permissions to view the files attached to this post.

mappy2012
advanced
Posts: 62
Joined: Sun Jul 03, 2011 4:40 am
Has thanked: 51 times
Been thanked: 1 time

Re: EA Layer 3 Extractor/Decoder

Post by mappy2012 » Wed Apr 01, 2015 3:40 am

daemon1 wrote:Hello all!

I was able to compile Zench's project and make some corrections so now it can convert all Dead Space 2/3 files it was unable to convert before. I'm not an MP3 format expert, but let's hope with minor changes of headers I can now make it extract any new Ealayer3 game files.

I don't know how to handle Zench's license and everything, so here is the new .exe for now.

hi~daemon~Can support the Dragon Age Inquisition?thanks!

daemon1
M-M-M-Monster veteran
M-M-M-Monster veteran
Posts: 1945
Joined: Tue Mar 24, 2015 8:12 pm
Has thanked: 51 times
Been thanked: 1506 times

Re: EA Layer 3 Extractor/Decoder

Post by daemon1 » Thu Apr 02, 2015 8:54 pm

mappy2012 wrote:hi~daemon~Can support the Dragon Age Inquisition?thanks!
Ok, the format of these files have something different in them. This is not header, but the mp3 data itself. Every 40-60 kbytes it stops with an error, without even producing any output.

This is what I did for now: I made it not stop, but try and continue decoding. The resulting mp3 files are playable, but distorted (have skips) in many places. This way we can at least listen to it in cases like this.

Now I will try to find out what is wrong with the format.
You do not have the required permissions to view the files attached to this post.

daemon1
M-M-M-Monster veteran
M-M-M-Monster veteran
Posts: 1945
Joined: Tue Mar 24, 2015 8:12 pm
Has thanked: 51 times
Been thanked: 1506 times

Re: EA Layer 3 Extractor/Decoder

Post by daemon1 » Fri Apr 03, 2015 6:20 pm

Considering the last files mappy2012 gave me, I'm sure now: the files were extracted wrong.
There are occasional 8 bytes missing or 8 extra bytes in the audio string.
So we have to find the problem in the extractor whatever that was.

daemon1
M-M-M-Monster veteran
M-M-M-Monster veteran
Posts: 1945
Joined: Tue Mar 24, 2015 8:12 pm
Has thanked: 51 times
Been thanked: 1506 times

Re: EA Layer 3 Extractor/Decoder

Post by daemon1 » Sat Apr 04, 2015 5:56 pm

Ok, problem localized. Example:

DAI tools finds music file inside the game named "mus_main_theme_51" and saves it as 14MB chunk. This chunk is a complete mess, combined from many cut parts of the original file contained in cas_13.cas. I don't know why it happens.

So I've extracted that file with my own tool, converted it with "old" Zench's Ealayer3 and got a perfect 6-channel 3,5 minutes WAV file with the main theme.

I'm trying to find someone who can correct this problem in DAI tools now.

jfwfreo
veteran
Posts: 94
Joined: Sat Nov 15, 2008 1:31 am
Been thanked: 18 times

Re: EA Layer 3 Extractor/Decoder

Post by jfwfreo » Tue Aug 16, 2016 10:45 am

Does anyone know where I can get the latest most up to date source code for the EALayer3 decoder?
Reading the license file for the code it looks like BSD (so daemon1 can feel free to share any changes he has made since that's allowed by the license).

Also if anyone on here still cares about actually properly reverse engineering the beast that is EALayer3 (anyone with any kind of reverse engineering skills that is), I have recently come into possession of a sever executable for one of the Battlefield games. This executable is very useful to anyone wanting to reverse engineer EALayer3 (and who knows how to use IDA and HexRays and stuff to do such reverse engineering) because it has full debug symbols AND it has an EALayer3 decoder (for 3 different variants of EALayer3) AND it has a decoder for regular MP3 audio (and the code used by both the EALayer3 and MP3 decoders is shared making it even easier to see which bits are the same between MP3 and EALayer3 and which bits are different)

daemon1
M-M-M-Monster veteran
M-M-M-Monster veteran
Posts: 1945
Joined: Tue Mar 24, 2015 8:12 pm
Has thanked: 51 times
Been thanked: 1506 times

Re: EA Layer 3 Extractor/Decoder

Post by daemon1 » Tue Aug 16, 2016 7:37 pm

Why do you even need that? Ealayer3 decoder is working fine and had no problems for many years. All changes needed were only about some header flags, and don't have any connection to the decoding process itself.

jfwfreo
veteran
Posts: 94
Joined: Sat Nov 15, 2008 1:31 am
Been thanked: 18 times

Re: EA Layer 3 Extractor/Decoder

Post by jfwfreo » Tue Aug 16, 2016 11:24 pm

The header is one thing this binary can help figure out since it gives useful names for flags and things that come from those headers.
Hence why I want the latest code so I can fiddle with it :)
Even if I dont find anything new, it will still be a fun exercise fiddling with this binary...

daemon1
M-M-M-Monster veteran
M-M-M-Monster veteran
Posts: 1945
Joined: Tue Mar 24, 2015 8:12 pm
Has thanked: 51 times
Been thanked: 1506 times

Re: EA Layer 3 Extractor/Decoder

Post by daemon1 » Thu Aug 18, 2016 5:23 pm

I don't think you need debug symbols to figure out the header. I mean you don't need a debugger to tell that 1 is mono ans 2 is stereo. So if I remember correctly, changes I made were:

1. stop after end of the stream. useful for some games, but not for others
2. continue after sync lost. May be useful in case of damaged files, but in general its bad idea.
3. support for some codec/format combinations that were absolutely obvious, just Zench never seen this kind, so he decided NOT to decode such files for some reason.

Thus, I'm not going to post my changed sources, because I see no reason for this, and I even think using them will be wrong and not recommended. So just take the latest Zench version.

daemon1
M-M-M-Monster veteran
M-M-M-Monster veteran
Posts: 1945
Joined: Tue Mar 24, 2015 8:12 pm
Has thanked: 51 times
Been thanked: 1506 times

Re: EA Layer 3 Extractor/Decoder

Post by daemon1 » Thu Aug 18, 2016 5:27 pm

p.s. I compiled his code in .net, which required some changes. His original source was for usual c++. It also required some tricks to make it compile, but unfortunately I don't remember now what it was. I remember I found some clues googling about his tools. It was somewhere on someones blog or something. It was NOT mentioned in his source package.

Post Reply