<?xml version="1.0"?>
<?xml-stylesheet type="text/css" href="http://fileformats.archiveteam.org/skins/common/feed.css?303"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
		<id>http://fileformats.archiveteam.org/index.php?action=history&amp;feed=atom&amp;title=EMD_%28Resident_Evil_1997%29</id>
		<title>EMD (Resident Evil 1997) - Revision history</title>
		<link rel="self" type="application/atom+xml" href="http://fileformats.archiveteam.org/index.php?action=history&amp;feed=atom&amp;title=EMD_%28Resident_Evil_1997%29"/>
		<link rel="alternate" type="text/html" href="http://fileformats.archiveteam.org/index.php?title=EMD_(Resident_Evil_1997)&amp;action=history"/>
		<updated>2026-05-15T22:15:13Z</updated>
		<subtitle>Revision history for this page on the wiki</subtitle>
		<generator>MediaWiki 1.19.2</generator>

	<entry>
		<id>http://fileformats.archiveteam.org/index.php?title=EMD_(Resident_Evil_1997)&amp;diff=44981&amp;oldid=prev</id>
		<title>Jsummers at 15:36, 26 August 2023</title>
		<link rel="alternate" type="text/html" href="http://fileformats.archiveteam.org/index.php?title=EMD_(Resident_Evil_1997)&amp;diff=44981&amp;oldid=prev"/>
				<updated>2023-08-26T15:36:50Z</updated>
		
		<summary type="html">&lt;p&gt;&lt;/p&gt;
&lt;table class='diff diff-contentalign-left'&gt;
				&lt;col class='diff-marker' /&gt;
				&lt;col class='diff-content' /&gt;
				&lt;col class='diff-marker' /&gt;
				&lt;col class='diff-content' /&gt;
			&lt;tr valign='top'&gt;
			&lt;td colspan='2' style=&quot;background-color: white; color:black;&quot;&gt;← Older revision&lt;/td&gt;
			&lt;td colspan='2' style=&quot;background-color: white; color:black;&quot;&gt;Revision as of 15:36, 26 August 2023&lt;/td&gt;
			&lt;/tr&gt;&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Line 1:&lt;/td&gt;
