From c879adc43b91a53eb7e76f232a39abb56d8144c1 Mon Sep 17 00:00:00 2001 From: gbc dev Date: Tue, 14 Jul 2026 23:26:49 +0200 Subject: control: socket-based debug channel + gbctl CLI driver Replace the input-only FIFO's limitations with a Unix-domain socket control channel (--sock) that is a superset of the button vocabulary plus emulator introspection: read/write bus memory, get/set CPU context, single-step, PC breakpoints, value-change watchpoints, run/pause. Being a socket it replies to each command and broadcasts async 'event stop ...' lines; a stored last-stop record (stopinfo) lets per-request clients recover a missed event. Add gbctl: a stdlib-python CLI that spawns a tmux pane running the emulator on a ROM, auto-resolves the socket, and drives it with terse verbs (cpu/read/write/ reg/step/break/watch/continue/pause/press/hold/screen/stop). The FIFO stays as legacy input-only. --- src/render.h | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'src/render.h') diff --git a/src/render.h b/src/render.h index 3b6c7e4..03d6c7c 100644 --- a/src/render.h +++ b/src/render.h @@ -8,6 +8,9 @@ void term_restore(void); void render_frame(GB *gb); void render_force_full(void); // force a complete repaint next frame void render_set_hud(int frameskip, bool turbo); // update HUD readout +// Switch terminal output to sixel graphics (scale = integer pixel zoom, >=1). +// Pass on=false to use the default Unicode half-block renderer. +void render_set_sixel(bool on, int scale); // Poll keyboard + control FIFO, update gb->buttons. False if quit requested. bool input_poll(GB *gb); @@ -16,6 +19,11 @@ bool input_poll(GB *gb); void input_open_fifo(const char *path); void input_close_fifo(void); +// Process one line of button-command tokens (the FIFO/socket input vocabulary: +// a b start select up down left right; name:N; +name / -name; release). Shared +// by the FIFO and the richer socket control channel. +void input_handle_command(const char *line); + // Returns true once for each pending fast-forward (turbo) toggle keypress. bool input_take_turbo(void); // Net frameskip adjustment requested via '[' / ']' since last call. -- cgit v1.3.1-sl0p