Join also our Discord channel! Click here.
Capcom .EMI file format (from Breath Of Fire 4)
- Strobe
- Moderator
- Posts: 411
- Joined: Mon Oct 24, 2005 8:52 am
- Location: Sweden
- Been thanked: 16 times
- Contact:
......
im writing an Universal VAG detector. that should be able to detect any possible VAG files , even without headers, and it will recreate a VAG header if
data is found. however this is a very early test stage of this.
ill get back when its more finished. seems to work currently on the EMI files
atleast. *hmmms*
data is found. however this is a very early test stage of this.
ill get back when its more finished. seems to work currently on the EMI files
atleast. *hmmms*
- lionheartuk
- double-veteran
- Posts: 718
- Joined: Tue May 16, 2006 10:55 pm
- Location: Tokyo, Japan
- Has thanked: 30 times
- Been thanked: 34 times
Re: ......
Cool thanks man.Strobe wrote:im writing an Universal VAG detector. that should be able to detect any possible VAG files , even without headers, and it will recreate a VAG header if
data is found. however this is a very early test stage of this.
ill get back when its more finished. seems to work currently on the EMI files
atleast. *hmmms*
Tho I personally have little interest in the games SOUND, some people may do.
It seems asthough 2 tools will be needed, 1 for 3D/Image data and another For Sound/Music Data.
I wonder......
Strobe are you more of a Music perosn or a Graphics person?
I have seen a good few Music/Sound related posts of yours.
- Strobe
- Moderator
- Posts: 411
- Joined: Mon Oct 24, 2005 8:52 am
- Location: Sweden
- Been thanked: 16 times
- Contact:
Hehehehe
Im very much more of a sound person 
maybe because im a composer. This VAG stuff is something i thought
of doing since a long time ago, basically because there are so many different VAG formats out there, so now im tired of adding different rippers for them,
now it should instead dont give a damn if there is a header, and instead
detect the data and recreate the header on its own =D
I havent even looked at the graphics yet! HHhaHAhAhaha
(or models)
EDIT: My detector is working so far!
(tested on only 4 files yet though)
the only fault in the header so far im creating is the correct length of the VAG
data. but the vag player dont seem to care, it still plays the ripped vag data.


of doing since a long time ago, basically because there are so many different VAG formats out there, so now im tired of adding different rippers for them,
now it should instead dont give a damn if there is a header, and instead
detect the data and recreate the header on its own =D
I havent even looked at the graphics yet! HHhaHAhAhaha

EDIT: My detector is working so far!

