nmv is the movie capture format of Nintendulator, a NES emulator.

NMV file format description

NMV file consists of a 16-byte header and various blocks that depend on settings. The same file format is used for savestates.
Header format:
  000 4-byte signature: 4E 53 53 1A "NSS\x1A"
  004 4-byte version string (example "0960")
  008 4-byte file size, not including the 16-byte header
  00C 4-byte file type string
     "NSAV" - standard savestate
     "NREC" - savestate saved during movie recording
     "NMOV" - standalone movie file
Individual blocks begin with an 8-byte header, consisting of a 4-byte signature and a 4-byte length (which does not include the length of the block header).
If the movie begins with a savestate, all of the savestate blocks (CPUS, PPUS, APUS, CTRL, NPRA, NCRA, MAPR, GENI, and DISK) will be located here.
The final block in the file is of type "NMOV" and contains the following data:
  000 1-byte controller #1 type (see below)
  001 1-byte controller #2 type (or four-score mask, see below)
  002 1-byte expansion port controller type
  003 1-byte number of bytes per frame, plus flags
     bit 6: Game Genie active
     bit 7: Framerate
         if "0", NTSC timing
         if "1", PAL timing
  004 4-byte little-endian unsigned int: rerecord count
  008 4-byte little-endian unsigned int: length of movie description
  00C (variable) null-terminated UTF-8 text, movie description (currently not implemented)
  ... 4-byte little-endian unsigned int: length of controller data in bytes
  ... (variable) controller data
The controller data contains <number_of_bytes> / <bytes_per_frame> frames.
Note that the savestate data must come before controller data.
Controller data is variant, depending on which controllers are attached at the time of recording. The following controllers are implemented:
0 - Unconnected
1 - Standard Controller (1 byte)
2 - Zapper (3 bytes)
3 - Arkanoid Paddle (2 bytes)
4 - Power Pad (2 bytes)
5 - Four-Score (special)
6 - SNES controller (2 bytes) - A/B become B/Y, adds A/X and L/R shoulder buttons
7 - Vs Unisystem Zapper (3 bytes)
When a Four-Score is indicated for Controller #1, the Controller #2 byte becomes a bit mask to indicate which ports on the Four-Score have controllers connected to them. Each connected controller stores 1 byte per frame. Nintendulator's Four-Score recording is seemingly broken.
The expansion port can potentially have an additional controller connected. The following expansion controllers are implemented:
0 - Unconnected
1 - Famicom 4-player adapter (2 bytes)
2 - Famicom Arkanoid paddle (2 bytes)
3 - Family Basic Keyboard (currently does not support demo recording)
4 - Alternate keyboard layout (currently does not support demo recording)
5 - Family Trainer (2 bytes)
6 - Oeka Kids writing tablet (3 bytes)
Standard controllers store data in the following format:
01: A
02: B
04: Select
08: Start
10: Up
20: Down
40: Left
80: Right
Other controllers store data in their own formats, and are beyond the scope of this document.
Depending on the mapper used by the game in question, an additional byte of data may be stored during each frame. This is most frequently used for FDS games (storing either the disk number or 0xFF to eject) or VS Unisystem coin/DIP switch toggles (limited to 1 action per frame). This byte exists if the bytes per frame do not match up with the amount of bytes the controllers take up.
Controller update data is emitted to the movie file during every frame.


OtherEmulators/NMV last edited by feos on 7/25/2015 2:23 PM
Page History Latest diff List referrers View Source