&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Line 1:&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;{{FormatInfo&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;{{FormatInfo&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;|formattype=electronic&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;|formattype=electronic&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot;&gt;&amp;#160;&lt;/td&gt;&lt;td class='diff-marker'&gt;+&lt;/td&gt;&lt;td style=&quot;background: #cfc; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;&lt;ins style=&quot;color: red; font-weight: bold; text-decoration: none;&quot;&gt;|subcat=Game data files&lt;/ins&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;|extensions={{ext|emd}}&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;|extensions={{ext|emd}}&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;}}&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;}}&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;/table&gt;</summary>
		<author><name>Jsummers</name></author>	</entry>

	<entry>
		<id>http://fileformats.archiveteam.org/index.php?title=EMD_(Resident_Evil_1997)&amp;diff=44950&amp;oldid=prev</id>
		<title>Foxtrot: Created page with &quot;{{FormatInfo |formattype=electronic |extensions={{ext|emd}} }}  Category:Resident Evil (1997)  {{Restored|2016-08-09|https://web.archive.org/web/20160809012215/http://rewi...&quot;</title>
		<link rel="alternate" type="text/html" href="http://fileformats.archiveteam.org/index.php?title=EMD_(Resident_Evil_1997)&amp;diff=44950&amp;oldid=prev"/>
				<updated>2023-08-25T15:55:27Z</updated>
		
		<summary type="html">&lt;p&gt;Created page with &amp;quot;{{FormatInfo |formattype=electronic |extensions={{ext|emd}} }}  &lt;a href=&quot;/wiki/Category:Resident_Evil_(1997)&quot; title=&quot;Category:Resident Evil (1997)&quot;&gt;Category:Resident Evil (1997)&lt;/a&gt;  {{Restored|2016-08-09|https://web.archive.org/web/20160809012215/http://rewi...&amp;quot;&lt;/p&gt;
&lt;p&gt;&lt;b&gt;New page&lt;/b&gt;&lt;/p&gt;&lt;div&gt;{{FormatInfo&lt;br /&gt;
|formattype=electronic&lt;br /&gt;
|extensions={{ext|emd}}&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
[[Category:Resident Evil (1997)]]&lt;br /&gt;
&lt;br /&gt;
{{Restored|2016-08-09|https://web.archive.org/web/20160809012215/http://rewiki.regengedanken.de/wiki/.EMD_(Resident_Evil)}}&lt;br /&gt;
&lt;br /&gt;
The '''.EMD''' file format is used by Resident Evil. It contains the description of 3D models of the game (enemies, player, etc...).&lt;br /&gt;
&lt;br /&gt;
== Structure == &lt;br /&gt;
&lt;br /&gt;
The values are stored in Little-Endian order.&lt;br /&gt;
&lt;br /&gt;
=== Directory ===&lt;br /&gt;
&lt;br /&gt;
There is a directory, which is stored at the end of the file, it contains 4 offsets. So its position is filesize-4*4 bytes.&lt;br /&gt;
&lt;br /&gt;
=== File/Section 0, skeleton ===&lt;br /&gt;
&lt;br /&gt;
This section starts with a header:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
typedef struct {&lt;br /&gt;
	unsigned short relpos_offset;/* Relative offset to emd1_skel_relpos[] array */&lt;br /&gt;
	unsigned short length; /* Relative offset to emd1_skel_data[] array, which is also length of relpos+armature+mesh numbers  */&lt;br /&gt;
	unsigned short count; /* Number of objects in relpos,data2,mesh arrays? */&lt;br /&gt;
	unsigned short size; /* Size of each element in emd1_skel_data[] array */&lt;br /&gt;
} emd1_skel_header_t;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
If offset is more than 8, there are some extra stuff, namely data1,data2 and mesh arrays.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
typedef struct {&lt;br /&gt;
	short x;&lt;br /&gt;
	short y;&lt;br /&gt;
	short z;&lt;br /&gt;
} emd1_skel_relpos_t; /* Relative position of each mesh in the object */&lt;br /&gt;
&lt;br /&gt;
typedef struct {&lt;br /&gt;
	unsigned short mesh_count; /* Number of meshes linked to this one */&lt;br /&gt;
	unsigned short offset; /* Relative offset to mesh numbers (emd1_skel_mesh[] array) */&lt;br /&gt;
} emd1_skel_armature_t;&lt;br /&gt;
&lt;br /&gt;
emd1_skel_relpos_t emd1_skel_relpos[count];&lt;br /&gt;
emd1_skel_armature_t emd1_skel_armature[count];&lt;br /&gt;
unsigned char emd1_skel_mesh[count]; /* Mesh number on which to apply relative position */&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Finally an array of elements which have a size of emd1_skel_header.size bytes each.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
typedef struct {&lt;br /&gt;
	short x_offset;	/* distance from reference point */&lt;br /&gt;
	short y_offset;&lt;br /&gt;
	short z_offset;&lt;br /&gt;
&lt;br /&gt;
	short x_speed;	/* speed at which moving the model */&lt;br /&gt;
	short y_speed;&lt;br /&gt;
	short z_speed;&lt;br /&gt;
&lt;br /&gt;
	short angles[3*15];	/* angle for each bone/model around x,y,z axis */&lt;br /&gt;
&lt;br /&gt;
	short unknown;&lt;br /&gt;
} emd1_skel_anim_t;&lt;br /&gt;
&lt;br /&gt;
emd1_skel_anim_t emd1_skel_anim[];&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== File/Section 1, animation steps ===&lt;br /&gt;
&lt;br /&gt;
This section starts with this header, a certain number of records composed of count and offsets.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;typedef struct {&lt;br /&gt;
    unsigned short count;  /* Count of indices to process from emd_sec1_data[] array */&lt;br /&gt;
    unsigned short offset; /* Byte offset to first index in emd_sec1_data[] array */&lt;br /&gt;
} emd_anim_header_t;&lt;br /&gt;
&lt;br /&gt;
emd_anim_header_t emd_anim_header[];&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Following this array, you'll find another array of unsigned long. Each value (animation frame number?) is an index in emd_sec2_data array in the skeleton section.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;unsigned long emd_anim_skel_t[];    /* Bits 31-16:   Bitmasks for flags */&lt;br /&gt;
                                    /* Bits 15-0:    Number of frame to display ? */&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Then you'll finally find the 'unsigned long' byte length of the section.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;unsigned long length;&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== File/Section 2, meshes ===&lt;br /&gt;
&lt;br /&gt;
The last object holds the 3D stuff. Maybe the rest of the file is use to store animations, and links between primitives.&lt;br /&gt;
&lt;br /&gt;
==== Header ====&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;typedef struct {&lt;br /&gt;
    unsigned long length; /* Section length in bytes */&lt;br /&gt;
    unsigned long unknown;&lt;br /&gt;
    unsigned long obj_count; /* Number of objects in model */&lt;br /&gt;
} emd_model_header_t;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Objects ====&lt;br /&gt;
&lt;br /&gt;
The model is separated in 'obj_count' objects. Following the header is the description of each object, in the form of an array of 'model_object'. Each offset is relative to the first emd_model_object_t.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;typedef struct {&lt;br /&gt;
    emd_model_triangles_t triangles;&lt;br /&gt;
} emd_model_object_t;&lt;br /&gt;
&lt;br /&gt;
typedef struct {&lt;br /&gt;
    unsigned long vertex_offset; /* Offset to vertex data, array of emd_vertex_t */&lt;br /&gt;
    unsigned long vertex_count;  /* Vertex count */&lt;br /&gt;
    unsigned long normal_offset; /* Offset to normal data, array of emd_vertex_t */&lt;br /&gt;
    unsigned long normal_count;  /* Normal count */&lt;br /&gt;
    unsigned long tri_offset; /* Offset to triangle data, array of emd_triangle_t */&lt;br /&gt;
    unsigned long tri_count;  /* Triangle count */&lt;br /&gt;
    unsigned long dummy;&lt;br /&gt;
} emd_model_triangles_t;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Index arrays ====&lt;br /&gt;
&lt;br /&gt;
Normal and vertex coordinates are saved in same format:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;typedef struct {&lt;br /&gt;
    signed short x; /* Coordinates */&lt;br /&gt;
    signed short y;&lt;br /&gt;
    signed short z;&lt;br /&gt;
    signed short zero;    &lt;br /&gt;
} emd_vertex_t; /* Normals have same format */&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
A triangle is stored in this format:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;typedef struct {&lt;br /&gt;
    unsigned long unknown; /* id 0x34000609 */&lt;br /&gt;
&lt;br /&gt;
    unsigned char tu0; /* u,v texture coordinates of vertex 0 */&lt;br /&gt;
    unsigned char tv0;&lt;br /&gt;
    unsigned short clutid; /* Texture clut id, bits 0-5 */&lt;br /&gt;
    unsigned char tu1;&lt;br /&gt;
    unsigned char tv1;&lt;br /&gt;
    unsigned short page;  /* Texture page */&lt;br /&gt;
    unsigned char tu2;&lt;br /&gt;
    unsigned char tv2;&lt;br /&gt;
    unsigned short dummy;&lt;br /&gt;
&lt;br /&gt;
    unsigned short n0; /* Index of normal data for vertex 0 */&lt;br /&gt;
    unsigned short v0; /* Index of vertex data for vertex 0 */&lt;br /&gt;
    unsigned short n1;&lt;br /&gt;
    unsigned short v1;    &lt;br /&gt;
    unsigned short n2;&lt;br /&gt;
    unsigned short v2;    &lt;br /&gt;
} emd_triangle_t; /* Triangle */&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== File/Section 3, texture ===&lt;br /&gt;
&lt;br /&gt;
And finally, an embedded [[TIM (PlayStation graphics)|TIM image]], which is the texture to apply to the model.&lt;/div&gt;</summary>
		<author><name>Foxtrot</name></author>	</entry>

	</feed>