Theme: Make -dap-attach against a running emulator (nessy) actually usable.
D1 — Server owns CPU execution during a session (ownership model)¶
Context: if both the emulator's game loop and the DAP run loop step the CPU, they race.
Decision: on DAP attach the host pauses its own loop; the DAP server owns execution (continue/pause/step). A shared cpuMu guards CPU-touching dispatch.
Consequences: the canonical concurrency contract for every later DAP feature — the run loop, host stop-predicate, and live-state streaming all respect cpuMu (ADR 0008).
D2 — readMemory routes through MMIO.Peek (side-effect-free)¶
Context: a debugger reading a memory-mapped register must not trigger its read side effect (e.g. clearing a status bit).
Decision: DAP readMemory uses a side-effect-free peek path; the TUI mirrors remote RAM via readMemory so disasm/memory panels render real bytes, not zero-byte BRK chains.
Consequences: safe inspection of cart/peripheral space; the mirror-sync pattern (RefreshMemory) is later complemented by event streaming (ADR 0008 D3, and follow-up #440).
Decision:chippy -nessy ROM launches the emulator + attaches in one command; the sibling .dbg source map is loaded locally so source view + symbol names work over attach.
Decision::bp / :run forward the breakpoint set to the server (later via setInstructionBreakpoints with conditions) so the server can short-circuit non-matching hits without a TUI round-trip.
Consequences: keeps remote and local breakpoint state consistent; conditional-bp forwarding is completed in ADR 0005 D1.