run_lua_inline
Run MAME Lua source strings directly in a headless environment, then collect results via an artifact file the script writes.
Instructions
Run caller-supplied MAME Lua source (string, not a path) headlessly; optionally read back an artifact file.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| cwd | No | MAME working directory. Defaults to MAME_CWD or current directory. | |
| lua | Yes | Lua source to run as an autoboot script. | |
| frames | No | Frame budget for safety seconds. | |
| system | No | MAME machine short name. Defaults to MAME_SYSTEM. | |
| mameExe | No | MAME executable. Defaults to MAME_EXE or `mame`. | |
| rompath | No | ROM search path. Defaults to MAME_ROMPATH. | |
| workdir | No | Generated-script/log directory. Defaults to MAME_WORKDIR or <cwd>/.mame_mcp. | |
| timeoutSec | No | Process timeout in seconds. | |
| artifactPath | No | Optional file the script writes; its text is returned. |