aboutsummaryrefslogtreecommitdiffstats
path: root/demo/readme.gbd
diff options
context:
space:
mode:
authoruser <user@clank>2026-07-18 20:41:37 +0200
committeruser <user@clank>2026-07-18 20:41:37 +0200
commit4673e7571360e18d490e6c07196ad1f01405b305 (patch)
treefbb1d2ad16c0f217eb24d21badb1489adbddac79 /demo/readme.gbd
parentterm: 7-color terminal (per-glyph fg+bg) + ANSI escapes; colorize irc (diff)
downloadgbos-4673e7571360e18d490e6c07196ad1f01405b305.tar.gz
gbos-4673e7571360e18d490e6c07196ad1f01405b305.tar.xz
gbos-4673e7571360e18d490e6c07196ad1f01405b305.zip
tools: gbdemo - scripted, screen-synced demo driver (+ the README demo)
Runs a step file: spawns a GB on the gbhub network, records the LCD to a .gbv over the emulator control socket, injects console text (hub ctl, like gbtype) and button events (gbctl) at the right moments, then renders a GIF (gbgif.py). Sync is waitfor/waitgone on the terminal's WRAM shadow (TERM_BUF $D600 + wAssign row map) read via the emulator's debug socket - steps key off real screen output, so boot/DHCP/IRC timing can vary without breaking the choreography. demo/readme.gbd is the README GIF: cold boot -> uname -> ping -> IRC session on 10.0.0.1.
Diffstat (limited to 'demo/readme.gbd')
-rw-r--r--demo/readme.gbd44
1 files changed, 44 insertions, 0 deletions
diff --git a/demo/readme.gbd b/demo/readme.gbd
new file mode 100644
index 0000000..1f2c09f
--- /dev/null
+++ b/demo/readme.gbd
@@ -0,0 +1,44 @@
+# gbos README demo: cold boot -> uname -> ping -> IRC session.
+# Run inside tmux, with the hub already up:
+# sudo tools/gbhub --daemon
+# tools/gbdemo demo/readme.gbd
+# Produces /tmp/gbos-demo.gbv and demo/gbos-demo.gif.
+#
+# Every waitfor syncs on REAL screen text (the terminal's WRAM shadow), so
+# boot, DHCP and IRC-server timing can vary without breaking the choreography.
+
+spawn --chrome
+record /tmp/gbos-demo.gbv 2
+
+# cold boot: kernel dmesg, netd grabs a DHCP lease, then the shell prompt
+waitfor "/# " 60
+wait 2
+
+slowtype uname -a
+waitfor gbos 10
+wait 2.5
+
+# ping the gateway (4 echoes, then back to the prompt)
+# 4 echoes + summary, back at the prompt
+slowtype ping 10.0.0.1
+waitfor "/4 received" 20
+wait 1.5
+
+# IRC: connect, register, join, say hi, part (server = the hub gateway)
+slowtype irc 10.0.0.1 sl0pboy
+waitfor "registering" 30
+# server intro/MOTD flowing
+waitfor "-!-" 60
+wait 5
+
+slowtype /join #~blasty
+wait 8
+slowtype hello from a 8MHz game boy color running gbos
+wait 6
+slowtype /quit
+waitfor "/# " 20
+wait 3
+
+recordstop
+gif demo/gbos-demo.gif --scale 2
+stop