Tool-assisted game movies
When human skills are just not enough

Emulator Resources / Desmume / DSM

dsm is the movie capture format of DeSmuMe, a Nintendo DS emulator.

DSM file format description


DSM is ascii plain text. It is derived from the FCEUX FM2 format. It consists of several key-value pairs followed by an inputlog section.

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

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.

Integer keys (also used for booleans, with a 1 or 0) will have a value that is a simple integer not to exceed 32bits


String keys have values that consist of the remainder of the key-value pair line. As a consequence, string values cannot contain newlines.

Hex string keys (used for binary blobs) will have a value that is like 0x0123456789ABCDEF...

GUID keys have a value which is in the standard guid format: 452DE2C3-EF43-2FA9-77AC-0677FC51543B

Header sync information

The following keys are used (0.9.6 and later) to check sync:

  • useExtBios - External BIOS, 0 if not used.
  • advancedTiming - Advanced timing, 0 if not used.
  • useExtFirmware - External Firmware, 0 if not used.
  • firmNickname - Firmware Nickname.
  • firmMessage - Firmware Message.
  • firmFavColour - Firmware favorite color (0-15).
  • firmBirthMonth - Firmware birth month (1-12).
  • firmBirthDay - Firmware birth day (1-31).
  • firmLanguage - Firmware language (0-5).
  • rtcStart - Real Time Clock, default is 2009-01-01T00:00:00Z .


The inputlog section consists of lines beginning and ending with a | (pipe).
The fields are as follows, except as noted in note C.
  |c|.............XXX YYY Z|

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.

  1. microphone input
  2. reset
  3. lid switch

The format of the main section is as follows:

  • the field begins with 13 characters which constitute a bitfield.
  • 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:
    • RLDUTSBAYXWEG (Right,Left,Down,Up,sTart,Select,B,A,Y,X,lshoulder,rshoulder,debuG)
  • This ordering is based on FCEUX to a certain extent, and arbitrary after that.
  • W and E were chosen for shoulders to suggest West and East for Left and Right.
  • The emulator also allows the actions 'lid', 'blow', and 'reset', which are supported (as commands) in movies.
  • XXX: %03d, the x position of the stylus (0,0 topleft, 255,191 bottomright)
  • YYY: %03d, the y position of the stylus
  • Z: %1d, 1 if the stylus is pressed; 0 if not

Additional fields after this main section may be added later without breaking the file format.


  • There is no key-value pair that indicates the length of the movie. This must be read by scanning the inputlog and counting the number of lines.
  • All movies start from power-on.
  • The emulator uses these framerate constants
    • arm7_cycles_per_frame = 560190
    • frames_per_second = 59.8261

See also: EmulatorResources, frequently asked questions

Combined RSS Feed
EmulatorResources/Desmume/DSM last edited by feos on 2016-03-19 10:18:40
Page info and history | Latest diff | List referrers | View Source