SCRYMAMEReferenceRunstopAlso in DOSBox-X
stop
Stop a running machine where it is and read where it stopped.
stop()
Try it
resume.Ask
Stop the game where it is.
Call
stop()Reply 4 of 13 fields
{
"interrupted": true,
"cause": "interrupt",
"stop_seq": 62,
"cpu": ":maincpu"
}interrupted: true means this call stopped the machine. It is the session's stop number 62, on the main cpu; where it lands differs from run to run.
The whole reply
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
Takes no argument.
What comes back
- interrupted
truewhen this call stopped the machine, with the stop's readings.falsewhen it was already stopped, with anote.- average_speed
- How fast the machine ran since it was resumed:
percentof real time, overemulated_sandwall_s.
All 13 reply fields
average_speed(object)cpu(string)following(array of string)instruction(StopInstruction)errorlog(object)frame(integer or object)interrupted(boolean)pc(string)regpoint_hit(object)regs(object)stop_seq(integer)watch_hit(object)watches(array)
What it refuses
- An interrupt the machine did not answer, or a frame counter that still moves: the machine stays marked as running, so ask again (
not_settled). - An interrupt answered by something that is not a stop, a failed connection, or a stop that could not be read (
session_broken).
Why it works this way
stop is the way back from any run that ended without knowing whether the machine stopped. A run by frames refused as no_progress is brought back here: the interrupt is what confirms the stop.
Nothing counts the attempts. If stop fails as well, close then start.
More on why
not_settled also covers a run started from MAME's console, through debug, whose frame counter still moves.
Related tools
The contract your client receives
Text
Stop a running machine where it is and survey the stop.
Reply: `interrupted` (`true` with the stop survey and `average_speed`; `false` when already
stopped, with a `note`). INVALID: `not_settled` (the machine stays marked RUNNING; ask
again), `session_broken`.
Reference: REFERENCE.md, Running and stopping.