https://tasvideos.org/EmulatorResources/MAME
Yes people. This day has come. We've been waiting for years, and today keylie fixed problems with MAME in libTAS.
Compile libTAS from source and install it.
sudo apt install mame
Go to your
Home directory, create
mame folder there, create
roms folder there, and put there all your MAME ROMs. If you want to keep them in a different place, execute
mame -w in terminal, Configure Options -> Configure Directories -> ROMs -> Add Folder, and navigate where you need, then hit Tab to save the new path, return to main menu and hit Save Configuration. Put the ROMs there.
mame -w means you launch it in a windowed mode. If you want it to remember this mode, go to Configure Options -> Video Options, and set things you like. Return to main menu and hit Save Configuration.
Configure input in General Inputs. Other Controls contain inputs for coins and start, as well as some things that may interfere with libTAS hotkeys (mostly Fn keys). Clean those up by selecting them, hitting Enter and then Escape. Check User Interface keys for that matter too. Then either set game input for all games in Player N Controls, or hit Tab with the game running and config input for current machine alone - Input (this Machine).
Execute
libTAS /usr/games/mame. libTAS will launch with mame executional path already set. In Command-line options just type the name of the ROM you want to play, and hit Run.
Games should be tasable with default config, you might want to check Runtime - Savestates - Store savestates in RAM, to speed them up.