From 4673e7571360e18d490e6c07196ad1f01405b305 Mon Sep 17 00:00:00 2001 From: user Date: Sat, 18 Jul 2026 20:41:37 +0200 Subject: 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. --- demo/gbos-demo.gif | Bin 0 -> 511818 bytes demo/readme.gbd | 44 ++++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 44 insertions(+) create mode 100644 demo/gbos-demo.gif create mode 100644 demo/readme.gbd (limited to 'demo') diff --git a/demo/gbos-demo.gif b/demo/gbos-demo.gif new file mode 100644 index 0000000..0e000a2 Binary files /dev/null and b/demo/gbos-demo.gif differ 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 -- cgit v1.3.1-sl0p