SCRYMAMEReferenceRunresumeAlso in DOSBox-X
resume
Let the machine run, either with no deadline or waiting a while for it to stop.
resume(seconds=0.0)
Try it
Ask
Let the game run.
Call
resume()Reply 2 of 2 fields
{
"summary": "resume: running, no wait asked",
"status": "ok"
}Then stop it again:
Call
stop()Reply 3 of 13 fields
{
"interrupted": true,
"cause": "interrupt",
"stop_seq": 62
}With no seconds the call returns at once and the game keeps running. The stop after it interrupted the machine: the session's stop number 62.
The two replies, whole
The first call's:
JSON
{
"summary": "resume: running, no wait asked",
"status": "ok"
}The second call's:
JSON
{
"summary": "<volatile>",
"status": "ok",
"interrupted": true,
"cause": "interrupt",
"stop_seq": 62,
"pc": "<volatile>",
"cpu": ":maincpu",
"frame": "<volatile>",
"regs": "<volatile>",
"instruction": "<volatile>",
"following": "<volatile>",
"errorlog": "<volatile>",
"average_speed": "<volatile>"
}Arguments
- seconds number (>= 0, <= 600.0), default
0.0 - How long to wait for a stop, in real seconds. Left at 0, the call returns at once and the machine keeps running.
What comes back
- verdict
- With
seconds:OTHER_STOP, a breakpoint or a watch stopped the machine, and the stop's readings follow;TIMEOUT, nothing did, and it is left running with anote. - waited_s
- With
seconds: how long the call waited. - average_speed
- With a stop: how fast the machine ran, as
percentof real time, overemulated_sandwall_s.
All 14 reply fields
average_speed(object)cpu(string)following(array of string)instruction(StopInstruction)errorlog(object)frame(integer)pc(string)regpoint_hit(object)regs(object)stop_seq(integer)verdict(string)waited_s(number)watch_hit(object)watches(array)
What it refuses
- A machine that is already running (
not_stopped). - An answer that is not a stop where one was due, a resume that could not be sent, or a stop that could not be read (
session_broken).
Why it works this way
While the machine runs, the tools that read it refuse. Each refusal names last_stop, the stop the machine was last seen at, and answers_while_running, the tools that still answer.
A resume with seconds reports progress while it waits. After session_broken the way out is close, then start.
Related tools
The contract your client receives
Text
Let the machine run. `seconds` 0 (the default) returns at once with no deadline; a bound up
to 600 waits for a stop and, if none comes, leaves it running. Needs the machine STOPPED (else `not_stopped`).
Reply: with a bound, `waited_s` and `verdict` (`OTHER_STOP` with the stop survey and
`average_speed`; `TIMEOUT`, left running, with a `note`). INVALID: `session_broken`.
Reference: REFERENCE.md, Running and stopping.