Hi
Where can I find out about the format of the replay file? Will mame accept the replay it if I edit the file slightly? I'm not trying to cheat, I'm trying to figure out frame and timing data for certain fighting games (eg. What's the most number of frames you are allowed to enter an dragon punch motion in Super Street Fighter II Turbo etc). If I can edit the input commands in the file and measure the frames it will aid me greatly.
Format of the mame replay file?
Moderators: mahlemiut, seymour, QRS
Re: Format of the mame replay file?
By and large, INP files are simply a log of the state of all input ports per frame. MAME adds speed and a timestamp for each frame, and compresses the data to keep the file size down. There is also a header, whose exact size I forget right now. Check the MAME source to see the header format. Of course, anything with analogue inputs (dial, steering wheel, pedals...) complicate things a bit, since they are often read by the game more than once per frame (for accuracy).
- Barry Rodewald
MARP Assistant Web Maintainer
MARP Assistant Web Maintainer
Re: Format of the mame replay file?
OK thanks. The timestamp may throw my plan out of the window, but maybe I can find an older version of mame that doesn't use timestamps. At the moment I just need the frame and input data. I'll check the source code.
edit:
Just had a look through the source code and from what I gather:
There's 64byte header
For each frame, there's timestamp that's 4 + 8 bytes long, and a 4 byte value indicating the machine speed
After the timestamp comes the input port information (state of the inputs, I gather). For digital input there are 4 bytes for the default state + 4 bytes for the current state. Information from the analog input devices follows that but I'm not interested in those and hopefully it doesn't record it in the input file.
edit:
Just had a look through the source code and from what I gather:
There's 64byte header
For each frame, there's timestamp that's 4 + 8 bytes long, and a 4 byte value indicating the machine speed
After the timestamp comes the input port information (state of the inputs, I gather). For digital input there are 4 bytes for the default state + 4 bytes for the current state. Information from the analog input devices follows that but I'm not interested in those and hopefully it doesn't record it in the input file.
Re: Format of the mame replay file?
do save states work with this game? if so, just make a save state just prior to the spot you want to test then play it over and over again trying different timing for your move(s) to find the span of time it can be executed.
you will make a lot more progress and get more information this way versus modifying an inp file.
you will make a lot more progress and get more information this way versus modifying an inp file.