MAME doesn't have rerecording, but you can TAS it by running it in libTAS.

What you'll need

Using with libTAS

  1. MAME usually installs itself into /usr/games/mame so use that path for the Game executable field.
  2. Command-line options should be yourrom -window -nokeepaspect -skip_gameinfo -nomaximize -nounevenstretch -nonvram_save where yourrom is actually the name of your game's ROM set package. Full list of options MAME supports.
  3. If you don't know which folders MAME looks for ROMs in and where to put your ROM, put it anywhere and add -rompath folder/containing/your/rom to Command-line options, with actual path to your ROM, but without the filename.
  4. Make sure Runtime -> Prevent writing to disk is enabled, or MAME will dump files onto your disk, messing with game state and movie sync.
  5. If you've already launched your game outside libTAS, or if you've launched it in libTAS with Runtime -> Prevent writing to disk disabled, you may have nvram (non-volatile RAM) contents dumped to your disk, which will mess with game state and movie sync. In Ubuntu, go to ~/.mame and delete everything (usually it's cfg, nvram, and .inis).
  6. You can skip imperfect emulation warnings that appear before the game starts if there are emulation issues with it, but there's no command-line argument for it.
    • The easiest way to do it is by doing what it asks for: pressing any key to continue, right inside your movie recording.
    • A more elaborate way requires using MAME's UI menu: Configure Options -> Miscellaneous Options -> Skip imperfect emulation warnings, but it also involves launching MAME normally and making it save ui.ini with this setting. Which means whoever will try to sync your movie will have to have that setting enabled as well.

Input keys

To know which input keys MAME expects as in-game controls, you can look them up in MAME menu. If mouse cursor is not working (you may need to run MAME in windowed mode by using the -w commandline switch), just use Tab, Enter, and arrow keys. Fullscreen hotkey is left Alt + Enter.
libTAS may also have MAME's in-game control keys bound to something unrelated, unbind them too or reassign them in MAME.
Note that your run must sync on MAME with all UI hotkeys disabled! Using MAME User Interface within the movie is not allowed.

Framerate

MAME emulates lots of machines with different framerates. It shows framerate in the information screen before the game (unless you disable it in the menu or via the -skip_gameinfo argument). But that value can't be used in libTAS since it expects framerate represented as numerator / denominator. To obtain those, we need to utilize MAME's Lua scripting abilities.
Download this Lua script, put it anywhere, and add -script full/path/to/your/file/mame-framerate.lua to Command-line options (specifying its actual full path). That way in terminal you'll be able to see what numerator and denominator you need to set in libTAS's Frames per second fields for that game (and only that game). It also prints intended aspect ratio for encoding.

MAME replay file

When your run is ready, you can make MAME create its internal replay file from it. This is not required, but it may help people who don't have libTAS and Linux or WSL2 set up, but still want to watch the movie in the emulator.

Movie submissions

We allow submissions using MAME with libTAS. Please follow these guidelines to ensure your movie is acceptable and can be synced:
Follow all rules already in place for submitting libTAS movies.
Keep in mind our rules on emulation accuracy. If the game has emulation problems, MAME tells that in its User Interface when you select that game in the list, and when you launch it.
Configuring MAME before running the game (for example, presetting DIP switches) is allowed, as long as that configuration is intended for playing that game normally. Aside from that, your run must sync on default MAME config.
Using MAME User Interface within the movie is not allowed for publication. You run must sync on MAME with all UI hotkeys disabled!
Make sure your movie starts with no save data! Having your own save data present may cause desyncs when other people try to run your movie. To delete your save data in Ubuntu, go to ~/.mame and delete everything (usually it's cfg, nvram, and .inis).
When making a libTAS movie that you plan to submit to TASVideos or upload it to userfiles, put Platform: Arcade at the very start of the movie annotations, that way the site will recognize your platform properly. Other systems that MAME can emulate can be supported in the future, if the system is emulated well (see above).
In your description or movie annotations, please provide the following:

EmulatorResources/MAME last edited by feos on 2/17/2024 8:14 PM
Page History Latest diff List referrers View Source