SCRYMAMEReferenceMachinecpu_info
cpu_info
List each cpu as the debugger sees it: visible, ignored or suspended, its program counter, and the breakpoints and watches set on it.
cpu_info(cpu="")
Try it
start.Which cpus does this machine have, and which one is the debugger showing?
cpu_info(){
"cpus": [
{
"cpu": ":maincpu",
"visible": true,
"ignored": false,
"suspended": false,
"pc": {"reg": "PC", "value": "0x0000f000"},
"declarations": {"breakpoints": 0, "watches": 0, "regpoints": 0}
}
]
}Gridlee has one cpu, :maincpu. It is the visible one, which a call that names no cpu acts on; it sits at 0xf000 and nothing is set on it yet.
The whole reply
{
"summary": "cpu_info: 1 cpu, :maincpu visible",
"status": "ok",
"cpus": [
{
"cpu": ":maincpu",
"visible": true,
"ignored": false,
"suspended": false,
"pc": {"reg": "PC", "value": "0x0000f000"},
"declarations": {"breakpoints": 0, "watches": 0, "regpoints": 0}
}
],
"cpu": {"available": false, "why": "no cpu was named, so the rows are every cpu's"}
}Arguments
- cpu string, default
"" - The tag of one cpu: only its row comes back and only its
pcis read. Left empty, every cpu is listed.
What comes back
- cpus
- One row per cpu: its tag
cpu,visible,ignored,suspended, its program counterpc, anddeclarations, the count of what is set on it. - cpu
- The full tag of the cpu you named; with none named, an object that says so.
All 2 reply fields
cpu(string or object)cpus(array)
What it refuses
- A tag that names no cpu; the message lists the tags there are (
unknown_ref). - A call with no session open (
no_session). - A session that broke and has to be closed (
session_broken).
Why it works this way
Answering runs nothing and makes no cpu visible: the flags come from the debugger's own listings and each pc is read as a register. visible marks the cpu that a call naming none acts on, and a stop moves it. ignored means breakpoints and watches on that cpu have no effect.
A pc is unavailable, with the reason, while the program runs, and for every cpu but the first where MAME's gdbstub serves one cpu. A cpu the board itself holds in reset or halted shows nowhere: telling would mean moving the machine.
More on why
declarationscountsbreakpoints,watchesandregpoints, armed or not. A regpoint is MAME's registerpoint, a stop on a condition over registers.- A watch on an io port counts; one on a debugger expression belongs to no cpu and is not counted.
suspendedis the debugger's ownsuspend.- Rows follow the debugger's
cpulist, then any other cpu a saved breakpoint or watch names; of such a cpu only the counts are read.
Related tools
The contract your client receives
What the debugger sees of each cpu now: visibility, ignored or suspended, program counter,
and how many breakpoints, watches and registerpoints are declared on it. Moves nothing;
answers on a running machine.
Arguments: `cpu`, a tag in either spelling (`subcpu` or `:subcpu`), narrows the rows.
Refused: a tag no row names (`unknown_ref`); no machine (`no_session`); a broken session
(`session_broken`).
Reply: `cpus` (each `cpu`, `visible`, `ignored`, `suspended`, `pc`, `declarations`), `cpu`.
Reference: REFERENCE.md, The session.