Skip to content

Communication Protocol

André Wagner edited this page Sep 5, 2023 · 22 revisions

Requests

Web client <-> Server Request Body Response Server <-> Debugger board Response
GET /ack A +
GET /memory/{PAGE} [12, 34, ...] R {ADDR} 256 + 0b af
GET /code { "src": "...:, "rom": [...], "status": 0, "stdout": "...", "stderr": "..." }
POST /memory/{ADDR} [12, 34, ...] W {ADDR} {DATA...} +
POST /post [{ test: "...", response: true }, ...] P + a+ b- c+ ...
POST /step-cycle { "data", 0, "addr": 12, "m1": true, ... } s + 0 12 1 0 1 ...
POST /step?nmi=false { "pc": 123 } S + 123
POST /step?nmi=true { "pc": 123, "af": 4123, "bc": 42312 } N + 123 4123 42312 ...
POST /reset X +
POST /breakpoint/{BKP} [{BKP}, 123, ...] B {BKP} + {BKP} 123 ...
POST /next { "state": "running" } n + 0
POST /next { "state": "breakpoint-hit", "pc": 123, ...} n + 1 123 ...
POST /run { "state": "running" } D + 1 123

If emulator is running then the following responses are possible:

Web client <-> Server Request Body Response Server <-> Debugger board Response
GET /run-state { "state": "running" } ? + 0
GET /run-state { "state": "breakpoint-hit", "pc": 123 } ? + 1 123
GET /run-state { "state": "uart", "chars": [12, 23, 24 ] ? + 2 12 23 24
POST /pause x + 123
Clone this wiki locally