aboutsummaryrefslogtreecommitdiffstats
path: root/src/gb.h
diff options
context:
space:
mode:
authorgbc dev <gbc@localhost>2026-07-15 23:44:28 +0200
committergbc dev <gbc@localhost>2026-07-15 23:44:28 +0200
commit24a015ff047d4b7bb955ba4bc61d5793d7492878 (patch)
treeebaf323a5c530400c81f9ce13db828e9bf6b35e1 /src/gb.h
parentcontrol: video frame capture + deterministic input-movie replay (diff)
downloadsl0pboy-24a015ff047d4b7bb955ba4bc61d5793d7492878.tar.gz
sl0pboy-24a015ff047d4b7bb955ba4bc61d5793d7492878.tar.xz
sl0pboy-24a015ff047d4b7bb955ba4bc61d5793d7492878.zip
serial: headless mode tying serial port to stdio for OS debugging
- --headless: no rendering/TUI; serial TX -> stdout, RX <- stdin (nonblocking) - generalize serial: serial_out_fd/serial_in_fd on the GB; internal-clock transfer now shifts in a real RX byte (from stdin) instead of always 0xFF - paced to native speed by default, --uncapped for turbo; pipes/scripts cleanly - README: document headless serial console
Diffstat (limited to 'src/gb.h')
-rw-r--r--src/gb.h2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/gb.h b/src/gb.h
index 7439615..7218648 100644
--- a/src/gb.h
+++ b/src/gb.h
@@ -114,6 +114,8 @@ struct GB {
u64 cycles; // total T-cycles elapsed
bool serial_log; // print serial output to stderr (blargg tests)
+ int serial_out_fd; // if >=0, transmitted serial bytes written here (stdout)
+ int serial_in_fd; // if >=0, received serial bytes read here (stdin), else 0xFF
};
void gb_init(GB *gb);