SCRYMAMEReferenceCapturescapturesAlso in DOSBox-X

MAMECaptures

captures

List the files this session's tools wrote, each read again now: whether it is still there, its size, what it holds.

captures()

Try it

On Gridlee, a free ROM from mamedev.org, near the end of a session that has recorded a video, a sound and a trace and saved pictures.
Ask

List the files this session has written so far.

Call
captures()
Reply 1 of 3 fields
{
  "summary": "captures: 15 files, 1 avi, 1 png, 11 image, 1 wav, 1 trace"
}

Fifteen files: a video, a snapshot (png), a sound file, a trace and eleven pictures (image) that the graphics tools and the series wrote.

The whole reply
JSON
{
  "summary": "captures: 15 files, 1 avi, 1 png, 11 image, 1 wav, 1 trace",
  "status": "ok",
  "captures": [
    {
      "kind": "image",
      "path": "./tmp/demos/tour/film/frame-1.png",
      "present": true,
      "bytes": "<volatile>"
    },
    {
      "kind": "image",
      "path": "./tmp/demos/tour/film/sheet-0.png",
      "present": true,
      "bytes": "<volatile>"
    },
    {"kind": "image", "path": "./tmp/demos/tour/pixel.png", "present": true, "bytes": "<volatile>"},
    {"kind": "image", "path": "./tmp/demos/tour/palette.png", "present": true, "bytes": "<volatile>"},
    {"kind": "image", "path": "./tmp/demos/tour/sweep.png", "present": true, "bytes": "<volatile>"},
    {"kind": "image", "path": "./tmp/demos/tour/tiles.png", "present": true, "bytes": "<volatile>"},
    "... 9 more"
  ]
}

Arguments

Takes no argument.

What comes back

captures
One row per file: kind, path, present and bytes. An AVI adds avi_frames; a WAV adds samples, channels and sample_rate_hz.
All 1 reply fields
  • captures (array)

Why it works this way

Every file is read again at each call, so the list says what is on disk now, and it answers while the program runs. A file deleted since stays listed, with present: false.

kind is the file's extension (avi, wav, png, trace), or image for a picture a graphics tool or a series wrote. An AVI's or a WAV's counts are unavailable once the file no longer reads as finished.

The file of addresses a trace writes beside its trace is not listed. Neither is an unfinished recording: a recording its call answered still open or not begun is not listed, since that call's reply holds its path.

The contract your client receives
Text
List the files `record`, `audio_record`, `trace`, `snapshot` and the graphics tools made
this session, re-read now; works while running.

Reply: `captures` (`kind`, `path`, `present`, `bytes`, `avi_frames`, `samples`, `channels`,
`sample_rate_hz`).

Reference: REFERENCE.md, Input and the screen.
Tools