the only fault in the header so far im creating is the correct length of the VAG
data. but the vag player dont seem to care, it still plays the ripped vag data.
- lionheartuk
- double-veteran
- Posts: 718
- Joined: Tue May 16, 2006 10:55 pm
- Location: Tokyo, Japan
- Has thanked: 30 times
- Been thanked: 34 times
Re: Hehehehe
Well there not really MODELS as such, its a 2D type game, so It looks to me asthough the BATTLE models might just be 2D models.Strobe wrote: I havent even looked at the graphics yet! HHhaHAhAhaha(or models)
see this example (just in case you havent played the game

Not ot mention THIS

which for ONCE i havent put as my avatar, its my avatar in like 9999999 other forums (exageration btw), i think il make it mine here too.
- Strobe
- Moderator
- Posts: 411
- Joined: Mon Oct 24, 2005 8:52 am
- Location: Sweden
- Been thanked: 16 times
- Contact:
Weeehaaaa
beta VAG detector and converter done!
http://jaedernaub.ath.cx/
download v1.9.0n to try it out. should work on EMI files aswell,
(have yet only tested it on 3 emi files, the ones ive found on this forum :X)
there is an "UVAG v1.0" button on the main screen, just next to "Hex View" button. simply select the file with Load window, and press "UVAG v1.0",
and it should work.....hopefully....
Maybe time to move on to the graphics :X
im using Awave Audio to replay VAG files, what are you guys using?
is there a plugin for WinAmp or something?
http://jaedernaub.ath.cx/
download v1.9.0n to try it out. should work on EMI files aswell,
(have yet only tested it on 3 emi files, the ones ive found on this forum :X)
there is an "UVAG v1.0" button on the main screen, just next to "Hex View" button. simply select the file with Load window, and press "UVAG v1.0",
and it should work.....hopefully....
Maybe time to move on to the graphics :X
im using Awave Audio to replay VAG files, what are you guys using?
is there a plugin for WinAmp or something?
- lionheartuk
- double-veteran
- Posts: 718
- Joined: Tue May 16, 2006 10:55 pm
- Location: Tokyo, Japan
- Has thanked: 30 times
- Been thanked: 34 times
Re: Weeehaaaa
Us guys?Strobe wrote:beta VAG detector and converter done!
http://jaedernaub.ath.cx/
download v1.9.0n to try it out. should work on EMI files aswell,
(have yet only tested it on 3 emi files, the ones ive found on this forum :X)
there is an "UVAG v1.0" button on the main screen, just next to "Hex View" button. simply select the file with Load window, and press "UVAG v1.0",
and it should work.....hopefully....
Maybe time to move on to the graphics :X
im using Awave Audio to replay VAG files, what are you guys using?
is there a plugin for WinAmp or something?
Eh?
Erm....
O no longer have WINAMP as i dont really like it, I jsut use Media Player or CLASSIC or even VLC to play most things.
Yeah move on to Graphics if you can.
Id liek that.
Tell me your MSN or something like that and il send you as many files as i can.
Damn all this work tryingt o figure out the EMI fiels and im fogetting all about the MGS3 .DAT files.
Damn am i ever even gonna get ANYTHING from them...
Oh well keep trying i say.
- lionheartuk
- double-veteran
- Posts: 718
- Joined: Tue May 16, 2006 10:55 pm
- Location: Tokyo, Japan
- Has thanked: 30 times
- Been thanked: 34 times
- Mr.Mouse
- Site Admin
- Posts: 4050
- Joined: Wed Jan 15, 2003 6:45 pm
- Location: Dungeons of Doom
- Has thanked: 419 times
- Been thanked: 570 times
- Contact:
These EMI files contain sections padded to multiples of 0x800 bytes.
For instance, the BGM053 file has three section in the beginning of 0x800, 0x1000 and 0x800 in size. They are padded either with 0x2E or 0x5F. The other sections in there are also padded. It would be reasonable to assume that one can read the contents (all of it) of those files by loading chunks of data of 0x800 in size, check if the last bytes of the chunks are either repetitions of 0x2E or 0x5F, and if so, save them as separate files.
I'm also looking at the first sections, as they may actually be tables referring to contents of EMI files.
For instance, the BGM053 file has three section in the beginning of 0x800, 0x1000 and 0x800 in size. They are padded either with 0x2E or 0x5F. The other sections in there are also padded. It would be reasonable to assume that one can read the contents (all of it) of those files by loading chunks of data of 0x800 in size, check if the last bytes of the chunks are either repetitions of 0x2E or 0x5F, and if so, save them as separate files.
I'm also looking at the first sections, as they may actually be tables referring to contents of EMI files.
- Mr.Mouse
- Site Admin
- Posts: 4050
- Joined: Wed Jan 15, 2003 6:45 pm
- Location: Dungeons of Doom
- Has thanked: 419 times
- Been thanked: 570 times
- Contact:
Update:
The first section, padded to 0x800 is indeed the file contents table. (MATH_TBL). It consists of entries of 16 bytes in length, terminated by 0x2E2E.
A preliminary format of the table is:

The first section, padded to 0x800 is indeed the file contents table. (MATH_TBL). It consists of entries of 16 bytes in length, terminated by 0x2E2E.
A preliminary format of the table is:
Code: Select all
// Header
uint32 Number of files/Data section
uint32 Unknown, in my files always 0x1
char(8) String, Identifier of the table: "MATH_TBL"
// For each entry in the table
uint32 Size of the file/section
uint32 Unknown number (often 0x4)
uint32 Could also be a 4 byte string, identifying the type of file (pBAV, or pQES etc )
uint16 Unknown number
uint16 End-of-entry marker (0x2E2E)
Take into account that each section is padded to multiples of 0x800, so if make sure you start reading the next section from a position that marks the next 0x800 block from the actual data end of the section.

- lionheartuk
- double-veteran
- Posts: 718
- Joined: Tue May 16, 2006 10:55 pm
- Location: Tokyo, Japan
- Has thanked: 30 times
- Been thanked: 34 times
Hmm interesting dude.Mr.Mouse wrote:Update:
The first section, padded to 0x800 is indeed the file contents table. (MATH_TBL). It consists of entries of 16 bytes in length, terminated by 0x2E2E.
A preliminary format of the table is:
Code: Select all
// Header uint32 Number of files/Data section uint32 Unknown, in my files always 0x1 char(8) String, Identifier of the table: "MATH_TBL" // For each entry in the table uint32 Size of the file/section uint32 Unknown number (often 0x4) uint32 Could also be a 4 byte string, identifying the type of file (pBAV, or pQES etc ) uint16 Unknown number uint16 End-of-entry marker (0x2E2E) Take into account that each section is padded to multiples of 0x800, so if make sure you start reading the next section from a position that marks the next 0x800 block from the actual data end of the section.
Maybe Il speak to strobe abotu adding this to his Ripper.
Then again What can we even find there?
Curently were looking for a way to get the IMAGE data out
- lionheartuk
- double-veteran
- Posts: 718
- Joined: Tue May 16, 2006 10:55 pm
- Location: Tokyo, Japan
- Has thanked: 30 times
- Been thanked: 34 times
That sounds pretty cool actually dude.Mr.Mouse wrote:What can you find here??? You can extract ALL CONTENT of those files ! Thus including IMAGE data, AND, possibly import them back, altered!
Sorry i was a bit busy at the time and never got round to reading ur post propperly, just a SKIM was all.
But yes as i was saying, When me and Strobe looked at the files, He did find IMAGE data, But it appeared to be Compressed by soem Unknow compressor he said.
Btw what does "uint" mean cos u ahve many uint32 ect...