.wtf is the input movie format of Hourglass. It stands for what the "Windows TAS File".
In r60 or later, Hourglass also recognizes the extension .hgm ("Hourglass Movie"), which can be used instead of .wtf if you wish.

WTF file format description

A WTF file consists of a 1024-byte header followed by the input data.

Header format

0x0004-byte signature: 0x66 0x54 0x77 0x02
0x0044-byte little-endian unsigned int: total number of input frames
0x0084-byte little-endian unsigned int: rerecord count
0x00C8-byte unterminated ASCII-encoded string: keyboard layout such as "00000409" for a US keyboard
0x0144-byte little-endian unsigned int: frames per second
0x0184-byte little-endian unsigned int: initial system clock time plus 1
0x01C4-byte little-endian unsigned int: CRC32 of the game executable
0x0204-byte little-endian unsigned int: size in bytes of the game executable
0x02448-byte null-terminated ASCII-encoded string: filename of game executable (excluding directories)
0x05416 4-byte little-endian unsigned ints: system clock time at power-of-two frame boundaries, used for desync detection. Ignored if zero. Introduced in r41.
0x0944-byte little-endian unsigned int: revision number of Hourglass that the movie was recorded with. If 0, the revision is assumed to be 51 (or 39 if the first clock time at 0x054 is also 0). Introduced in r57.
0x098160-byte null-terminated ASCII-encoded string: command line arguments that are provided to the game. Introduced in r60.
0x138reserved bytes which should be 0, padding until end of 1024 byte header
0x400beginning of frame data

Input Data

Each frame consists of 8 bytes of keyboard data.
Each byte is a virtual key code such as VK_ESCAPE indicating that a particular key was held on that frame. The first zero-value byte indicates that no other keys were held on that frame.
Frames where more than 8 different keys are held cannot be represented by the movie format. Nevertheless, attempting to press more than 8 keys at once will not cause desyncs, because Hourglass implements recording by saving each frame of input in movie format and then playing that frame of input back as if in playback mode.
DirectInput key codes are not stored separately, instead, they are generated based on the virtual key codes and the keyboard layout string that's stored in the current movie.

EmulatorResources/Hourglass/WTF last edited by feos on 5/16/2016 7:54 PM
Page History Latest diff List referrers View Source