<pclass="rvps2"><spanclass="rvts6">FM2 consists of two parts: Header and Input Log.</span></p>
<pclass="rvps2"><spanclass="rvts6">The header is always in ASCII plain text format. It consists of several key-value pairs.</span></p>
<pclass="rvps2"><spanclass="rvts6">The input log section can be identified by it starting with a | (pipe).</span></p>
<pclass="rvps2"><spanclass="rvts6">The input log section can be either in ASCII plain text format or in binary format.</span></p>
<pclass="rvps2"><spanclass="rvts6">The input log section terminates at EOF, unless the </span><spanclass="rvts45">length</span><spanclass="rvts6"> key is specified in header.</span></p>
<pclass="rvps2"><spanclass="rvts6">Newlines may be \r\n or \n.</span></p>
<pclass="rvps2"><spanclass="rvts6">Integer keys (also used for booleans, with a 1 for true and 0 for false) must have a value that can be stored as int32:</span></p>
<pclass="rvps2"><spanclass="rvts6"> </span><spanclass="rvts45">- version</span><spanclass="rvts6"> (required) - the version of the movie file format; for now it is always 3</span></p>
<pclass="rvps2"><spanclass="rvts6"> </span><spanclass="rvts45">- emuVersion</span><spanclass="rvts6"> (required) - the version of the emulator used to produce the movie</span></p>
<pclass="rvps2"><spanclass="rvts6"> -</span><spanclass="rvts45"> palFlag</span><spanclass="rvts6"> (bool) (optional) - true if the movie uses PAL timing</span></p>
<pclass="rvps2"><spanclass="rvts6"> -</span><spanclass="rvts45"> NewPPU</span><spanclass="rvts6"> (bool) (optional) - true if the movie uses New PPU</span></p>
<pclass="rvps2"><spanclass="rvts6"> </span><spanclass="rvts45">- FDS</span><spanclass="rvts6"> (bool) (optional) - true if movie was recorded on a Famicom Disk System (FDS) game</span></p>
<pclass="rvps2"><spanclass="rvts6"> </span><spanclass="rvts45">- fourscore</span><spanclass="rvts6"> (bool) - true if a fourscore was used. If fourscore is not used, then port0 and port1 are required</span></p>
<pclass="rvps2"><spanclass="rvts6"> </span><spanclass="rvts45">- port0 </span><spanclass="rvts6">- indicates the type of input device attached to the port 0. Supported values are:</span></p>
<pclass="rvps2"><spanclass="rvts6"> </span><spanclass="rvts45">- port1</span><spanclass="rvts6"> - indicates the type of input device attached to the port 1. Supported values are:</span></p>
<pclass="rvps2"><spanclass="rvts45"> - port2</span><spanclass="rvts6"> (required) - indicates the type of the FCExp port device which was attached. Supported values are:</span></p>
<pclass="rvps2"><spanclass="rvts6"> </span><spanclass="rvts45">- binary</span><spanclass="rvts6"> (bool) (optional) - true if input log is stored in binary format</span></p>
<pclass="rvps2"><spanclass="rvts6"> </span><spanclass="rvts45">- length</span><spanclass="rvts6"> (optional) - movie size (number of frames in the input log). If this key is specified and the number is >= 0, the input log ends after specified number of records, and any remaining data should not be parsed. This key is used in </span><spanclass="rvts116">fm3</span><spanclass="rvts6"> format to allow storing extra data after the end of input log</span></p>
<pclass="rvps2"><spanclass="rvts6">String keys have values that consist of the remainder of the key-value pair line. As a consequence, string values cannot contain newlines.</span></p>
<pclass="rvps2"><spanclass="rvts45"> - romFilename</span><spanclass="rvts6"> (required) - the name of the file used to record the movie</span></p>
<liclass="rvps2"><spanclass="rvts6">by convention, the first token in the comment value is the subject of the comment</span></li>
<liclass="rvps2"><spanclass="rvts6">by convention, subsequent comments with the same subject should have their ordering preserved and may be used to approximate multi-line comments</span></li>
<liclass="rvps2"><spanclass="rvts6">by convention, the author of the movie should be stored in comment(s) with a subject of: </span><spanclass="rvts45">author</span></li>
<pclass="rvps2"><spanclass="rvts45"> - subtitle </span><spanclass="rvts6">(optional) - a message that will be displayed on screen when movie is played back (unless Subtitles are turned off, see </span><aclass="rvts23"href="MovieOptions.html">Movie options</a><spanclass="rvts6">)</span></p>
<liclass="rvps2"><spanclass="rvts6">by convention, subtitles begin with the word "subtitle"</span></li>
<liclass="rvps2"><spanclass="rvts6">by convention, an integer value following the word "subtitle" indicates the frame that the subtitle will be displayed</span></li>
<liclass="rvps2"><spanclass="rvts6">by convention, any remaining text after the integer is considered to be the string displayed</span></li>
<pclass="rvps2"><spanclass="rvts45"> - guid </span><spanclass="rvts6">(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</span></p>
<pclass="rvps2"><spanclass="rvts6">GUID keys have a value which is in the standard guide format: 452DE2C3-EF43-2FA9-77AC-0677FC51543B</span></p>
<pclass="rvps2"><spanclass="rvts45"> - romChecksum </span><spanclass="rvts6">(required) - the base64 of the hexified MD5 hash of the ROM which was used to record the movie</span></p>
<pclass="rvps2"><spanclass="rvts45"> - savestate </span><spanclass="rvts6">(optional) - a </span><aclass="rvts23"href="fcs.html">fcs</a><spanclass="rvts6"> savestate blob, in case a movie was recorded from savestate </span></p>
<pclass="rvps2"><spanclass="rvts6">Hex string keys (used for binary blobs) have a value that is like 0x0123456789ABCDEF...</span></p>
<pclass="rvps2"><spanclass="rvts6">The input log section consists of movie records either in the form of text lines or in the form of binary data.</span></p>
<pclass="rvps2"><spanclass="rvts6">Field </span><spanclass="rvts45">commands</span><spanclass="rvts6"> is a variable length decimal integer which is interpreted as a bit field corresponding to miscellaneous input states which are valid at the start of the frame. Current values for this are:</span></p>
<liclass="rvps2"><spanclass="rvts6">the field consists of eight characters which constitute a bit field</span></li>
<liclass="rvps2"><spanclass="rvts6">any character other than ' ' or '.' means that the button was pressed</span></li>
<liclass="rvps2"><spanclass="rvts6">by convention, the following mnemonics are used in a column to remind us of which button corresponds to which column: </span><spanclass="rvts45">RLDUTSBA</span><spanclass="rvts6"> (Right, Left, Down, Up, sTart, Select, B, A)</span></li>
<pclass="rvps2"><spanclass="rvts45">XXX: </span><spanclass="rvts6">%03d, the x position of the mouse</span></p>
<pclass="rvps2"><spanclass="rvts45">YYY: </span><spanclass="rvts6">%03d, the y position of the mouse</span></p>
<pclass="rvps2"><spanclass="rvts45">B: </span><spanclass="rvts6">%1d, 1 if the mouse button is pressed; 0 if not</span></p>
<pclass="rvps2"><spanclass="rvts45">Q: </span><spanclass="rvts6">%1d, an internal value used by the emulator's zapper code</span></p>
<pclass="rvps2"><spanclass="rvts45">Z: </span><spanclass="rvts6">%d, a variable-length decimal integer; an internal value used by the emulator's zapper code</span></p>
<pclass="rvps2"><spanclass="rvts6">If a </span><spanclass="rvts45">fourscore</span><spanclass="rvts6"> is used, then port0 and port1 are irrelevant and ignored.</span></p>
<pclass="rvps2"><spanclass="rvts6">The input types must all be gamepads, and each input log record must be in the following format:</span></p>
<pclass="rvps2"><spanclass="rvts6">Input log section starts with a | (pipe).</span></p>
<pclass="rvps2"><spanclass="rvts6">Every frame of the movie is represented by a record of a fixed length which can be determined by the devices on port0 and port1.</span></p>
<liclass="rvps2"><spanclass="rvts6">1 byte added to the size of record</span></li>
<liclass="rvps2"><spanclass="rvts6">bits of the byte represent the state of buttons (bit0 = A, bit1 = B, bit2 = Select, bit3 = sTart, bit4 = Up, bit5 = Down, bit6 = Left, bit7 = Right). If the bit is set, respective button is considered to be pressed, if the bit is clear, the button is not pressed</span></li>
<pclass="rvps2"><spanclass="rvts6">If a </span><spanclass="rvts45">fourscore</span><spanclass="rvts6"> is used, then port0 and port1 are irrelevant and ignored. 4 bytes are added to the size of record. The bits of the 1st byte represent the state of buttons of the 1st joypad (bit0 = A, bit1 = B, bit2 = Select, bit3 = sTart, bit4 = Up, bit5 = Down, bit6 = Left, bit7 = Right); bits of the 2nd byte represent the state of buttons of the 2nd joypad, and so on.</span></p>
<pclass="rvps4"style="clear: both;"><spanclass="rvts18">Created with the Personal Edition of HelpNDoc: </span><aclass="rvts19"href="https://www.helpndoc.com/help-authoring-tool">Single source CHM, PDF, DOC and HTML Help creation</a></p>