<p>This differs from the previous FCE Ultra movie format (.fcm) in the following ways:</p>
<dd><li>It is completely text based; allowing easy movie editing/splicing</li></dd>
<dd><li>An imbedded GUID so FCEUX can tell if a savestate belongs to a particular movie file</li></dd>
<dd><li>Movies recorded from Start (Power-on) no longer have a redundant savestate</li></dd>
<dd><li>Contains mouse input for recording the Zapper and Arkanoid Paddle input</li></dd>
<p></p>
<h2>Format</h2>
<p>FM2 is ASCII plain text. It consists of several key-value pairs followed by an inputlog section.</p>
<p>The inputlog section can be identified by its starting with a | (pipe). The inputlog section terminates at eof. Newlines may be \r\n or \n</p>
<p>Key-value pairs consist of a key identifier, followed by a space separator, followed by the value text. Value text is always terminated by a newline, which the value text will not include. The value text is parsed differently depending on the type of the key. The key-value pairs may be in any order, except that the first key must be version.</p>
<p>Integer keys (also used for Booleans, with a 1 or 0) will have a value that is a simple integer not to exceed 32bits</p>
<li>version (required) - the version of the movie file format; for now it is always 3</li>
<li>emuVersion (required) - the version of the emulator used to produce the movie</li>
<li>rerecordCount (optional) - the rerecord count</li>
<li>palFlag (bool) (optional) - true if the movie uses pal timing</li>
<li>fourscore (bool) (*note C) - true if a fourscore was used</li>
<li>port0, port1 (*note C) - indicates the types of input devices. Supported values are:
<ul>SI_GAMEPAD = 1</ul>
<ul>SI_ZAPPER = 2 </ul>
</li>
<li>port2 (required) - indicates the type of the FCExp port device which was attached. Supported values are:
<ul>SIFC_NONE = 0</ul>
</li>
<h2>Header</h2>
<p>String keys have values that consist of the remainder of the key-value pair line. As a consequence, string values cannot contain newlines.</p>
<li>romFilename (required) - the name of the file used to record the movie </li>
<li>comment (optional) - simply a memo.
<li>by convention, the first token in the comment value is the subject of the comment.</li>
<li>by convention, subsequent comments with the same subject will have their ordering preserved and may be used to approximate multiline comments.</li>
<li>by convention, the author of the movie should be stored in comment(s) with a subject of: author</li>
</li>
<li>subtitle (optional) - a message that will be displayed on screen when movie is played back (unless Subtitles are turned off, see Movie options).
<li>by convention, subtitles will begin with the word subtitle</li>
<li>by convention, an integer value will proceed which will indicate the frame that the subtitle will be displayed</li>
<li>by convention, a string of text will follow which will be the string displayed</li>
<li>example:
<li>subtitle 1000 Level Two</li>
<li>At frame 1000 the words "Level Two" will be displayed on the screen</li>
</li>
</li>
<p>Hex string keys (used for binary blobs) will have a value that is like 0x0123456789ABCDEF... </p>
<li>romChecksum (required) - the MD5 hash of the ROM which was used to record the movie </li>
<li>savestate (optional) - a fcs savestate blob, in case a movie was recorded from savestate</li>
<p>GUID keys have a value which is in the standard GUID format: 452DE2C3-EF43-2FA9-77AC-0677FC51543B</p>
<li>GUID (required) a unique identifier for a movie, generated when the movie is created, which is used when loading a savestate to make sure it belongs to the current movie.</li>
<h2>Inputlog</h2>
<p>The inputlog section consists of lines beginning and ending with a | (pipe). The fields are as follows, except as noted in note C.</p>
<tableborder="1">
<tr>
<td>c</td>
<td>port0</td>
<td>port1</td>
<td>port2</td>
</tr>
</table>
<p>Field c is a variable length decimal integer which is a bitfield corresponding to miscellaneous input states which are valid at the start of the frame. Current values for this are</p>
<li>MOVIECMD_RESET = 1</li>
<p>The format of port0, port1, port2 depends on which types of devices were attached.</p>
<h4>SI_GAMEPAD</h4>
<li>the field consists of eight characters which constitute a bitfield.</li>
<li>any character other than ' ' or '.' means that the button was pressed. By convention, the following mnemonics will be used in a column to remind us of which button corresponds to which column: