giris the movie capture format of Gens+, an improvement of the Gens Sega Genesis/Megadrive emulator.
This page documents the
girformat used by Gens+. It is accurate for version 0.0.9.61. Currently,
girmovies are not acceptable for submission for the following reasons:
- no way to store author comments
- no rerecord count
- code is not cross-platform
- no AVI recording
Because Gens+ is open source, these requirements can be met by a dedicated coder.
GIR file format description
girfile consists of a 35-byte header, optionally followed by an embedded save state and/or sram image, followed by frame data. The file may optionally be compressed with gzip, in which case it is typically called a
0x00-04: magic number (0x00564D47, stored as 474D5600) "GMV\0" 0x05-08: file version (0x00000001, stored as 01000000) 0x09-0b: flags 0x01 - movie file includes savestate 0x02 - movie file uses 8 joystick inputs 0x04 - movie file includes sram image others - not used 0x0c-0f: frame count 0x10-13: framerate (60 (0x3C) or 50 (0x32) ) 0x14-1b: controller types for players 1-8 (3 or 6), not correctly implemented in 0.0.9.61 0x1c-1f: state size (only valid if movie includes save state) 0x20-23: sram size (only valid if movie includes sram) 0x24 -> 0x24 + state size - 1: movie save state (if applicable) 0x24 + state_size -> 0x24 + state size + sram size - 1: movie sram (if applicable) 0x24 + state size + sram size: start of frame data
Frame data is stored the same way as the GMV format with one exception: If flags includes 0x02, there are 3 additional frames for players 3-8. This means that
girsupports up to 8 players with 6-button controllers.
The file format has no means of identifying NTSC/PAL, but the FPS can be derived from the header.