reset
Soft-reset the machine without restarting MAME, and stop where its boot begins.
reset()
Try it
Reset the game without restarting MAME.
reset(){
"summary": "reset: softreset applied at frame 630, pc 0x0000f000 verified True",
"kind": "softreset",
"pc": "0x0000f000",
"boot_pc": "0x0000f000",
"verified": true,
"frame_at_reset": 630
}The machine is back at 0xf000, the address start first stopped it at, so verified is true. The frame counter did not restart: frame_at_reset is 630.
The whole reply
{
"summary": "reset: softreset applied at frame 630, pc 0x0000f000 verified True",
"status": "ok",
"kind": "softreset",
"pc": "0x0000f000",
"boot_pc": "0x0000f000",
"verified": true,
"frame_at_reset": 630,
"taps_across": [
{"ref": "film", "cpu": ":maincpu"}
],
"cause": "softreset",
"stop_seq": 61,
"cpu": ":maincpu",
"frame": 630,
"regs": {
"A": "0x42",
"B": "0xd8",
"D": "0x42d8",
"X": "0x0014",
"Y": "0xf2e6",
"U": "0x4071",
"PC": "0xf000",
"S": "0x07f4",
"CC": "0xd0",
"DP": "0x00"
},
"instruction": {"address": "F000", "bytes": "1A50", "text": "ORCC #$50", "symbol": "take_credit", "delta": 6538},
"following": ["F002: 4F CLRA", "F003: 1F 8B TFR A,DP", "F005: 10 CE 08 00 LDS #$0800", "F009: BD D1 21 JSR $D121", "F00C: B6 95 02 LDA $9502", "F00F: 97 BC STA <$BC", "... 6 more"],
"errorlog": "<volatile>"
}Arguments
Takes no argument.
What comes back
- kind
- Always
softreset: the only reset this tool makes. - pc
- Where the machine is after the reset.
- boot_pc
- Where
startleft the machine at boot. Unavailable whenstartread no address then. - verified
truewhenpcandboot_pcagree: the machine is back where it boots.- frame_at_reset
- The frame counter at the reset. It does not restart, so subtract this before comparing a frame with a fresh start's.
- taps_across
- Each count or capture that was running across the reset, by
ref,cpuand, for a port,space. Its totals carry on.
All 16 reply fields
boot_pc(string or object)cpu(string)following(array of string)instruction(StopInstruction)errorlog(object)frame(integer)frame_at_reset(integer)kind(string)pc(string)regpoint_hit(object)regs(object)stop_seq(integer)taps_across(array)verified(boolean)watch_hit(object)watches(array)
What it refuses
- A machine that is running (
not_stopped).
Why it works this way
The reset is a stop of its own: MAME applies it only when the machine next runs, so the call steps one instruction. That stop is recorded with the readings every stop returns, described on the Run page.
There is no hard reset: it re-creates the machine and ends the debugger connection, which is close then start. It would save only MAME's launch, none of the emulated time to the screen that matters.
A reset is a write: the session block of every later reply carries altered, which says this session has written to the machine.
More on why
A count or capture watch counts on across a reset, because its tables live outside the machine. For a fresh count, declaration_clear(kind="watch") and add the watch again.
Related tools
The contract your client receives
Soft reset, applied, without relaunching. Modifies the machine; needs it stopped. A hard
reset is `close` then `start`.
Reply: `kind`, `pc`, `boot_pc`, `verified` (the two agree), `frame_at_reset`, `taps_across` (a
tap was live), and the stop's survey (`cause`, `stop_seq`, `cpu`, `regs`, `frame`,
`instruction`, `following`, `errorlog`, `watches`, `watch_hit`, `regpoint_hit`). The frame
counter does not restart: subtract `frame_at_reset` before comparing with a cold boot.
Reference: REFERENCE.md, Reading and writing.