I only have a draft I made before I even started coding this. Maybe it isn't 100% right:
000 4-byte signature: "PXM "
004 1-byte flags:
bit 0: reserved, set to 0
bit 1:
if "0", movie begins from an embedded savestate
if "1", movie begins from power-on
bit 2:
if "0", NTSC timing
if "1", PAL timing
other: reserved, set to 0
005 1-byte flags: reserved, set to 0
006 1-byte unsigned char: joypad port 1 type
007 1-byte unsigned char: joypad port 2 type
008 4-byte unsigned long: number of frames
00C 4-byte unsigned long: rerecord count
010 4-byte unsigned long: offset to the savestate inside file
014 4-byte unsigned long: offset to the controller data inside file
018 4-byte unsigned long: author string lenght
01C string: name of the author
Then it's 2 bytes for each joypad for each frame. You're going to need to find yourself what button is which bit and all that. :P
I'll try to do a proper document with all this when I feel the format is good enough for our needs...